Skip to content

Commit 2363714

Browse files
committed
updated AZD steps using new template
1 parent 869f75f commit 2363714

File tree

4 files changed

+21
-14
lines changed

4 files changed

+21
-14
lines changed
20.4 KB
Loading

articles/app-service/tutorial-dotnetcore-sqldb-app.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ Sign in to the [Azure portal](https://portal.azure.com/) and follow these steps
176176

177177
The creation wizard generated the connectivity string for you already as [.NET connection strings](configure-common.md#configure-connection-strings) and [app settings](configure-common.md#configure-app-settings). However, the security best practice is to keep secrets out of App Service completely. You'll move your secrets to key vault and change your app setting to [Key Vault references](app-service-key-vault-references.md) with the help of Service Connectors.
178178

179+
> [!TIP]
180+
> To use passwordless authentication, see [How do I change the SQL Database connection to use a managed identity instead?](#how-do-i-change-the-sql-database-connection-to-use-a-managed-identity-instead)
181+
179182
:::row:::
180183
:::column span="2":::
181184
**Step 1:** In the App Service page,

articles/app-service/tutorial-java-spring-cosmosdb.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ Sign in to the [Azure portal](https://portal.azure.com/) and follow these steps
157157
- **App Service**: Represents your app and runs in the App Service plan.
158158
- **Virtual network**: Integrated with the App Service app and isolates back-end network traffic.
159159
- **Azure Cosmos DB**: Accessible only from behind its private endpoint. A database is created for you on the database account.
160+
- **Private endpoints**: Access endpoints for the database server and the Redis cache in the virtual network.
160161
- **Private DNS zones**: Enable DNS resolution of the database server and the Redis cache in the virtual network.
161162
:::column-end:::
162163
:::column:::
@@ -508,6 +509,7 @@ The dev container already has the [Azure Developer CLI](/azure/developer/azure-d
508509
- **Azure Cosmos DB account with MongoDB API**: Accessible only from behind its private endpoint. A database is created for you on the server.
509510
- **Azure Cache for Redis**: Accessible only from within the virtual network.
510511
- **Key vault**: Accessible only from behind its private endpoint. Used to manage secrets for the App Service app.
512+
- **Private endpoints**: Access endpoints for the key vault, the database server, and the Redis cache in the virtual network.
511513
- **Private DNS zones**: Enable DNS resolution of the Cosmos DB database, the Redis cache, and the key vault in the virtual network.
512514
- **Log Analytics workspace**: Acts as the target container for your app to ship its logs, where you can also query the logs.
513515

articles/app-service/tutorial-java-tomcat-mysql-app.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: cephalin
55
ms.author: cephalin
66
ms.devlang: java
77
ms.topic: tutorial
8-
ms.date: 05/08/2024
8+
ms.date: 09/13/2024
99
ms.custom: mvc, devx-track-extended-java, AppServiceConnectivity, devx-track-extended-azdevcli, linux-related-content
1010
zone_pivot_groups: app-service-portal-azd
1111
ms.collection: ce-skilling-ai-copilot
@@ -102,7 +102,7 @@ Having issues? Check the [Troubleshooting section](#troubleshooting).
102102

103103
First, you create the Azure resources. The steps used in this tutorial create a set of secure-by-default resources that include App Service and Azure Database for MySQL. For the creation process, you specify:
104104

105-
* The **Name** for the web app. It's the name used as part of the DNS name for your app in the form of `https://<app-name>.azurewebsites.net`.
105+
* The **Name** for the web app. It's used as part of the DNS name for your app in the form of `https://<app-name>-<hash>.<region>.azurewebsites.net`.
106106
* The **Region** to run the app physically in the world. It's also used as part of the DNS name for your app.
107107
* The **Runtime stack** for the app. It's where you select the version of Java to use for your app.
108108
* The **Hosting plan** for the app. It's the pricing tier that includes the set of features and scaling capacity for your app.
@@ -145,8 +145,8 @@ Sign in to the [Azure portal](https://portal.azure.com/) and follow these steps
145145
- **App Service plan**: Defines the compute resources for App Service. A Linux plan in the *Basic* tier is created.
146146
- **App Service**: Represents your app and runs in the App Service plan.
147147
- **Virtual network**: Integrated with the App Service app and isolates back-end network traffic.
148-
- **Azure Database for MySQL flexible server**: Accessible only from behind its private endpoint. A database and a user are created for you on the server.
149-
- **Private DNS zones**: Enable DNS resolution of the database server and the Redis cache in the virtual network.
148+
- **Azure Database for MySQL flexible server**: Accessible only from the virtual network. A database and a user are created for you on the server.
149+
- **Private DNS zones**: Enable DNS resolution of the database server in the virtual network.
150150
:::column-end:::
151151
:::column:::
152152
:::image type="content" source="./media/tutorial-java-tomcat-mysql-app/azure-portal-create-app-mysql-3.png" alt-text="A screenshot showing the deployment process completed." lightbox="./media/tutorial-java-tomcat-mysql-app/azure-portal-create-app-mysql-3.png":::
@@ -261,7 +261,7 @@ Having issues? Check the [Troubleshooting section](#troubleshooting).
261261
:::column span="2":::
262262
**Step 2:**
263263
1. In the **Application settings** tab of the **Configuration** page, find the app setting `AZURE_MYSQL_CONNECTIONSTRING`. The creation wizard created it for you.
264-
1. If you want, you can select the **Edit** button to the right of each setting and see or copy its value, or select Add to add a variable to inject into your Tomcat container. If you add an app setting that contains a valid Oracle, SQL Server, PostgreSQL, or MySQL connection string, App Service adds it as a Java Naming and Directory Interface (JNDI) data source in the Tomcat server's *context.xml* file.
264+
1. If you want, you can select the **Edit** button to the right of each setting and see or copy its value, or select **Add** to add a variable to inject into your Tomcat container.
265265
:::column-end:::
266266
:::column:::
267267
:::image type="content" source="./media/tutorial-java-tomcat-mysql-app/azure-portal-get-connection-string-2.png" alt-text="A screenshot showing how to see the autogenerated connection string." lightbox="./media/tutorial-java-tomcat-mysql-app/azure-portal-get-connection-string-2.png":::
@@ -272,7 +272,7 @@ Having issues? Check the [Troubleshooting section](#troubleshooting).
272272

273273
## 4. Confirm JNDI data source
274274

275-
In this step, you use the SSH connection to the app container to verify the JNDI data source in the Tomcat server. In the process, you learn how to access the SSH shell for the Tomcat container.
275+
If you add an app setting that contains a valid JDBC connection string for Oracle, SQL Server, PostgreSQL, or MySQL, App Service adds a Java Naming and Directory Interface (JNDI) data source for it in the Tomcat server's *context.xml* file. In this step, you use the SSH connection to the app container to verify the JNDI data source. In the process, you learn how to access the SSH shell for the Tomcat container.
276276

277277
:::row:::
278278
:::column span="2":::
@@ -402,7 +402,7 @@ Having issues? Check the [Troubleshooting section](#troubleshooting).
402402
:::column span="2":::
403403
**Step 1:** In the App Service page:
404404
1. From the left menu, select **Overview**.
405-
1. Select the URL of your app. You can also navigate directly to `https://<app-name>.azurewebsites.net`.
405+
1. Select the URL of your app.
406406
:::column-end:::
407407
:::column:::
408408
:::image type="content" source="./media/tutorial-java-tomcat-mysql-app/azure-portal-browse-app-1.png" alt-text="A screenshot showing how to launch an App Service from the Azure portal." lightbox="./media/tutorial-java-tomcat-mysql-app/azure-portal-browse-app-1.png":::
@@ -506,7 +506,7 @@ The dev container already has the [Azure Developer CLI](/azure/developer/azure-d
506506
|---------|---------|
507507
|The current directory is not empty. Would you like to initialize a project here in '\<your-directory>'? | **Y** |
508508
|What would you like to do with these files? | **Keep my existing files unchanged** |
509-
|Enter a new environment name | Type a unique name. The AZD template uses this name as part of the DNS name of your web app in Azure (`<app-name>.azurewebsites.net`). Alphanumeric characters and hyphens are allowed. |
509+
|Enter a new environment name | Type a unique name. The AZD template uses this name as part of the DNS name of your web app in Azure (`<app-name>-<hash>.azurewebsites.net`). Alphanumeric characters and hyphens are allowed. |
510510

511511
1. Sign into Azure by running the `azd auth login` command and following the prompt:
512512

@@ -528,9 +528,10 @@ The dev container already has the [Azure Developer CLI](/azure/developer/azure-d
528528
- **App Service plan**: Defines the compute resources for App Service. A Linux plan in the *B1* tier is created.
529529
- **App Service**: Represents your app and runs in the App Service plan.
530530
- **Virtual network**: Integrated with the App Service app and isolates back-end network traffic.
531-
- **Azure Database for MySQL flexible server**: Accessible only from behind its private endpoint. A database is created for you on the server.
531+
- **Azure Database for MySQL flexible server**: Accessible only from the virtual network through the DNS zone integration. A database is created for you on the server.
532532
- **Azure Cache for Redis**: Accessible only from within the virtual network.
533-
- **Private DNS zones**: Enable DNS resolution of the database server and the Redis cache in the virtual network.
533+
- **Private endpoints**: Access endpoints for the key vault and the Redis cache in the virtual network.
534+
- **Private DNS zones**: Enable DNS resolution of the key vault, the database server, and the Redis cache in the virtual network.
534535
- **Log Analytics workspace**: Acts as the target container for your app to ship its logs, where you can also query the logs.
535536
- **Key vault**: Used to keep your database password the same when you redeploy with AZD.
536537

@@ -540,13 +541,14 @@ Having issues? Check the [Troubleshooting section](#troubleshooting).
540541

541542
The AZD template you use generated the connectivity variables for you already as [app settings](configure-common.md#configure-app-settings) and outputs the them to the terminal for your convenience. App settings are one way to keep connection secrets out of your code repository.
542543

543-
1. In the AZD output, find the app setting `AZURE_MYSQL_CONNECTIONSTRING`. To keep secrets safe, only the setting names are displayed. They look like this in the AZD output:
544+
1. In the AZD output, find the app setting `AZURE_MYSQL_CONNECTIONSTRING`. Only the setting names are displayed. They look like this in the AZD output:
544545

545546
<pre>
546547
App Service app has the following connection strings:
547-
548548
- AZURE_MYSQL_CONNECTIONSTRING
549549
- AZURE_REDIS_CONNECTIONSTRING
550+
- AZURE_KEYVAULT_RESOURCEENDPOINT
551+
- AZURE_KEYVAULT_SCOPE
550552
</pre>
551553

552554
`AZURE_MYSQL_CONNECTIONSTRING` contains the connection string to the MySQL database in Azure. You need to use it in your code later.
@@ -564,7 +566,7 @@ In this step, you use the SSH connection to the app container to verify the JNDI
564566
1. In the AZD output, find the URL for the SSH session and navigate to it in the browser. It looks like this in the output:
565567

566568
<pre>
567-
Open SSH session to App Service container at: https://&lt;app-name>.scm.azurewebsites.net/webssh/host
569+
Open SSH session to App Service container at: https://&lt;app-name>-&lt;hash>.scm.azurewebsites.net/webssh/host
568570
</pre>
569571

570572
1. In the SSH terminal, run `cat /usr/local/tomcat/conf/context.xml`. You should see that a JNDI resource called `jdbc/AZURE_MYSQL_CONNECTIONSTRING_DS` was added. You'll use this data source later.
@@ -636,7 +638,7 @@ Having issues? Check the [Troubleshooting section](#troubleshooting).
636638
Deploying services (azd deploy)
637639
638640
(✓) Done: Deploying service web
639-
- Endpoint: https://&lt;app-name>.azurewebsites.net/
641+
- Endpoint: https://&lt;app-name>-&lt;hash>.azurewebsites.net/
640642
</pre>
641643
642644
2. Add a few tasks to the list.

0 commit comments

Comments
 (0)