From c83ccdfa299d47d6733a986e8f93630b1861efdb Mon Sep 17 00:00:00 2001 From: David Pine Date: Tue, 2 Apr 2024 11:27:11 -0500 Subject: [PATCH 1/5] Try sync with source (#570) --- .../AspireSample/AspireSample.ServiceDefaults/Extensions.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/get-started/snippets/quickstart/AspireSample/AspireSample.ServiceDefaults/Extensions.cs b/docs/get-started/snippets/quickstart/AspireSample/AspireSample.ServiceDefaults/Extensions.cs index f00dc4ecea..2963d82a5e 100644 --- a/docs/get-started/snippets/quickstart/AspireSample/AspireSample.ServiceDefaults/Extensions.cs +++ b/docs/get-started/snippets/quickstart/AspireSample/AspireSample.ServiceDefaults/Extensions.cs @@ -3,6 +3,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Diagnostics.HealthChecks; using Microsoft.Extensions.Logging; +using Microsoft.Extensions.ServiceDiscovery; using OpenTelemetry.Logs; using OpenTelemetry.Metrics; using OpenTelemetry.Trace; @@ -126,4 +127,4 @@ public static WebApplication MapDefaultEndpoints(this WebApplication app) return app; } -} +} \ No newline at end of file From c43b830b09e126c8b5082cb1deaa3ff76534f1ea Mon Sep 17 00:00:00 2001 From: David Pine Date: Tue, 2 Apr 2024 14:56:09 -0500 Subject: [PATCH 2/5] Initial bits for hosting changes. (#561) * Initial bits for hosting changes. Fixes #535 * Clean up list and text * Updated, let's go --- .../AspireSample/AspireSample.ServiceDefaults/Extensions.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/get-started/snippets/quickstart/AspireSample/AspireSample.ServiceDefaults/Extensions.cs b/docs/get-started/snippets/quickstart/AspireSample/AspireSample.ServiceDefaults/Extensions.cs index 2963d82a5e..f00dc4ecea 100644 --- a/docs/get-started/snippets/quickstart/AspireSample/AspireSample.ServiceDefaults/Extensions.cs +++ b/docs/get-started/snippets/quickstart/AspireSample/AspireSample.ServiceDefaults/Extensions.cs @@ -3,7 +3,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Diagnostics.HealthChecks; using Microsoft.Extensions.Logging; -using Microsoft.Extensions.ServiceDiscovery; using OpenTelemetry.Logs; using OpenTelemetry.Metrics; using OpenTelemetry.Trace; @@ -127,4 +126,4 @@ public static WebApplication MapDefaultEndpoints(this WebApplication app) return app; } -} \ No newline at end of file +} From 625528b7716fdfeeccb5f8bca9b2b7d1636004a0 Mon Sep 17 00:00:00 2001 From: David Pine Date: Wed, 3 Apr 2024 10:10:57 -0500 Subject: [PATCH 3/5] Add k8s content --- docs/deployment/overview.md | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/docs/deployment/overview.md b/docs/deployment/overview.md index 6ed36503ee..92f25d8f4a 100644 --- a/docs/deployment/overview.md +++ b/docs/deployment/overview.md @@ -2,22 +2,22 @@ title: .NET Aspire deployments description: Learn about essential deployment concepts for .NET Aspire. ms.topic: overview -ms.date: 02/26/2024 +ms.date: 04/03/2024 --- # .NET Aspire deployments -.NET Aspire applications are built with cloud-agnostic principles, allowing deployment flexibility across various platforms supporting .NET and containers. Users can adapt the provided guidelines for deployment on other cloud environments or local hosting. The manual deployment process, while feasible, involves exhaustive steps prone to errors. We anticipate users will prefer leveraging CI/CD pipelines and cloud-specific tooling for a more streamlined deployment experience tailored to their chosen infrastructure. +.NET Aspire applications are built with cloud-agnostic principles, allowing deployment flexibility across various platforms supporting .NET and containers. Users can adapt the provided guidelines for deployment on other cloud environments or local hosting. The manual deployment process, while feasible, involves exhaustive steps prone to errors. Users prefer leveraging CI/CD pipelines and cloud-specific tooling for a more streamlined deployment experience tailored to their chosen infrastructure. ## Deployment manifest -To enable deployment tools from Microsoft and other cloud providers to understand the structure of .NET Aspire applications, specialized targets of the AppHost project can be executed to generate a manifest file describing the projects/services used by the app and the properties necessary for deployment, such as environment variables. +To enable deployment tools from Microsoft and other cloud providers to understand the structure of .NET Aspire applications, specialized targets of the [AppHost project](../fundamentals/app-host-overview.md) can be executed to generate a manifest file describing the projects/services used by the app and the properties necessary for deployment, such as environment variables. -For more information on the schema of the manifest and how to run AppHost project targets, see [.NET Aspire manifest format for deployment tool builders](manifest-format.md). +For more information on the schema of the manifest and how to run app host project targets, see [.NET Aspire manifest format for deployment tool builders](manifest-format.md). ## Deploy to Azure -.NET Aspire enables deployment to Azure Container Apps. We expect the number of environments Aspire can deploy to to grow over time. +.NET Aspire enables deployment to Azure Container Apps. The number of environments .NET Aspire can deploy to will grow over time. ### Azure Container Apps @@ -25,4 +25,23 @@ For more information on the schema of the manifest and how to run AppHost projec ### Use Application Insights for .NET Aspire telemetry -.NET Aspire apps are designed to emit Telemetry using OpenTelemetry which uses a provider model. .NET Aspire Apps can direct their telemetry to Azure Monitor / Application Insights using the Azure Monitor telemetry distro. For more information, see [Application Insights](/azure/azure-monitor/app/app-insights-overview) for step-by-step instructions. +.NET Aspire apps are designed to emit Telemetry using OpenTelemetry which uses a provider model. .NET Aspire Apps can direct their telemetry to Azure Monitor / Application Insights using the Azure Monitor telemetry distro. For more information, see [Use Application Insights for .NET Aspire telemetry](azure/application-insights.md) for step-by-step instructions. + +## Deploy to Kubernetes + +Kubernetes is a popular container orchestration platform that can run .NET Aspire applications. To deploy .NET Aspire apps to Kubernetes clusters, you'll need to map the .NET Aspire JSON manifest to a Kubernetes YAML manifest file. There are two ways to do this: + +### The Aspir8 project + +There's an open-source project named **Aspir8**, which handles the generation of deployment YAML based on the .NET Aspire app host manifest. The project outputs a .NET global tool, that can be used to perform a series of tasks, resulting in the generation of Kubernetes manifests: + +- `aspirate init`: Initializes the **Aspir8** project in the current directory. +- `aspirate generate`: Generates Kubernetes manifests based on the .NET Aspire app host manifest. +- `aspirate apply`: Applies the generated Kubernetes manifests to the Kubernetes cluster. +- `aspirate destroy`: Deletes the resources created by the `apply` command. + +With these commands, you can build your apps, containerize them, and deploy them to Kubernetes clusters. For more information, see [Aspir8](https://prom3theu5.github.io/aspirational-manifests/getting-started.html). + +### Manually create Kubernetes manifests + +Alternatively, the Kubernetes manifests can be created manually. This involves more effort, and is a bit more time consuming. For more information, see [Deploy a .NET microservice to Kubernetes](/training/modules/dotnet-deploy-microservices-kubernetes/). From 840cc90e22a7eaaf3eafbb82d2a3eb52d54645df Mon Sep 17 00:00:00 2001 From: David Pine Date: Wed, 3 Apr 2024 10:28:32 -0500 Subject: [PATCH 4/5] Apply suggestions from code review Co-authored-by: Tom Dykstra --- docs/deployment/overview.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/deployment/overview.md b/docs/deployment/overview.md index 92f25d8f4a..3528c0bc68 100644 --- a/docs/deployment/overview.md +++ b/docs/deployment/overview.md @@ -29,11 +29,11 @@ For more information on the schema of the manifest and how to run app host proje ## Deploy to Kubernetes -Kubernetes is a popular container orchestration platform that can run .NET Aspire applications. To deploy .NET Aspire apps to Kubernetes clusters, you'll need to map the .NET Aspire JSON manifest to a Kubernetes YAML manifest file. There are two ways to do this: +Kubernetes is a popular container orchestration platform that can run .NET Aspire applications. To deploy .NET Aspire apps to Kubernetes clusters, you need to map the .NET Aspire JSON manifest to a Kubernetes YAML manifest file. There are two ways to do this: by using the Aspir8 project and by manually creating Kubernetes manifests. ### The Aspir8 project -There's an open-source project named **Aspir8**, which handles the generation of deployment YAML based on the .NET Aspire app host manifest. The project outputs a .NET global tool, that can be used to perform a series of tasks, resulting in the generation of Kubernetes manifests: +There's an open-source project named **Aspir8**, which handles the generation of deployment YAML based on the .NET Aspire app host manifest. The project outputs a .NET global tool that can be used to perform a series of tasks, resulting in the generation of Kubernetes manifests: - `aspirate init`: Initializes the **Aspir8** project in the current directory. - `aspirate generate`: Generates Kubernetes manifests based on the .NET Aspire app host manifest. @@ -44,4 +44,4 @@ With these commands, you can build your apps, containerize them, and deploy them ### Manually create Kubernetes manifests -Alternatively, the Kubernetes manifests can be created manually. This involves more effort, and is a bit more time consuming. For more information, see [Deploy a .NET microservice to Kubernetes](/training/modules/dotnet-deploy-microservices-kubernetes/). +Alternatively, the Kubernetes manifests can be created manually. This involves more effort and is more time consuming. For more information, see [Deploy a .NET microservice to Kubernetes](/training/modules/dotnet-deploy-microservices-kubernetes/). From d2840d57fad451d912e168a044d2df45f64594f3 Mon Sep 17 00:00:00 2001 From: David Pine Date: Wed, 3 Apr 2024 12:41:46 -0500 Subject: [PATCH 5/5] Apply suggestions from code review --- docs/deployment/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deployment/overview.md b/docs/deployment/overview.md index 3528c0bc68..2c0a93d59a 100644 --- a/docs/deployment/overview.md +++ b/docs/deployment/overview.md @@ -33,7 +33,7 @@ Kubernetes is a popular container orchestration platform that can run .NET Aspir ### The Aspir8 project -There's an open-source project named **Aspir8**, which handles the generation of deployment YAML based on the .NET Aspire app host manifest. The project outputs a .NET global tool that can be used to perform a series of tasks, resulting in the generation of Kubernetes manifests: +**Aspir8**, an open-source project, handles the generation of deployment YAML based on the .NET Aspire app host manifest. The project outputs a .NET global tool that can be used to perform a series of tasks, resulting in the generation of Kubernetes manifests: - `aspirate init`: Initializes the **Aspir8** project in the current directory. - `aspirate generate`: Generates Kubernetes manifests based on the .NET Aspire app host manifest.