Clone the eShop repository: https://github.com/petr-rudzenkou/eShop
- .NET 9
- Aspire CLI
dotnet tool install -g Aspire.Cli --prerelease
- OCI compliant container runtime:
- Integrated Developer Environment (IDE) or code editor:
- Visual Studio 2022 version 17.9 or higher
- Visual Studio Code
- Extension: C# Dev Kit
The application consists of:
- 2 Frontends
- 5 APIs
- 2 Processors
- 4 Databases
- Cache
- Event Bus
- Monitoring system
- Start the application by running:
aspire run-
Watch the console output for initialization messages
-
Look for the dashboard URL in the console output (typically something like
https://localhost:19888/login?t=4f08cd9d2bfc2a0ee873fdb8c7bf11e6) -
Open the Aspire dashboard in your browser to examine the application structure, logs, traces.
-
Check the running containers:
docker psGive some time for the services to warm-up
If you encounter SSL/TLS connection errors, run:
dotnet dev-certs https --trustThis error occurs if you're using podman as the container runtime. By default Aspire uses docker. You'll need to tell Aspire to use posman:
aspire run ASPIRE_CONTAINER_RUNTIME=podmanIf you experience port conflicts:
- Stop all running Docker containers:
docker stop $(docker ps -q)- Re-run the AppHost project
Make sure you've completed all the setup requirements from the Local Dev Environment guide before running the project.
The Aspire Command Line Interface will provide enhanced capabilities for:
- Project scaffolding and templates
- Local development orchestration
- Enhanced Publish/Deploy Semantics
- Support for generation of IaC artifacts for multiple providers (Bicep, K8S, Docker Compose)
- Broader deployment targets, including non-Azure environments.
dotnet tool install -g Aspire.Cli --prereleaseAdd Azure Container App environment to your AppHost project using the AddAzureContainerAppEnvironment method:
var builder = DistributedApplication.CreateBuilder(args);
builder.AddAzureContainerAppEnvironment("aca-env");Generate Bicep manifests from your Aspire application:
aspire publish -o aca-artifactsReview the contents of the aca-artifacts folder, which will include Bicep templates for all application resources.
Azure CLI should be installed to perform this step.
az loginDeploy Aspire application to Azure:
aspire deployAdd a Kubernetes environment to your AppHost project using the AddKubernetesEnvironment method:
var builder = DistributedApplication.CreateBuilder(args);
builder.AddKubernetesEnvironment("k8s");Generate Kubernetes manifests from your Aspire application:
aspire publish -o k8s-artifactsReview the contents of the k8s-artifacts folder, which will include a Helm chart with templates for all application containers.
Add a Docker Compose environment to your AppHost project using the AddDockerComposeEnvironment method:
var builder = DistributedApplication.CreateBuilder(args);
builder.AddDockerComposeEnvironment("docker-compose");Generate docker compose file from your Aspire application:
aspire publish -o docker-compose-artifactsReview the contents of the docker-compose-artifacts folder, which will include docker-compose file defining all application containers.
This error occurs if you're using podman as the container runtime. By default Aspire uses docker. You'll need to tell Aspire to use posman:
aspire publish -o docker-compose-artifacts ASPIRE_CONTAINER_RUNTIME=podman- Aspire Overview
- Architecture Overview
- Orchestration Overview
- Integrations Guide
- Dashboard Overview
- Deployment Guide
- Aspire publishing and deployment overview
- .NET Aspire Azure Container Apps Integration
- .NET Aspire Kubernetes Integration
- .NET Aspire Docker Integration
- Aspire Azure Blob Storage integration
- Aspire Azure Cosmos DB integration
- Integrating AWS with .NET Aspire
- .NET Aspire - Terraform support