Skip to content

CarlSargunar/Aspire-Demo

Repository files navigation

Aspire-Demo

This is the companion repo for my talk about .NET Aspire, which illustrates a mechanism to take a cloud-native application build with Docker Compose and move it to .NET Aspire.

There are two applications in this repo - one build with Docker Compose, and one with Aspire.

Slides for this talk are available here

Prerequisites

You need the following installed to run the demo:

  • .NET 9.0
  • Docker Desktop or a local Docker installation
  • An IDE or text editor, such as:
    • Visual Studio (recommended)
    • Visual Studio Code
    • JetBrains Rider

For full instructions on setting up the toolingd, please refere to the documentation in the references.

Optional - Aspire CLI

The Aspire CLI is a command line tool that can be used to manage .NET Aspire applications. It is not required to run the demo, but is helpful in the demo. To install

dotnet tool install --global aspire.cli --prerelease

The Aspire CLI lets you create, extend and run Aspire applocations without a dependancy on .NET.

Aspire CLI Dashboard for a running app

Running the demo

The demo in this site has 2 parts, each of which is in 2 halves:

Basic Aspire Integration

1a-Basic-API - A standalone API and blazor app, the exercise is to hook it up with .NET Aspire. To complete this exercise, please go through the steps in 1b-API-Aspire/Readme.md

1b-API-Aspire - The same API and blazor app, but now hooked up with .NET Aspire, so to see it running you can run the project in Visual Studio by opening the solution, or by running the following

dotnet run --project ./1b-API-Aspire/apphost/apphost.csproj --launch-profile "http"

Converting Docker Compose to Aspire

This is a more complex example, where a larger application is configured to use Docker Compose, which is then adapted to use .NET Aspire.

2a-Docker-Compose-Demo - A Docker Compose application that runs a web app, an API, a SQL Server database and a RabbitMQ message broker.

2b-Aspire-Demo - The same application, but now configured to use .NET Aspire. You will need to

References

Demos

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published