From 1bd10b9de2ffb64520f6bfafd67cdc7f656cc067 Mon Sep 17 00:00:00 2001 From: Alex Wolf Date: Fri, 17 May 2024 10:05:22 -0400 Subject: [PATCH 1/5] Updated init steps and up workflow --- .../sql-server-component-deployment.md | 29 ++------------- docs/deployment/azure/aca-deployment.md | 8 +---- .../azure/includes/azd-up-workflow.md | 36 +++++++++++++++++++ .../azure/includes/init-workflow.md | 22 +----------- 4 files changed, 40 insertions(+), 55 deletions(-) create mode 100644 docs/deployment/azure/includes/azd-up-workflow.md diff --git a/docs/database/sql-server-component-deployment.md b/docs/database/sql-server-component-deployment.md index a5e136b921..39bdd7fe13 100644 --- a/docs/database/sql-server-component-deployment.md +++ b/docs/database/sql-server-component-deployment.md @@ -111,34 +111,9 @@ The preceding code adds a SQL Server Container resource to your app and configur Tools such as the [Azure Developer CLI](/azure/developer/azure-developer-cli/overview) (`azd`) support .NET Aspire SQL Server component configurations to streamline deployments. `azd` consumes these settings and provisions properly configured resources for you. -> [!NOTE] -> You can also use the [Azure CLI](/dotnet/aspire/deployment/azure/aca-deployment?branch=pr-en-us-532&tabs=visual-studio%2Clinux%2Cpowershell&pivots=azure-cli) or [Bicep](/dotnet/aspire/deployment/azure/aca-deployment?branch=pr-en-us-532&tabs=visual-studio%2Clinux%2Cpowershell&pivots=azure-bicep) to provision and deploy .NET Aspire app resources. These options require more manual steps, but provide more granular control over your deployments. .NET Aspire apps can also connect to databases hosted on other services through manual configurations. - -1. Open a terminal window in the root of your .NET Aspire project. - -1. Run the `azd init` command to initialize the project with `azd`. - - ```azdeveloper - azd init - ``` - -1. When prompted for an environment name, enter *docs-aspiresql*. - -1. Run the `azd up` command to begin the deployment process: - - ```azdeveloper - azd up - ``` - -1. When prompted, choose to expose the **webfrontend** service to the internet. - -1. Select the Azure subscription that should host your app resources. - -1. Select the Azure location to use. - - The Azure Developer CLI provisions and deploys your app resources. The process may take a few minutes to complete. +[!INCLUDE [init-workflow](../deployment/azure/includes/init-workflow.md)] - [!INCLUDE [azd-up-output](../deployment/azure/includes/azd-up-output.md)] +[!INCLUDE [azd-up-workflow](../deployment/azure/includes/azd-up-workflow.md)] 1. When the deployment finishes, click the resource group link in the output to view the created resources in the Azure portal. diff --git a/docs/deployment/azure/aca-deployment.md b/docs/deployment/azure/aca-deployment.md index 374a7e6312..1efaea222b 100644 --- a/docs/deployment/azure/aca-deployment.md +++ b/docs/deployment/azure/aca-deployment.md @@ -35,13 +35,7 @@ The process for installing `azd` varies based on your operating system, but it i ## Deploy the app -Once `azd` is initialized, the provisioning and deployment process can be executed as a single command from the _AppHost_ project directory, [azd up](/azure/developer/azure-developer-cli/reference#azd-up). - -[!INCLUDE [azd-up-output](includes/azd-up-output.md)] - -First, the projects will be packaged into containers during the `azd package` phase, followed by the `azd provision` phase during which all of the Azure resources the app will need are provisioned. - -Once `provision` is complete, `azd deploy` will take place. During this phase, the projects are pushed as containers into an Azure Container Registry instance, and then used to create new revisions of Azure Container Apps in which the code will be hosted. +[!INCLUDE [azd-up-workflow](includes/azd-up-workflow.md)] At this point the app has been deployed and configured, and you can open the Azure portal and explore the resources. diff --git a/docs/deployment/azure/includes/azd-up-workflow.md b/docs/deployment/azure/includes/azd-up-workflow.md new file mode 100644 index 0000000000..71754459fc --- /dev/null +++ b/docs/deployment/azure/includes/azd-up-workflow.md @@ -0,0 +1,36 @@ +## Provision and deploy the template + +1. Once `azd` is initialized, the provisioning and deployment process can be executed as a single command from the _AppHost_ project directory, [azd up](/azure/developer/azure-developer-cli/reference#azd-up): + +```azdeveloper +azd up +``` + +1. Select the subscription you'd like to deploy to from the list of available options: + +```output +Select an Azure Subscription to use: [Use arrows to move, type to filter] + 1. SampleSubscription01 (xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx) + 2. SamepleSubscription02 (xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx) +``` + +1. Select the desired Azure location to use from the list of available options: + +```output +Select an Azure location to use: [Use arrows to move, type to filter] + 41. (South America) Brazil Southeast (brazilsoutheast) + 42. (US) Central US (centralus) + 43. (US) East US (eastus) +> 44. (US) East US 2 (eastus2) + 45. (US) East US STG (eastusstg) + 46. (US) North Central US (northcentralus) + 47. (US) South Central US (southcentralus) +``` + +After you make your selections, `azd` executes the provisioning and deployment process. + +[!INCLUDE [azd-up-output](includes/azd-up-output.md)] + +First, the projects will be packaged into containers during the `azd package` phase, followed by the `azd provision` phase during which all of the Azure resources the app will need are provisioned. + +Once `provision` is complete, `azd deploy` will take place. During this phase, the projects are pushed as containers into an Azure Container Registry instance, and then used to create new revisions of Azure Container Apps in which the code will be hosted. diff --git a/docs/deployment/azure/includes/init-workflow.md b/docs/deployment/azure/includes/init-workflow.md index cf2cd6fd59..e79dcba26f 100644 --- a/docs/deployment/azure/includes/init-workflow.md +++ b/docs/deployment/azure/includes/init-workflow.md @@ -10,16 +10,6 @@ For more information on the `azd init` command, see [azd init](/azure/developer/azure-developer-cli/reference#azd-init). -1. If this is the first time you've initialized the app, `azd` prompts you for the environment name: - - ```azdeveloper - Initializing an app to run on Azure (azd init) - - ? Enter a new environment name: [? for help] - ``` - - Enter the desired environment name to continue. For more information on managing environments with `azd`, see [azd env](/azure/developer/azure-developer-cli/reference#azd-env). - 1. Select **Use code in the current directory** when `azd` prompts you with two app initialization options. ```Output @@ -43,17 +33,7 @@ Cancel and exit ``` -1. `azd` presents each of the projects in the .NET Aspire solution and prompts you to identify which to deploy with HTTP ingress open publicly to all internet traffic. Select only the `webfrontend` (using the and Space keys), since you want the API to be private to the Azure Container Apps environment and *not* available publicly. - - ```Output - ? Select an option Confirm and continue initializing my app - By default, a service can only be reached from inside the Azure Container Apps environment it is running in. Selecting a service here will also allow it to be reached from the Internet. - ? Select which services to expose to the Internet [Use arrows to move, space to select, to all, to none, type to filter] - [ ] apiservice - > [x] webfrontend - ``` - -1. Finally, specify the the environment name, which is used to name provisioned resources in Azure and managing different environments such as `dev` and `prod`. +1. Enter an environment name, which is used to name provisioned resources in Azure and managing different environments such as `dev` and `prod`. ```Output Generating files to run your app on Azure: From 02f7de7aff9f3067bb35fe794f1be69b10458eaf Mon Sep 17 00:00:00 2001 From: Alex Wolf Date: Fri, 17 May 2024 10:08:58 -0400 Subject: [PATCH 2/5] fix include --- docs/deployment/azure/includes/azd-up-workflow.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deployment/azure/includes/azd-up-workflow.md b/docs/deployment/azure/includes/azd-up-workflow.md index 71754459fc..00d454eff4 100644 --- a/docs/deployment/azure/includes/azd-up-workflow.md +++ b/docs/deployment/azure/includes/azd-up-workflow.md @@ -29,7 +29,7 @@ Select an Azure location to use: [Use arrows to move, type to filter] After you make your selections, `azd` executes the provisioning and deployment process. -[!INCLUDE [azd-up-output](includes/azd-up-output.md)] +[!INCLUDE [azd-up-output](azd-up-output.md)] First, the projects will be packaged into containers during the `azd package` phase, followed by the `azd provision` phase during which all of the Azure resources the app will need are provisioned. From c06034c417d72111e40e9a75d50747463c9da0be Mon Sep 17 00:00:00 2001 From: Alex Wolf Date: Fri, 17 May 2024 10:20:41 -0400 Subject: [PATCH 3/5] refactor flow --- .../sql-server-component-deployment.md | 2 - docs/deployment/azure/aca-deployment.md | 2 - .../azure/includes/azd-up-workflow.md | 46 ++++++++++--------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/docs/database/sql-server-component-deployment.md b/docs/database/sql-server-component-deployment.md index 39bdd7fe13..9537e95665 100644 --- a/docs/database/sql-server-component-deployment.md +++ b/docs/database/sql-server-component-deployment.md @@ -115,8 +115,6 @@ Tools such as the [Azure Developer CLI](/azure/developer/azure-developer-cli/ove [!INCLUDE [azd-up-workflow](../deployment/azure/includes/azd-up-workflow.md)] -1. When the deployment finishes, click the resource group link in the output to view the created resources in the Azure portal. - ## [Azure SQL Database](#tab/azure-sql) The deployment process provisioned an Azure SQL Database resource due to the **.AppHost** configuration you provided. diff --git a/docs/deployment/azure/aca-deployment.md b/docs/deployment/azure/aca-deployment.md index 1efaea222b..a09c37c772 100644 --- a/docs/deployment/azure/aca-deployment.md +++ b/docs/deployment/azure/aca-deployment.md @@ -37,8 +37,6 @@ The process for installing `azd` varies based on your operating system, but it i [!INCLUDE [azd-up-workflow](includes/azd-up-workflow.md)] -At this point the app has been deployed and configured, and you can open the Azure portal and explore the resources. - [!INCLUDE [test-deployed-app](includes/test-deployed-app.md)] [!INCLUDE [azd-dashboard](includes/azd-dashboard.md)] diff --git a/docs/deployment/azure/includes/azd-up-workflow.md b/docs/deployment/azure/includes/azd-up-workflow.md index 00d454eff4..76020794c8 100644 --- a/docs/deployment/azure/includes/azd-up-workflow.md +++ b/docs/deployment/azure/includes/azd-up-workflow.md @@ -1,36 +1,40 @@ -## Provision and deploy the template +## Deploy the template 1. Once `azd` is initialized, the provisioning and deployment process can be executed as a single command from the _AppHost_ project directory, [azd up](/azure/developer/azure-developer-cli/reference#azd-up): -```azdeveloper -azd up -``` + ```azdeveloper + azd up + ``` 1. Select the subscription you'd like to deploy to from the list of available options: -```output -Select an Azure Subscription to use: [Use arrows to move, type to filter] - 1. SampleSubscription01 (xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx) - 2. SamepleSubscription02 (xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx) -``` + ```output + Select an Azure Subscription to use: [Use arrows to move, type to filter] + 1. SampleSubscription01 (xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx) + 2. SamepleSubscription02 (xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx) + ``` 1. Select the desired Azure location to use from the list of available options: -```output -Select an Azure location to use: [Use arrows to move, type to filter] - 41. (South America) Brazil Southeast (brazilsoutheast) - 42. (US) Central US (centralus) - 43. (US) East US (eastus) -> 44. (US) East US 2 (eastus2) - 45. (US) East US STG (eastusstg) - 46. (US) North Central US (northcentralus) - 47. (US) South Central US (southcentralus) -``` + ```output + Select an Azure location to use: [Use arrows to move, type to filter] + 41. (South America) Brazil Southeast (brazilsoutheast) + 42. (US) Central US (centralus) + 43. (US) East US (eastus) + > 44. (US) East US 2 (eastus2) + 45. (US) East US STG (eastusstg) + 46. (US) North Central US (northcentralus) + 47. (US) South Central US (southcentralus) + ``` After you make your selections, `azd` executes the provisioning and deployment process. [!INCLUDE [azd-up-output](azd-up-output.md)] -First, the projects will be packaged into containers during the `azd package` phase, followed by the `azd provision` phase during which all of the Azure resources the app will need are provisioned. +The `azd up` command acts as wrapper for the following individual `azd` commands to provision and deploy your resources in a single step: -Once `provision` is complete, `azd deploy` will take place. During this phase, the projects are pushed as containers into an Azure Container Registry instance, and then used to create new revisions of Azure Container Apps in which the code will be hosted. +1. `azd package`: The app projects and their dependencies are packaged into containers. +1. `azd provision`: The Azure resources the app will need are provisioned. +1. `azd deploy`: The projects are pushed as containers into an Azure Container Registry instance, and then used to create new revisions of Azure Container Apps in which the code will be hosted. + +When the `azd up` stages complete, your app will be available on Azure, and you can open the Azure portal to explore the resources. `azd` also outputs URLs to access the deployed apps directly. From 73b0208e4d235a4b6574b585486e6164b76178f4 Mon Sep 17 00:00:00 2001 From: Alex Wolf Date: Fri, 17 May 2024 10:23:57 -0400 Subject: [PATCH 4/5] add links --- docs/deployment/azure/includes/azd-up-workflow.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/deployment/azure/includes/azd-up-workflow.md b/docs/deployment/azure/includes/azd-up-workflow.md index 76020794c8..3bdb0fde4b 100644 --- a/docs/deployment/azure/includes/azd-up-workflow.md +++ b/docs/deployment/azure/includes/azd-up-workflow.md @@ -1,6 +1,6 @@ ## Deploy the template -1. Once `azd` is initialized, the provisioning and deployment process can be executed as a single command from the _AppHost_ project directory, [azd up](/azure/developer/azure-developer-cli/reference#azd-up): +1. Once an `azd` template is initialized, the provisioning and deployment process can be executed as a single command from the _AppHost_ project directory using [azd up](/azure/developer/azure-developer-cli/reference#azd-up): ```azdeveloper azd up @@ -18,11 +18,9 @@ ```output Select an Azure location to use: [Use arrows to move, type to filter] - 41. (South America) Brazil Southeast (brazilsoutheast) 42. (US) Central US (centralus) 43. (US) East US (eastus) > 44. (US) East US 2 (eastus2) - 45. (US) East US STG (eastusstg) 46. (US) North Central US (northcentralus) 47. (US) South Central US (southcentralus) ``` @@ -33,8 +31,8 @@ After you make your selections, `azd` executes the provisioning and deployment p The `azd up` command acts as wrapper for the following individual `azd` commands to provision and deploy your resources in a single step: -1. `azd package`: The app projects and their dependencies are packaged into containers. -1. `azd provision`: The Azure resources the app will need are provisioned. -1. `azd deploy`: The projects are pushed as containers into an Azure Container Registry instance, and then used to create new revisions of Azure Container Apps in which the code will be hosted. +1. [`azd package`](/azure/developer/azure-developer-cli/reference#azd-package): The app projects and their dependencies are packaged into containers. +1. [`azd provision`](/azure/developer/azure-developer-cli/reference#azd-provision): The Azure resources the app will need are provisioned. +1. [`azd deploy`](/azure/developer/azure-developer-cli/reference#azd-deploy): The projects are pushed as containers into an Azure Container Registry instance, and then used to create new revisions of Azure Container Apps in which the code will be hosted. When the `azd up` stages complete, your app will be available on Azure, and you can open the Azure portal to explore the resources. `azd` also outputs URLs to access the deployed apps directly. From 7569d0827ac79c0a66fdd11929aa09f9bd86e9a9 Mon Sep 17 00:00:00 2001 From: Alex Wolf Date: Fri, 17 May 2024 10:28:26 -0400 Subject: [PATCH 5/5] remove duplicate header --- docs/deployment/azure/aca-deployment.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/deployment/azure/aca-deployment.md b/docs/deployment/azure/aca-deployment.md index a09c37c772..5cef367796 100644 --- a/docs/deployment/azure/aca-deployment.md +++ b/docs/deployment/azure/aca-deployment.md @@ -33,8 +33,6 @@ The process for installing `azd` varies based on your operating system, but it i [!INCLUDE [init-workflow](includes/init-workflow.md)] -## Deploy the app - [!INCLUDE [azd-up-workflow](includes/azd-up-workflow.md)] [!INCLUDE [test-deployed-app](includes/test-deployed-app.md)]