News for hackers. Stuff that matters.
Re:General Availability of .NET Aspire: Simplifying .NET Clo... by tomalaci on Tuesday May 21, 2024 @01:10PM (#40431098)
Am I getting this right? With this you can actually write infrastructure as proper code? No more YAML?

If so I hope they succeed to make it popular so it spreads to other languages as well.

Re:General Availability of .NET Aspire: Simplifying .NET Clo... by noworriesnate on Tuesday May 21, 2024 @01:25PM (#40431286)
Infrastructure as code in C# is already supported by Pulumi[1]. However, developing anything significant requires a lot of copying values from one part of the stack to another, lots of magic strings and lots of combinations of parameters that don't work. Plus sometimes you choose a combination of parameters that works until your cloud provider upgrades Kubernetes or whatever and now that specific version of k8s isn't supported with the parameters you chose.

You have no control over your cloud provider's updates, there's TONS of trial-and-error in developing the stack, and often error messages are extremely unhelpful. Your cloud provider's UI is so much easier on the initial setup vs. infrastructure as code.

Then there's TestContainer[2], which is infrastructure as code but only for tests. The syntax is a lot more natural, but it only runs Docker containers which are automatically destroyed when the tests are complete.

It looks like .NET Aspire is the best of both worlds: a simple syntax that deploys local resources (replacing docker-compose.yml dev files) AND it also supports deploying cloud resources. Which is really great! Only downside is you're tied into Azure.

[1] https://www.pulumi.com/docs/languages-sdks/dotnet/

[2] https://testcontainers.com/

Re:General Availability of .NET Aspire: Simplifying .NET Clo... by zihotki on Tuesday May 21, 2024 @04:04PM (#40433178)
Pulumni is a great example of a leaky abstraction. Even yaml is better in some regards.
Re:General Availability of .NET Aspire: Simplifying .NET Clo... by sbelskie on Tuesday May 21, 2024 @05:35PM (#40434281)
I don’t see anything about Aspire being Azure only. The docs specifically call out that it’s cloud agnostic, though Azure specific support appears to be a first class citizen.
Re:General Availability of .NET Aspire: Simplifying .NET Clo... by chokolad on Tuesday May 21, 2024 @01:16PM (#40431167)
Kinda. At the moment it only does local orchestration, basically running stuff on your workstation. Sorta like docker compose, but in C# + a really nice Open Telemetry dashboard. For deployment it creates a manifest, which can be used to generate kubernetes Yamls, or deploy to Azure using azd (https://learn.microsoft.com/en-us/azure/developer/azure-deve...).
Re:General Availability of .NET Aspire: Simplifying .NET Clo... by noworriesnate on Tuesday May 21, 2024 @01:27PM (#40431313)
Interesting. The kubernetes yaml generation would be a pain--I don't want to keep my database or S3 in k8s but I do want to manage it via IaC.

Edit: looks like the k8s export is a community-supported tool, not official MS. Which begs the question, could other cloud providers add support for .NET Aspire?

Re:General Availability of .NET Aspire: Simplifying .NET Clo... by chokolad on Tuesday May 21, 2024 @02:24PM (#40431966)
> Edit: looks like the k8s export is a community-supported tool, not official MS. Which begs the question, could other cloud providers add support for .NET Aspire?

Nothing stops them from doing it. The manifest is documented https://learn.microsoft.com/en-us/dotnet/aspire/deployment/m...

Re:General Availability of .NET Aspire: Simplifying .NET Clo... by yodon on Tuesday May 21, 2024 @04:09PM (#40433244)
Yes, Amazon is actively working to support Aspire for AWS.
Re:General Availability of .NET Aspire: Simplifying .NET Clo... by yodon on Tuesday May 21, 2024 @01:37PM (#40431399)
The associated aspir8 (aspirate) project handles deployment to k8s[0].

[0]https://github.com/prom3theu5/aspirational-manifests

Re:General Availability of .NET Aspire: Simplifying .NET Clo... by phillipcarter on Tuesday May 21, 2024 @01:18PM (#40431195)
FWIW Pulumi is the standard for infrastructure as proper code: https://www.pulumi.com/