Skip to content

Commit dba2db1

Browse files
update for VS Code extension changes
1 parent ba4698b commit dba2db1

File tree

1 file changed

+30
-41
lines changed

1 file changed

+30
-41
lines changed

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

Lines changed: 30 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: alexwolfmsft
66
ms.author: alexwolf
77
ms.service: container-apps
88
ms.topic: tutorial
9-
ms.date: 4/05/2022
9+
ms.date: 09/01/2022
1010
ms.custom: mode-ui
1111
---
1212

@@ -27,16 +27,16 @@ In this tutorial, you'll deploy a containerized application to Azure Container A
2727

2828
## Clone the project
2929

30-
Begin by cloning the [sample repository]((https://github.com/azure-samples/containerapps-albumapi-javascript) to your machine using the following command.
30+
1. Begin by cloning the [sample repository]((https://github.com/azure-samples/containerapps-albumapi-javascript) to your machine using the following command.
3131

32-
```bash
33-
git clone https://github.com/Azure-Samples/containerapps-albumapi-javascript.git
34-
```
32+
```bash
33+
git clone https://github.com/Azure-Samples/containerapps-albumapi-javascript.git
34+
```
3535

3636
> [!NOTE]
3737
> This tutorial uses a JavaScript project, but the steps are language agnostic.
3838

39-
Launch Visual Studio Code and open the project folder in the editor.
39+
1. Open Visual Studio Code.
4040

4141
1. Select **F1** to open the command palette.
4242

@@ -52,17 +52,17 @@ Launch Visual Studio Code and open the project folder in the editor.
5252

5353
## Create the container registry and Docker image
5454

55-
Docker images contain all the source code and dependencies necessary to run an application. This sample project includes a Dockerfile used to build the application's container. Since you can build and publish the image for your app directly in Azure, a local Docker installation isn't required.
55+
Docker images contain the source code and dependencies necessary to run an application. This sample project includes a Dockerfile used to build the application's container. Since you can build and publish the image for your app directly in Azure, a local Docker installation isn't required.
5656

5757
Container images are stored inside container registries. You can create a container registry and upload an image of your app in a single workflow using Visual Studio Code.
5858

5959
1. In the _Explorer_ window, expand the _src_ folder to reveal the Dockerfile.
6060

61-
1. Right select on the Dockerfile in Visual Studio Code, and select **Build Image in Azure**.
61+
1. Right select on the Dockerfile, and select **Build Image in Azure**.
6262

6363
This action opens the command palette and prompts you to define a container tag.
6464

65-
1. Enter a tag for the container. Accept the default, which is the project name with the `{{.Run.ID}}` replacement token as a suffix. Select **Enter** to continue.
65+
1. Enter a tag for the container. Accept the default, which is the project name with the *latest* suffix.
6666

6767
1. Select **+ Create new registry**, or if you already have a registry you'd like to use, select that item and skip to creating and deploying to the container app.
6868
@@ -90,53 +90,42 @@ The Azure Container Apps extension for Visual Studio Code enables you to choose
9090
9191
Every container app must be part of a Container Apps environment. An environment provides an isolated network for one or more container apps, making it possible for them to easily invoke each other. You'll need to create an environment before you can create the container app itself.
9292

93-
1) In the Container Apps extension panel, right select on the subscription you would like to use and select **Create Container App Environment**.
93+
1. Select <kbd>F1</kbd> to open the command palette.
9494

95-
:::image type="content" source="media/visual-studio-code/visual-studio-code-create-app-environment.png" alt-text="A screenshot showing how to create a Container Apps environment.":::
95+
1. Enter **Azure Container Apps: Create Container Apps Environment...** and enter the following values as prompted by the extension.
9696

97-
2) A command palette workflow will open at the top of the screen. Enter a name for the new Container Apps environment, such as `msdocsappenvironment`, and select **Enter**.
97+
| Prompt | Value |
98+
|--|--|
99+
| Name | Enter **my-aca-environment** |
100+
| Region | Select the region closest to you |
98101

99-
:::image type="content" source="media/visual-studio-code/visual-studio-code-container-app-environment.png" alt-text="A screenshot showing the container app environment.":::
100-
101-
3) Select the desired location for the container app from the list of options.
102-
103-
:::image type="content" source="media/visual-studio-code/visual-studio-code-container-env-location.png" alt-text="A screenshot showing the app environment location.":::
104-
105-
Visual Studio Code and Azure will create the environment for you. This process may take a few moments to complete. Creating a container app environment also creates a log analytics workspace for you in Azure.
102+
Once you issue this command, Azure begins to create the environment for you. This process may take a few moments to complete. Creating a container app environment also creates a log analytics workspace for you in Azure.
106103

107104
### Create the container app and deploy the Docker image
108105

109106
Now that you have a container app environment in Azure you can create a container app inside of it. You can also publish the Docker image you created earlier as part of this workflow.
110107

111-
1. In the Container Apps extension panel, right select on the container environment you created previously and select **Create Container App**
112-
113-
:::image type="content" source="media/visual-studio-code/visual-studio-code-create-container-app.png" alt-text="A screenshot showing how to create the container app.":::
114-
115-
1. A new command palette workflow will open at the top of the screen. Enter a name for the new container app, such as `msdocscontainerapp`, and then select **Enter**.
116-
117-
:::image type="content" source="media/visual-studio-code/visual-studio-code-container-name.png" alt-text="A screenshot showing the container app name.":::
118-
119-
1. Next, you're prompted to choose a container registry hosting solution to pull a Docker image from. For this scenario, select **Azure Container Registries**, though Docker Hub is also supported.
120-
121-
1. Select the container registry you created previously when publishing the Docker image.
122-
123-
1. Select the container registry repository you published the Docker image to. Repositories allow you to store and organize your containers in logical groupings.
124-
125-
1. Select the tag of the image you published earlier.
126-
127-
1. When prompted for environment variables, choose **Skip for now**. This application doesn't require any environment variables.
128-
129-
1. Select **Enable** on the ingress settings prompt to enable an HTTP endpoint for your application.
108+
1. Select <kbd>F1</kbd> to open the command palette.
130109

131-
1. Choose **External** to configure the HTTP traffic that the endpoint will accept.
110+
1. Enter **Azure Container Apps: Create Container App...** and enter the following values as prompted by the extension.
132111

133-
1. Enter a value of 3500 for the port, and then select **Enter** to complete the workflow. This value should be set to the port number that your container uses. In this case, the port number is `3500`.
112+
| Prompt | Value | Remarks |
113+
|--|--|--|
114+
| Environment | Select **my-aca-environment** | |
115+
| Name | Enter **my-container-app** | |
116+
| Container registry | Select **Azure Container Registries**, then select the registry you created as you published the container image. | |
117+
| Repository | Select the container registry repository where you published the container image. | |
118+
| Tag | Select **latest** | |
119+
| Environment variables | Select **Skip for now** | |
120+
| Ingress | Select **Enable** | |
121+
| HTTP traffic type | Select **External** | |
122+
| Port | Enter **3500** | You set this value to the port number that your container uses. |
134123

135124
During this process, Visual Studio Code and Azure create the container app for you. The published Docker image you created earlier is also be deployed to the app. Once this process finishes, Visual Studio Code displays a notification with a link to browse to the site. Select this link, and to view your app in the browser.
136125

137126
:::image type="content" source="media/visual-studio-code/visual-studio-code-app-deploy.png" alt-text="A screenshot showing the deployed app.":::
138127

139-
You can also append the `/albums` path at the end of the app URL to view data from a sample API request.
128+
You can also append the `/albums` path at the end of the app URL to view data from a sample API request.
140129

141130
Congratulations! You successfully created and deployed your first container app using Visual Studio code.
142131

0 commit comments

Comments
 (0)