Skip to content

Commit f13c792

Browse files
cephalinCephas Lin
authored andcommitted
add missing image
1 parent 556b63f commit f13c792

File tree

2 files changed

+17
-26
lines changed

2 files changed

+17
-26
lines changed
60.5 KB
Loading

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

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ This tutorial shows how to build, configure, and deploy a secure Tomcat applicat
3535

3636
## Skip to the end
3737

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:
3939

4040
```bash
41-
azd auth login
41+
mkdir msdocs-tomcat-mysql-sample-app
42+
cd msdocs-tomcat-mysql-sample-app
4243
azd init --template msdocs-tomcat-mysql-sample-app
4344
azd up
4445
```
@@ -301,7 +302,7 @@ Having issues? Check the [Troubleshooting section](#troubleshooting).
301302

302303
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.
303304

304-
:::code language="java" source="~/msdocs-tomcat-mysql-sample-app/src/main/java/com/microsoft/azure/appservice/examples/tomcatmysql/ViewServlet.java" range="17-26" highlight="19,24":::
305+
:::code language="java" source="~/msdocs-tomcat-mysql-sample-app/src/main/java/com/microsoft/azure/appservice/examples/tomcatmysql/ViewServlet.java" range="17-26" highlight="3,8":::
305306

306307
:::row:::
307308
:::column span="2":::
@@ -355,7 +356,7 @@ When you're finished, you can delete all of the resources from your Azure subscr
355356
1. Confirm with **Delete** again.
356357
:::column-end:::
357358
:::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":::
359360
:::column-end:::
360361
:::row-end:::
361362

@@ -402,7 +403,7 @@ In this step, you create the Azure resources and deploy a sample app to App Serv
402403
azd up
403404
```
404405

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.
406407

407408
This azd template contains files (*azure.yaml* and the *infra* directory) that generate a secure-by-default architecture with the following Azure resources:
408409

@@ -439,25 +440,15 @@ The azd template you use generated the connectivity variables for you already as
439440

440441
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.
441442

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 for the SSH session and navigate to it in the browser. It looks like this in the output:
444+
445+
<pre>
446+
Open SSH session to App Service container at: https://&lt;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.":::
461452

462453
> [!NOTE]
463454
> 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
508499

509500
The sample application includes standard Log4j logging statements to demonstrate this capability as shown below.
510501

511-
:::code language="java" source="~/msdocs-tomcat-mysql-sample-app/src/main/java/com/microsoft/azure/appservice/examples/tomcatmysql/ViewServlet.java" range="17-26" highlight="19,24":::
502+
:::code language="java" source="~/msdocs-tomcat-mysql-sample-app/src/main/java/com/microsoft/azure/appservice/examples/tomcatmysql/ViewServlet.java" range="17-26" highlight="3,8":::
512503

513504
In the azd output, find the link to stream App Service logs and navigate to it in the browser. The link looks like this in the azd output:
514505

@@ -520,7 +511,7 @@ Learn more about logging in Java apps in the series on [Enable Azure Monitor Ope
520511

521512
## 8. Clean up resources
522513

523-
To delete all Azure resources in the current deployment environment, run `azd down`.
514+
To delete all Azure resources in the current deployment environment, run `azd down` and follow the prompts.
524515

525516
```bash
526517
azd down

0 commit comments

Comments
 (0)