Skip to content

Commit 90ae4b5

Browse files
authored
Merge pull request #288296 from Akhilesh-microsoft/ACA/deploy_visual_studio
[ACA: deploy-visual-studio]: resource-faq]: Verified the article, reviewed the content, and fixed all editorial issues. Updated some latest version related info and ms.date w.r.t freshness pass.
2 parents 29502f2 + 0b861ce commit 90ae4b5

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

articles/container-apps/deploy-visual-studio.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ author: alexwolfmsft
66
ms.author: alexwolf
77
ms.service: azure-container-apps
88
ms.topic: tutorial
9-
ms.date: 3/04/2022
9+
ms.date: 10/14/2024
1010
ms.custom: mode-ui, devx-track-dotnet
1111
---
1212

1313
# Tutorial: Deploy to Azure Container Apps using Visual Studio
1414

1515
Azure Container Apps enables you to run microservices and containerized applications on a serverless platform. With Container Apps, you enjoy the benefits of running containers while leaving behind the concerns of manually configuring cloud infrastructure and complex container orchestrators.
1616

17-
In this tutorial, you'll deploy a containerized ASP.NET Core 6.0 application to Azure Container Apps using Visual Studio. The steps below also apply to earlier versions of ASP.NET Core.
17+
In this tutorial, you deploy a containerized ASP.NET Core 8.0 application to Azure Container Apps using Visual Studio. The steps below also apply to earlier versions of ASP.NET Core.
1818

1919
## Prerequisites
2020

@@ -23,31 +23,31 @@ In this tutorial, you'll deploy a containerized ASP.NET Core 6.0 application to
2323

2424
## Create the project
2525

26-
Begin by creating the containerized ASP.NET Core application to deploy to Azure.
26+
Begin by creating the containerized ASP.NET Core application.
2727

28-
1) Inside Visual Studio, select **File** and then choose **New => Project**.
28+
1) In Visual Studio, select **File** and then choose **New => Project**.
2929

3030
2) In the dialog window, search for *ASP.NET*, and then choose **ASP.NET Core Web App** and select **Next**.
3131

3232
3) In the **Project Name** field, name the application *MyContainerApp* and then select **Next**.
3333

34-
4) On the **Additional Information** screen, make sure to select **Enable Docker**, and then make sure **Linux** is selected for the **Docker OS** setting. Azure Container Apps currently does not support Windows containers. This selection ensures the project template supports containerization by default. While enabled, the project uses a container as it is running or building.
34+
4) On the **Additional Information** screen, make sure to select **Enable Docker**, and then make sure **Linux** is selected for the **Docker OS** setting. Azure Container Apps currently doesn't support Windows containers. This selection ensures the project template supports containerization by default. While enabled, the project uses a container as it is running or building.
3535

3636
5) Click **Create** and Visual Studio creates and loads the project.
3737

3838
:::image type="content" source="media/visual-studio/container-apps-enable-docker.png" alt-text="A screenshot showing to enable docker.":::
3939

4040
## Deploy to Azure Container Apps
4141

42-
The application includes a Dockerfile because the Enable Docker setting was selected in the project template. Visual Studio uses the Dockerfile to build the container image that is run by Azure Container Apps.
42+
The application includes a Dockerfile because the project template had the *Enable Docker* setting selected. Visual Studio uses the Dockerfile to build the container image that the Azure Container Apps run.
4343

4444
Refer to [How Visual Studio builds containerized apps](/visualstudio/containers/container-build) if you'd like to learn more about the specifics of this process.
4545

46-
You are now ready to deploy to the application to Azure Containers Apps.
46+
You're now ready to deploy to the application to Azure Containers Apps.
4747

4848
### Create the resources
4949

50-
The Visual Studio publish dialogs will help you choose existing Azure resources, or create new ones to be used to deploy your applications to. It will also build the container image using the Dockerfile in the project, push this image to ACR, and finally deploy the new image to the container app selected.
50+
The publish dialog windows in Visual Studio help you choose existing Azure resources, or allow you to create new ones for deployment. This process also builds the container image, pushes the image to Azure Container Registry (ACR), and deploys the new container app image.
5151

5252
1) Right-click the **MyContainerApp** project node and select **Publish**.
5353

@@ -59,77 +59,77 @@ The Visual Studio publish dialogs will help you choose existing Azure resources,
5959

6060
:::image type="content" source="media/visual-studio/container-apps-publish-azure.png" alt-text="A screenshot showing Container Apps selected.":::
6161

62-
5) Next, create an Azure Container App to host the project. Select the **green plus icon** on the right to open the create dialog. In the *Create new* dialog, enter the following values:
62+
5) Next, create an Azure Container App to host the project. Select the **green plus icon** on the right to open the *Create new* dialog. In the *Create new* dialog, enter the following values:
6363

6464
- **Container App name**: Enter a name of `msdocscontainerapp`.
6565
- **Subscription name**: Choose the subscription where you would like to host your app.
66-
- **Resource group**: A resource group acts as a logical container to organize related resources in Azure. You can either select an existing resource group, or select **New** to create one with a name of your choosing, such as `msdocscontainerapps`.
67-
- **Container Apps Environment**: Container Apps Environment: Every container app must be part of a container app environment. An environment provides an isolated network for one or more container apps, making it possible for them to easily invoke each other. Click **New** to open the Create new dialog for your container app environment. Leave the default values and select **OK** to close the environment dialog.
68-
- **Container Name**: This is the friendly name of the container that will run for this container app. Use the name `msdocscontainer1` for this quickstart. A container app typically runs a single container, but there are times when having more than one container is needed. One such example is when a sidecar container is required to perform an activity such as specialized logging or communications.
66+
- **Resource group**: A resource group acts as a logical container to organize related resources in Azure. You can either select an existing resource group, or select **New** to create one with a name of your choosing, such as `msdocscontainerapps`.
67+
- **Container Apps Environment**: Container Apps Environment: Every container app must be part of a container app environment. An environment provides an isolated network for one or more container apps, making it possible for them to easily invoke each other. Click **New** to open the Create new dialog for your container app environment. Leave the default values and select **OK** to close the environment dialog.
68+
- **Container Name**: This is the friendly name of the container that runs for this container app. Use the name `msdocscontainer1` for this quickstart. A container app typically runs a single container, but there are times when having more than one container is needed. One such example is when a sidecar container is required to perform an activity such as specialized logging or communications.
6969

7070
:::image type="content" source="media/visual-studio/container-apps-create-new.png" alt-text="A screenshot showing how to create new Container Apps.":::
7171

72-
6) Select **Create** to finalize the creation or your container app. Visual Studio and Azure create the needed resources on your behalf. This process may take a couple minutes, so allow it to run to completion before moving on.
72+
6) Select **Create** to finalize the creation or your container app. Visual Studio and Azure create the needed resources on your behalf. This process may take a couple minutes, so allow it to run to completion before moving on.
7373

7474
7) Once the resources are created, choose **Next**.
7575

7676
:::image type="content" source="media/visual-studio/container-apps-select-resource.png" alt-text="A screenshot showing how to select the created resource.":::
7777

78-
8) On the **Registry** screen, you can either select an existing Registry if you have one, or create a new one. To create a new one, click the green **+** icon on the right. On the **Create new** registry screen, fill in the following values:
78+
8) On the **Registry** screen, you can either select an existing Registry if you have one, or create a new one. To create a new one, click the green **+** icon on the right. On the *Create new* registry screen, fill in the following values:
7979

8080
- **DNS prefix**: Enter a value of `msdocscontainerregistry` or a name of your choosing.
81-
- **Subscription Name**: Select the subscription you want to use - you may only have one to choose from.
81+
- **Subscription Name**: Select the subscription you want to use - you might only have one to choose from.
8282
- **Resource Group**: Choose the msdocs resource group you created previously.
8383
- **Sku**: Select **Standard**.
8484
- **Registry Location**: Select a region that is geographically close to you.
8585

8686
:::image type="content" source="media/visual-studio/container-apps-registry.png" alt-text="A screenshot showing how to create the container registry.":::
8787

88-
9) After you have populated these values, select **Create**. Visual Studio and Azure will take a moment to create the registry.
88+
9) Once you populate these values, select **Create**. Visual Studio and Azure take a moment to create the registry.
8989

90-
10) Once the container registry is created, make sure it is selected, and then choose **Finish**. Visual Studio will take a moment to create the publish profile. This publish profile is where VS stores the publish options and resources you chose so you can quickly publish again whenever you want. You can close the dialog once it finishes.
90+
10) Once the container registry is created, make sure it's selected, and then choose **Finish**. Visual Studio takes a moment to create the publish profile. This publish profile is where Visual Studio stores the publish options and resources you chose so you can quickly publish again whenever you want. You can close the dialog once it finishes.
9191

9292
:::image type="content" source="media/visual-studio/container-apps-choose-registry.png" alt-text="A screenshot showing how select the created registry.":::
9393

9494
### Publish the app using Visual Studio
9595

9696
While the resources and publishing profile are created, you still need to publish and deploy the app to Azure.
9797

98-
Choose **Publish** in the upper right of the publishing profile screen to deploy to the container app you created in Azure. This process may take a moment, so wait for it to complete.
98+
Choose **Publish** in the upper right of the publishing profile screen to deploy to the container app you created in Azure. This process might take a moment, so wait for it to complete.
9999

100100
:::image type="content" source="media/visual-studio/container-apps-publish.png" alt-text="A screenshot showing how to publish the app.":::
101101

102-
When the app finishes deploying, Visual Studio opens a browser to the URL of your deployed site. This page may initially display an error if all of the proper resources have not finished provisioning. You can continue to refresh the browser periodically to check if the deployment has fully completed.
102+
When the app finishes deploying, Visual Studio opens a browser to the URL of your deployed site. This page might initially display an error if all of the proper resources don't finish provisioning. You can continue to refresh the browser periodically to check if the deployment fully completes.
103103

104104
:::image type="content" source="media/visual-studio/container-apps-site.png" alt-text="A screenshot showing the published site.":::
105105

106106
### Publish the app using GitHub Actions
107107

108-
Container Apps can also be deployed using CI/CD through [GitHub actions](https://docs.github.com/en/actions), which are a powerful tool for automating, customizing, and executing development workflows directly through the GitHub repository of your project.
108+
Container Apps can also be deployed using CI/CD through [GitHub Actions](https://docs.github.com/en/actions). GitHub Actions is a powerful tool for automating, customizing, and executing development workflows directly through the GitHub repository of your project.
109109

110-
If Visual Studio detects the project you are publishing is hosted in GitHub, the publish flow presents an additional **Deployment type** step. This stage allows developers to choose whether to publish directly through Visual Studio using the steps shown earlier in the quickstart, or through a GitHub Actions workflow.
110+
If Visual Studio detects the project you're publishing is hosted in GitHub, the publish flow presents an additional **Deployment type** step. This stage allows developers to choose whether to publish directly through Visual Studio using the steps shown earlier in the quickstart, or through a GitHub Actions workflow.
111111

112112
:::image type="content" source="media/visual-studio/container-apps-deployment-type.png" alt-text="A screenshot showing the deployment type.":::
113113

114-
If you select the GitHub Actions workflow, Visual Studio will add a *.github* folder to the root directory of the project, along with a generated YAML file inside of it. The YAML file contains GitHub Actions configurations to build and deploy your app to Azure every time you push your code.
114+
If you select the GitHub Actions workflow, Visual Studio creates a *.github* folder to the root directory of the project, along with a generated YAML file inside of it. The YAML file contains GitHub Actions configurations to build and deploy your app to Azure every time you push your code.
115115

116-
After you make a change and push your code, you can see the progress of the build and deploy process in GitHub under the **Actions** tab. This page provides detailed logs and indicators regarding the progress and health of the workflow.
116+
After you make a change and push your code, you can see the progress of the build and deploy process in GitHub under the **Actions** tab. This page provides detailed logs and indicators regarding the progress and health of the workflow.
117117

118118
:::image type="content" source="media/visual-studio/container-apps-github-actions.png" alt-text="A screenshot showing GitHub actions.":::
119119

120-
Once you see a green checkmark next to the build and deploy jobs the workflow is complete. When you browse to your Container Apps site you should see the latest changes applied. You can always find the URL for your container app using the Azure portal page.
120+
The workflow is complete when you see a green checkmark next to the build and deploy jobs. When you browse to your Container Apps site, you should see the latest changes applied. You can always find the URL for your container app using the Azure portal page.
121121

122122
## Clean up resources
123123

124-
If you're not going to continue to use this application, you can delete the Azure Container Apps instance and all the associated services by removing the resource group.
124+
If you no longer plan to use this application, you can delete the Azure Container Apps instance and all the associated services by removing the resource group.
125125

126-
Follow these steps in the Azure portal to remove the resources you created:
126+
To remove the resources you created, follow these steps in the Azure portal:
127127

128128
1. Select the **msdocscontainerapps** resource group from the *Overview* section.
129129
1. Select the **Delete resource group** button at the top of the resource group *Overview*.
130130
1. Enter the resource group name **msdocscontainerapps** in the *Are you sure you want to delete "my-container-apps"* confirmation dialog.
131131
1. Select **Delete**.
132-
The process to delete the resource group may take a few minutes to complete.
132+
The process to delete the resource group might take a few minutes to complete.
133133

134134
> [!TIP]
135135
> Having issues? Let us know on GitHub by opening an issue in the [Azure Container Apps repo](https://github.com/microsoft/azure-container-apps).

0 commit comments

Comments
 (0)