Skip to content

Commit 9ee9523

Browse files
committed
edits
1 parent 7e4a616 commit 9ee9523

1 file changed

Lines changed: 19 additions & 8 deletions

File tree

articles/service-connector/tutorial-django-webapp-postgres-cli.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,13 @@ The following code defines the necessary environment variables for this tutorial
9797

9898
## Deploy the app code to App Service
9999

100-
Create the app host in App Service and deploy the sample app code to that host. The `az webapp up` command performs the following actions, which might take a few minutes:
100+
Create the app host in App Service and deploy the sample app code to that host. The `az webapp up` command performs the following actions:
101101

102-
* Creates an [App Service plan](../app-service/overview-hosting-plans.md) in the Basic pricing tier (B1).
102+
* Creates an [App Service plan](/azure/app-service/overview-hosting-plans) in the Basic (B1) pricing tier.
103103
* Creates the App Service app.
104104
* Enables default logging for the app.
105105
* Uploads the repository using ZIP deployment with build automation enabled.
106+
* Builds the app.
106107

107108
In the code, the `sku` defines the CPU, memory, and cost of the App Service plan. The B1 (Basic) service plan incurs a small cost in your Azure subscription. You can omit the `--sku` parameter to use the default SKU, usually P1v3 (Premium v3). For a full list of App Service plans, see [App Service pricing](https://azure.microsoft.com/pricing/details/app-service/linux/).
108109

@@ -117,7 +118,9 @@ In the code, the `sku` defines the CPU, memory, and cost of the App Service plan
117118
--sku B1
118119
```
119120

120-
1. After the deployment completes, configure App Service to use the repository *start.sh* file by running the [az webapp config set](/cli/azure/webapp/config#az-webapp-config-set) command.
121+
The deployment takes a few minutes. Once the app build completes, you can exit out of the command by selecting Ctrl+C.
122+
123+
1. Configure the app to use the repository *start.sh* file by running the [az webapp config set](/cli/azure/webapp/config#az-webapp-config-set) command.
121124

122125
```azurecli
123126
az webapp config set \
@@ -143,7 +146,7 @@ Create the Azure Database for PostgreSQL database to store app information. The
143146
--location $LOCATION \
144147
--admin-user $ADMIN_USER \
145148
--admin-password $ADMIN_PW \
146-
--sku-name Standard_D2ds_v4
149+
--sku-name Standard_D2ds_v4 \
147150
--microsoft-entra-auth Enabled
148151
```
149152

@@ -239,13 +242,21 @@ Use [az webapp connection create storage-blob](/cli/azure/webapp/connection/crea
239242

240243
## Test the Python web app in Azure
241244

242-
The app uses the [azure.identity](https://pypi.org/project/azure-identity/) package and its `DefaultAzureCredential` class. When the app is running in Azure, the `DefaultAzureCredential` automatically detects when a managed identity exists for the App Service, and uses it to access the Azure Storage and Azure Database for PostgreSQL resources. You don't need to provide storage keys, certificates, or credentials to App Service to access these resources.
245+
Open and test the Azure Restaurant Review web app. The app uses the [azure.identity](https://pypi.org/project/azure-identity/) package and its `DefaultAzureCredential` class. When the app is running in Azure, the `DefaultAzureCredential` automatically detects when a managed identity exists for the App Service, and uses it to access the Azure Storage and Azure Database for PostgreSQL resources. The app doesn't need to provide storage keys, certificates, or credentials to access these resources.
246+
247+
For a local Azure CLI installation, you can use [`az webapp browse`](/cli/azure/webapp?view=azure-cli-latest#az-webapp-browse) to open the app in your default browser:
248+
249+
```azurecli
250+
az webapp browse --name $APP_SERVICE_NAME.azurewebsites.net --resource-group $RESOURCE_GROUP_NAME
251+
```
252+
253+
Azure Cloud Shell doesn't support the `az webapp browse` command because it can't open a local browser. The easiest way to open the web app is to select the **Default domain** link at upper right on the web app's Azure portal page.
243254

244-
1. Browse to the deployed application at the URL `https://$APP_SERVICE_NAME.azurewebsites.net`. It can take a minute or two for the app to start. If you see a default app page that isn't the sample app, wait a minute and refresh the browser.
255+
It can take a minute or two for the app to start. If you see a default app page that isn't the sample app, wait a minute and refresh the browser.
245256
246-
1. Test the functionality of the sample app by adding a restaurant and some reviews with photos for the restaurant. The app should resemble the following screenshot:
257+
Test the functionality of the sample app by adding a restaurant and some reviews with photos. The app should resemble the following screenshot:
247258
248-
:::image type="content" source="media/tutorial-django-webapp-postgres-cli/example-of-review-sample-app-production-deployed-small.png" lightbox="media/tutorial-django-webapp-postgres-cli/example-of-review-sample-app-production-deployed.png" alt-text="Screenshot of the sample app showing restaurant review functionality using App Service, Azure Database for PostgreSQL, and Azure Storage." :::
259+
:::image type="content" source="media/tutorial-django-webapp-postgres-cli/example-of-review-sample-app-production-deployed-small.png" lightbox="media/tutorial-django-webapp-postgres-cli/example-of-review-sample-app-production-deployed.png" alt-text="Screenshot of the sample app showing restaurant review functionality using App Service, Azure Database for PostgreSQL, and Azure Storage." :::
249260
250261
## Clean up resources
251262

0 commit comments

Comments
 (0)