You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/app-service/tutorial-java-tomcat-mysql-app.md
+17-26Lines changed: 17 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,10 +35,11 @@ This tutorial shows how to build, configure, and deploy a secure Tomcat applicat
35
35
36
36
## Skip to the end
37
37
38
-
With [Azure Developer CLI](/azure/developer/azure-developer-cli/install-azd) installed, you can deploy a fully configured sample app shown in this tutorial and see it running in Azure. Just running the following commands in an empty working directory and follow the prompt:
38
+
You can quickly deploy the sample app in this tutorial and see it running in Azure. Just run the following commands in the [Azure Cloud Shell](https://shell.azure.com), and follow the prompt:
@@ -301,7 +302,7 @@ Having issues? Check the [Troubleshooting section](#troubleshooting).
301
302
302
303
Azure App Service captures all messages output to the console to help you diagnose issues with your application. The sample application includes standard Log4j logging statements to demonstrate this capability as shown below.
@@ -355,7 +356,7 @@ When you're finished, you can delete all of the resources from your Azure subscr
355
356
1. Confirm with **Delete** again.
356
357
:::column-end:::
357
358
:::column:::
358
-
:::image type="content" source="./media/tutorial-java-tomcat-mysql-app/azure-portal-clean-up-resources-3.png" alt-text="A screenshot of the confirmation dialog for deleting a resource group in the Azure portal." lightbox="./media/tutorial-java-tomcat-mysql-app/azure-portal-clean-up-resources-3.png"::::
359
+
:::image type="content" source="./media/tutorial-java-tomcat-mysql-app/azure-portal-clean-up-resources-3.png" alt-text="A screenshot of the confirmation dialog for deleting a resource group in the Azure portal." lightbox="./media/tutorial-java-tomcat-mysql-app/azure-portal-clean-up-resources-3.png":::
359
360
:::column-end:::
360
361
:::row-end:::
361
362
@@ -402,7 +403,7 @@ In this step, you create the Azure resources and deploy a sample app to App Serv
402
403
azd up
403
404
```
404
405
405
-
The `azd up`command takes about 25 minutes to complete (the database and the cache take the most time). It also compiles and deploys your application code, but you'll modify your code later to work with App Service. While it's running, the command provides messages about the provisioning and deployment process, including a link to the deployment in Azure. When it finishes, the command also displays a link to the deploy application.
406
+
The `azd up`command takes about 15 minutes to complete (the database and the cache take the most time). It also compiles and deploys your application code, but you'll modify your code later to work with App Service. While it's running, the command provides messages about the provisioning and deployment process, including a link to the deployment in Azure. When it finishes, the command also displays a link to the deploy application.
406
407
407
408
This azd template contains files (*azure.yaml* and the *infra* directory) that generate a secure-by-default architecture with the following Azure resources:
408
409
@@ -439,25 +440,15 @@ The azd template you use generated the connectivity variables for you already as
439
440
440
441
In this step, you use the SSH connection to the app container to verify the JNDI data sourcein the Tomcat server. In the process, you learn how to access the SSH shell for the Tomcat container.
441
442
442
-
:::row:::
443
-
:::column span="2":::
444
-
**Step 1:** In the App Service page,
445
-
1. In the left menu, select**SSH**.
446
-
1. Select **Go**.
447
-
:::column-end:::
448
-
:::column:::
449
-
:::image type="content" source="./media/tutorial-java-tomcat-mysql-app/azure-portal-check-config-in-ssh-1.png" alt-text="A screenshot showing how to open the SSH shell for your app from the Azure portal." lightbox="./media/tutorial-java-tomcat-mysql-app/azure-portal-check-config-in-ssh-1.png":::
450
-
:::column-end:::
451
-
:::row-end:::
452
-
:::row:::
453
-
:::column span="2":::
454
-
**Step 2:** In the SSH terminal:
455
-
1. Run `cat /usr/local/tomcat/conf/context.xml`. You should see that a JNDI resource called `jdbc/AZURE_MYSQL_CONNECTIONSTRING_DS` was added. You will use this data source later.
456
-
:::column-end:::
457
-
:::column:::
458
-
:::image type="content" source="./media/tutorial-java-tomcat-mysql-app/azure-portal-check-config-in-ssh-2.png" alt-text="A screenshot showing the commands to run in the SSH shell and their output." lightbox="./media/tutorial-java-tomcat-mysql-app/azure-portal-check-config-in-ssh-2.png":::
459
-
:::column-end:::
460
-
:::row-end:::
443
+
1. In the azd output, find the URL forthe SSH session and navigate to itin the browser. It looks like this in the output:
444
+
445
+
<pre>
446
+
Open SSH session to App Service container at: https://<app-name>.scm.azurewebsites.net/webssh/host
447
+
</pre>
448
+
449
+
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 will use this data source later.
450
+
451
+
:::image type="content" source="./media/tutorial-java-tomcat-mysql-app/azure-portal-check-config-in-ssh-2.png" alt-text="A screenshot showing the commands to run in the SSH shell and their output.":::
461
452
462
453
> [!NOTE]
463
454
> Only changes to files in`/home` can persist beyond app restarts. For example, if you edit `/usr/local/tomcat/conf/server.xml`, the changes won't persist beyond an app restart.
@@ -508,7 +499,7 @@ Azure App Service can capture console logs to help you diagnose issues with your
508
499
509
500
The sample application includes standard Log4j logging statements to demonstrate this capability as shown below.
0 commit comments