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!
Excellent demo @MilanJovanovicTech! It would be nice to see how all this translates to a production environment. Can you please make a video about that?
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.
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.
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?
@@MilanJovanovicTech sorry for the confusing question, i just meant to ask if u were doing migration on app start up and persiting them with some data volume or if u structured them in any other way
That's where Aspire becomes a bit tricky to manage, but technically you should be able to reference projects from different solutions and Aspire can run them
@@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 ?
I understand, and it seems interesting for a development environment. However, it appears quite limited for a production environment.@@MilanJovanovicTech
@@MilanJovanovicTech like not running with having the code side by side. for example in the bin folder double click the *.AppHost.exe and run it. when i double click it. it doesnt work
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
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
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?
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?
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..)
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
Exactly the video I needed
Awesome!
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
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/
Fantastic video, enjoyed watching it.
Well done
Many thanks!
Excellent demo @MilanJovanovicTech! It would be nice to see how all this translates to a production environment. Can you please make a video about that?
Working on it
Great intro! I'm still trying to understand what it looks like when you deploy to production from here.
Here's the video: th-cam.com/video/7FbiDviUsNU/w-d-xo.html
I would love to see an exemple with multi repo setup
Can do
it would be interesting to see integration between aspire and aws services like lambda serverless api etc
Will see to make something
Wonderful video. I wish you could further show us how this could extend to deployment to Azure. Stay Awesome!
Deployment video coming soon!
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.
Damn, it is awesome!
Yeah, pretty nice 😁
Gracias, excelente contenido.
You're most welcome!
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.
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 😁
Can you please make a video on using .NET Aspire as test container for integration testing?
Sure
@ thank you
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.
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
hello milan nice video :) i have one question, how have u done the psql migrations?
Migration as in... moving the data?
@@MilanJovanovicTech sorry for the confusing question, i just meant to ask if u were doing migration on app start up and persiting them with some data volume or if u structured them in any other way
How about different ways to deploy Aspire Apps. K8s, MiniKube, Aspir8
I covered a few in the next video
Does it mean aspire replaces docker compose. Do i still need docker desktop
You still need Docker
How do you set up Aspire if you have a couple of different Visual Studio solutions with different clean archtiecture projects in each solution?
That's where Aspire becomes a bit tricky to manage, but technically you should be able to reference projects from different solutions and Aspire can run them
How use EF and Dapper in one Repository? It’s good practice ? Please make video. 😅
You can write Dapper queries on the EF connection
Hey @Milan, thanks for demonstrating migration, Just to confirm, are you still running postgres and rabbitMQ inside docker.
I moved Postgres to Azure Postgres
Awesome @milan
Thanks!
Pretty cool video
Thanks!
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 ?
How does it work with kubernetes?
It doesn't, for now. ACA is like a managed Kubernetes though
I understand, and it seems interesting for a development environment. However, it appears quite limited for a production environment.@@MilanJovanovicTech
Is this deployable to AWS ? Or is Azure only?
@@ahmedabdulla3330 Azure for now. Unsure about AWS support 🤔
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
in the bin folder there's an *.AppHost.exe. is there anyway to "double click that" to run it local?
This is running locally. What are you trying to achieve?
@@MilanJovanovicTech like not running with having the code side by side. for example in the bin folder double click the *.AppHost.exe and run it. when i double click it. it doesnt work
What about deployment 🤔
Releasing a video on this very soon!
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
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.
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
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
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
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?
Как это выгрузить на сервер? 😅
Овако: th-cam.com/video/7FbiDviUsNU/w-d-xo.html
@MilanJovanovicTech
А есть вариант что-то кроме Azure?
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?