Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local vs Cloud deployment #1736

Closed
gregpakes opened this issue Jan 20, 2024 · 2 comments
Closed

Local vs Cloud deployment #1736

gregpakes opened this issue Jan 20, 2024 · 2 comments
Assignees
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Comments

@gregpakes
Copy link

gregpakes commented Jan 20, 2024

I think I must be confused about something. I am interested in Aspire due to the Orchestration piece, particularly during development.

I love the single line orchestration to spin up a new container. The issue is that I don't see how this translates to production.

For example, SQL Server.:

In AppHost, I have the following (taken from the examples):

// if container fails to initialize, you need to allow the directory to be mounted in docker settings - File Sharing
var sql = builder.AddSqlServerContainer("sql",sqlpassword, 60143)
// Mount the init scripts directory into the container.
.WithVolumeMount("./sqlserverconfig", "/usr/config", VolumeMountType.Bind)
// Mount the SQL scripts directory into the container so that the init scripts run.
.WithVolumeMount("../aspire.ApiService/data/sqlserver", "/docker-entrypoint-initdb.d", VolumeMountType.Bind)
// This persists the sql data - but is a dev only setting - hmmm
.WithVolumeMount("./sqldata", "/var/opt/mssql/data", VolumeMountType.Bind)
// Run the custom entrypoint script on startup.
.WithArgs("/usr/config/entrypoint.sh")
.AddDatabase("sqldata");

This config has very specific config for a developer environment.

In production, I want to use Azure SQL. I don't see how I get from here to Azure SQL?

This is fantastic for the developer experience, but I'm failing to see the production mapping. Am I missing something?

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Jan 20, 2024
@mitchdenny
Copy link
Member

We are still working on the end to end, but our intention is that when you deploy an Aspire application that takes a dependency on SQL Server via the AddSqlServer(...) method that we will translate that to an Azure SQL Database resource automatically. We are working on some of the details like how do we provide a level of customization for that eventual resource which is deployed.

We've already got some of this working for existing resources - Azure Storage for example, when deployed via AZD will provision storage accounts and inject connection strings.

We are tracking issues over on the AZD side for the end to end for Azure-focused cloud deployments.

Azure/azure-dev#3020

@davidfowl
Copy link
Member

Closing as dupe of #1757

@github-actions github-actions bot locked and limited conversation to collaborators Apr 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Projects
None yet
Development

No branches or pull requests

3 participants