Get the source code for this video for FREE → the-dotnet-weekly.ck.page/docker-aspire Want to master Clean Architecture? Go here: bit.ly/3PupkOJ Want to unlock Modular Monoliths? Go here: bit.ly/3SXlzSt
Great video. Love Aspire. There a couple of further thins to consider e.g. what if you used DB first instead of cod first for EF Core.... Another thing I struggle with was using the neat Aspire dashboard not only when developing but in a deployed hosting e.g. on Azure. Sure there are ways to access the Open Telemetry with Azure itself, but I just love the integrated approach the Aspire Dashboard provides. Maybe another interesting topic to cover is how to handle secrets with e.g. Azure Key vault and some of the edge cases (e.g. restriction in how to name stuff).
Hey Milan, thanks for the video! It would be really helpful if you could explain the differences between Docker and Aspire. Also, could you highlight the advantages of Aspire over Docker? That way, we can make a more informed choice based on our requirements. Thanks!
Deployed a few demo apps with Aspire, and so far it's been smooth sailing. The deployment is a bit messy, IMO. You'd need to rewrite it to your CI to simplify it.
When deploying to Azure, it runs behind a reverse proxy that also performs Authentication. So, only users with a valid account can access the Aspire dashboard. If deploying it yourself, you just place a reverse proxy in front of the UI that does an OAuth redirect if the current user is unauthenticated.
is this for dotnet compatible projects? what if i have a web app backend in java, frontend angular. can i setup it to run in dockerfile and then plugin to aspire? possible to debug docker containers from aspire?
Yes, here are a few samples: - learn.microsoft.com/en-us/dotnet/aspire/app-host/withdockerfile - learn.microsoft.com/en-us/dotnet/aspire/get-started/build-aspire-apps-with-nodejs - learn.microsoft.com/en-us/dotnet/aspire/get-started/build-aspire-apps-with-python
Hi Milan thanks for the great video, I have a question Can we use Keycloak with Aspire? It is confusing me how to configurate the AppHost with the docker Keycloak container or even any external docker container!
Very cool @MilanJovanovicTech! You mentioned nginx at the beginning of the video...are there migration things to consider from that standpoint when attempting to deploy an Aspire setup to a Linux server?
We have several legacy services that use hardcoded service.env for urls, it possible to set up something similar with aspire? Effectively setting the service name the same way you would with docker compose?
@@pavelromashuk237 Video coming up soon! But it's as simple as: > azd init > azd up It'll create a resource group, and deploy each service in Azure Container Apps.
Good advice from others, if you want some control over the resources created (resource naming in Azure), you can use azd infra synth to generate and modify the bicep templates used by azd. Another heads up is that azd up wipes custom domains you set in the Azure portal, you have to opt into a config setting to keep them.
@@MilanJovanovicTech how can we deploy it to our custom vnet to apply different other services to the network ? is it possible to deploy aspire app into custom vnet right now ?
Could you give ideas how to use aspire dashboard on deployed applications? I know this is meant for local development and everything can be acceessed in azure or aws, but I just like the way it looks and presents everything. Lastly, how to properly set up everything, so that "Endpoints" contain the actual application endpoints (to swagger and whatever) for me they are usually empty and when I try to add them using WithHttpEndpoint, they just act weird
Depends on what you mean by "Support", but it can definitely start, stop, and restart the apps, show telemetry, add environment variables, and add custom commands to next.js applications. We use Aspire on the project I'm working on atm and that's using next.js ( unfortunately..)
Aspire mixes application with devops. Fine for one man projects but I don't see how this is a good thing for large projects with lots of services running in kubernetes for instance. And, if it does not scale, why not learn "the correct way" from the beginning?
No, Aspire 9 will be compatible with both .NET 8 and .NET 9 and you are able to orchestrate anything since it can use docker or podman. Either use images from docker hub or any other container registry, or simply write your own dockerfiles. Sure, configuration gets more complicated than with aspire hosting packages, but in the end you can write your own.
@@IAmFeO2x no, the aspire tooling will stop supporting net 8 when the net 9 version is complete. They don’t care for backwards compatibility. It’s not production ready.
Get the source code for this video for FREE → the-dotnet-weekly.ck.page/docker-aspire
Want to master Clean Architecture? Go here: bit.ly/3PupkOJ
Want to unlock Modular Monoliths? Go here: bit.ly/3SXlzSt
Great video. Love Aspire. There a couple of further thins to consider e.g. what if you used DB first instead of cod first for EF Core.... Another thing I struggle with was using the neat Aspire dashboard not only when developing but in a deployed hosting e.g. on Azure. Sure there are ways to access the Open Telemetry with Azure itself, but I just love the integrated approach the Aspire Dashboard provides. Maybe another interesting topic to cover is how to handle secrets with e.g. Azure Key vault and some of the edge cases (e.g. restriction in how to name stuff).
@@nothingisreal6345 Nowadays when you deploy Aspire with AZD you get the Aspire Dashboard out of the box
Fantastic video, enjoyed watching it.
Well done
Many thanks!
Hey Milan, thanks for the video! It would be really helpful if you could explain the differences between Docker and Aspire. Also, could you highlight the advantages of Aspire over Docker? That way, we can make a more informed choice based on our requirements. Thanks!
Start here: learn.microsoft.com/en-us/dotnet/aspire/
Wonderful video. I wish you could further show us how this could extend to deployment to Azure. Stay Awesome!
Deployment video coming soon!
Great video. Have you used Aspire on any projects in production environment? what were the challenges in your opinion?
Deployed a few demo apps with Aspire, and so far it's been smooth sailing. The deployment is a bit messy, IMO. You'd need to rewrite it to your CI to simplify it.
I would love to see an exemple with multi repo setup
Can do
Gracias, excelente contenido.
You're most welcome!
the missing part on this video is how do you secure the aspire dashboard from anyone that knows your aspire url??
When deploying to Azure, it runs behind a reverse proxy that also performs Authentication. So, only users with a valid account can access the Aspire dashboard.
If deploying it yourself, you just place a reverse proxy in front of the UI that does an OAuth redirect if the current user is unauthenticated.
Milan, I'd love you to make a video about deploying Aspire apps to on-premise Kubernetes cluster.
Recorded an Azure ACA deployment video, coming out soon. ACA is basically a managed Kubernetes, if you will.
How would one go about developing and running a single service locally, how would that go with the way you configured the connection strings?
You can just plug the connection strings as ENV vars with the correct name
is this for dotnet compatible projects? what if i have a web app backend in java, frontend angular. can i setup it to run in dockerfile and then plugin to aspire? possible to debug docker containers from aspire?
Yes, here are a few samples:
- learn.microsoft.com/en-us/dotnet/aspire/app-host/withdockerfile
- learn.microsoft.com/en-us/dotnet/aspire/get-started/build-aspire-apps-with-nodejs
- learn.microsoft.com/en-us/dotnet/aspire/get-started/build-aspire-apps-with-python
Hi Milan thanks for the great video, I have a question Can we use Keycloak with Aspire? It is confusing me how to configurate the AppHost with the docker Keycloak container or even any external docker container!
Yes, it's all explained nicely in the docs. Works great.
Very cool @MilanJovanovicTech! You mentioned nginx at the beginning of the video...are there migration things to consider from that standpoint when attempting to deploy an Aspire setup to a Linux server?
No, this was just me trying to run the Blazor WA app in docker-compose. It'll run "out of the box" with Aspire. Not sure about the deployment though.
We have several legacy services that use hardcoded service.env for urls, it possible to set up something similar with aspire? Effectively setting the service name the same way you would with docker compose?
Yes, grab the MSFT service discovery nuget: learn.microsoft.com/en-us/dotnet/core/extensions/service-discovery?tabs=dotnet-cli
Nice! How can i deploy an aspire project? Like to Openshift or Azure.
Recorded a video, releasing soon!
TL;DR - Use the Azure Developer CLI
- azd init // sets up some boilerplate
- azd up // deploys the app
Is this deployable to AWS ? Or is Azure only?
@@ahmedabdulla3330 Azure for now. Unsure about AWS support 🤔
What to do with deployments to containers in clouds? Is there workaround?
@@pavelromashuk237 Video coming up soon!
But it's as simple as:
> azd init
> azd up
It'll create a resource group, and deploy each service in Azure Container Apps.
In VS there is a publish. Works like a charm
@@MilanJovanovicTech Nice. Thanks
Good advice from others, if you want some control over the resources created (resource naming in Azure), you can use azd infra synth to generate and modify the bicep templates used by azd.
Another heads up is that azd up wipes custom domains you set in the Azure portal, you have to opt into a config setting to keep them.
@@MilanJovanovicTech how can we deploy it to our custom vnet to apply different other services to the network ? is it possible to deploy aspire app into custom vnet right now ?
Hey @Milan, thanks for demonstrating migration, Just to confirm, are you still running postgres and rabbitMQ inside docker.
I moved Postgres to Azure Postgres
Damn, it is awesome!
Yeah, pretty nice 😁
How use EF and Dapper in one Repository? It’s good practice ? Please make video. 😅
You can write Dapper queries on the EF connection
Could you give ideas how to use aspire dashboard on deployed applications? I know this is meant for local development and everything can be acceessed in azure or aws, but I just like the way it looks and presents everything. Lastly, how to properly set up everything, so that "Endpoints" contain the actual application endpoints (to swagger and whatever) for me they are usually empty and when I try to add them using WithHttpEndpoint, they just act weird
@@vyteniskajackas7579 Aspire deployment with AZD already sets up the Aspire Dashboard in prod :) Video coming up.
9:20 I had this error with Blazor WASM and Aspire setup. That's why I chose Docker. I think I will give .NET Aspire another chance in the future.
Just drag n' drop 😁
Love it.
Aspire 9 just around the corner 😁
if i want publish project Aspire on my vps ?
A bit more complicated. We can generate Bicep files and customize them for deployment.
@@MilanJovanovicTech So I wonder what's the point of using it only to develop on your own computer?
Can you please make a video on using .NET Aspire as test container for integration testing?
Sure
@ thank you
Pretty cool video
Thanks!
Awesome @milan
Thanks!
Does Aspire support Node frontend like Next.js ?.
Yep. There is a Nodejs hosting package, and a couple examples in the aspire samples of its use on the aspire-samples github repo.
Depends on what you mean by "Support", but it can definitely start, stop, and restart the apps, show telemetry, add environment variables, and add custom commands to next.js applications. We use Aspire on the project I'm working on atm and that's using next.js ( unfortunately..)
I think there's a community package that adds support for that
What about deployment 🤔
Releasing a video on this very soon!
Aspire mixes application with devops. Fine for one man projects but I don't see how this is a good thing for large projects with lots of services running in kubernetes for instance. And, if it does not scale, why not learn "the correct way" from the beginning?
For large projects, you can use Aspire for the local part and deploy on your own?
90% (maybe more) of teams don't need kubernetes
I trust Milan, not Microsoft.
Trust but verify!
Get the source code for this video for FREE ,Unable to run?
It works fine, what you talking about?
Aspire is very very unstable, and is very likely only going to support dotnet 9, which no serious development team will run in production.
No, Aspire 9 will be compatible with both .NET 8 and .NET 9 and you are able to orchestrate anything since it can use docker or podman. Either use images from docker hub or any other container registry, or simply write your own dockerfiles. Sure, configuration gets more complicated than with aspire hosting packages, but in the end you can write your own.
@@IAmFeO2x no, the aspire tooling will stop supporting net 8 when the net 9 version is complete.
They don’t care for backwards compatibility. It’s not production ready.
Aspire 9 will work on .NET 8. Where are you getting this from?
Why wouldn't you run .NET 9 in production? Just one step away from .NET 10...
@@MilanJovanovicTech anyone that runs an interim version of .net in production is asking for trouble.
@@MiningForPies What kind of trouble?