Skip to content

Commit 1381931

Browse files
authored
Merge pull request #220511 from KarlErickson/karler-lgdoor
edit "[Spring] Update the app connect doc for the Portal UX"
2 parents b4a7a5a + 9dbcf9e commit 1381931

File tree

8 files changed

+60
-6
lines changed

8 files changed

+60
-6
lines changed

articles/spring-apps/how-to-connect-to-app-instance-for-troubleshooting.md

Lines changed: 60 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
title: Connect to an app instance for troubleshooting
33
description: Learn how to connect to an app instance in Azure Spring Apps for troubleshooting.
4-
author: karlerickson
4+
author: KarlErickson
55
ms.author: xiangy
66
ms.service: spring-apps
77
ms.topic: article
8-
ms.date: 11/09/2021
8+
ms.date: 12/06/2022
99
ms.custom: devx-track-java, devx-track-azurecli
1010
---
1111

@@ -41,7 +41,30 @@ Although Azure Spring Apps offers various managed troubleshooting approaches, yo
4141

4242
Before connecting to an app instance, you must be granted the role *Azure Spring Apps Connect Role*. Connecting to an app instance requires the data action permission `Microsoft.AppPlatform/Spring/apps/deployments/connect/action`.
4343

44-
Use the following command to assign the *Azure Spring Apps Connect Role* role:
44+
You can assign an Azure role using the Azure portal or Azure CLI.
45+
46+
### [Azure portal](#tab/azure-portal)
47+
48+
Use the following steps to assign an Azure role using the Azure portal.
49+
50+
1. Open the [Azure portal](https://portal.azure.com).
51+
1. Open your existing Azure Spring Apps service instance.
52+
1. Select **Access Control (IAM)** from the left menu.
53+
1. Select **Add** in the command bar, and then select **Add role assignment**.
54+
55+
:::image type="content" source="media/how-to-connect-to-app-instance-for-troubleshooting/add-role-assignment.png" alt-text="Screenshot of the Access Control(IAM) page showing the Add role assignment command." lightbox="media/how-to-connect-to-app-instance-for-troubleshooting/add-role-assignment.png":::
56+
57+
1. Search for **Azure Spring Apps Connect Role** in the list, and then select **Next**.
58+
59+
:::image type="content" source="media/how-to-connect-to-app-instance-for-troubleshooting/connect-role.png" alt-text="Screenshot of the Add role assignment page showing the Azure Spring Apps Connect Role." lightbox="media/how-to-connect-to-app-instance-for-troubleshooting/connect-role.png":::
60+
61+
1. Select **Select members**, and then search for your username.
62+
63+
1. Select **Review + assign**.
64+
65+
### [Azure CLI](#tab/azure-cli)
66+
67+
Use the following command to assign the *Azure Spring Apps Connect Role* role using the Azure CLI:
4568

4669
```azurecli
4770
az role assignment create \
@@ -50,9 +73,35 @@ az role assignment create \
5073
--assignee '<your-identity>'
5174
```
5275

76+
---
77+
5378
## Connect to an app instance
5479

55-
If your app contains only one instance, use the following command to connect to the instance:
80+
You can connect to an app instance using the Azure portal or Azure CLI.
81+
82+
### [Azure portal](#tab/azure-portal)
83+
84+
Use the following steps to connect to an app instance using the Azure portal.
85+
86+
1. Open the [Azure portal](https://portal.azure.com).
87+
1. Open your existing Azure Spring Apps service instance.
88+
1. Select **Apps** from left the menu, then select one of your apps.
89+
1. Select **Console** from the left menu.
90+
1. Select an application instance.
91+
92+
:::image type="content" source="media/how-to-connect-to-app-instance-for-troubleshooting/console-instance.png" alt-text="Screenshot of the Azure portal Console page showing an app instance." lightbox="media/how-to-connect-to-app-instance-for-troubleshooting/console-instance.png":::
93+
94+
1. Select or input a shell to run in the container.
95+
96+
:::image type="content" source="media/how-to-connect-to-app-instance-for-troubleshooting/console-shell.png" alt-text="Screenshot of the Azure portal Console page showing a Custom Shell entry." lightbox="media/how-to-connect-to-app-instance-for-troubleshooting/console-shell.png":::
97+
98+
1. Select **Connect**.
99+
100+
:::image type="content" source="media/how-to-connect-to-app-instance-for-troubleshooting/console-connect.png" alt-text="Screenshot of the Azure portal Console page showing the Connect command." lightbox="media/how-to-connect-to-app-instance-for-troubleshooting/console-connect.png":::
101+
102+
### [Azure CLI](#tab/azure-cli)
103+
104+
If your app contains only one instance, use the following command to connect to the instance using the Azure CLI:
56105

57106
```azurecli
58107
az spring app connect \
@@ -93,6 +142,8 @@ az spring app connect \
93142

94143
If your app is deployed with a custom image and shell, you can also use the `--shell-cmd` parameter to specify your shell.
95144

145+
---
146+
96147
## Troubleshoot your app instance
97148

98149
After you connect to an app instance, you can check the status of the heap memory.
@@ -140,15 +191,18 @@ You can also use JDK-bundled tools such as `jps`, `jcmd`, and `jstat`.
140191
The available tools depend on your service tier and type of app deployment. The following table describes the availability of troubleshooting tools:
141192

142193
| Tier | Deployment type | Common tools | JDK tools | Notes |
143-
|------------------------|--------------------------|-----------------------------------------------|------------------------------|-------------------------------------------|
194+
|-----------------------|-------------------------|----------------------------------------------|-----------------------------|------------------------------------------|
144195
| Basic / Standard tier | Source code / Jar | Y | Y (for Java workloads only) | |
145196
| Basic / Standard tier | Custom image | N | N | Up to your installed tool set. |
146197
| Enterprise Tier | Source code / Artifacts | Y (for full OS stack), N (for base OS stack) | Y (for Java workloads only) | Depends on the OS stack of your builder. |
147198
| Enterprise Tier | Custom image | N | N | Depends on your installed tool set. |
148199

200+
> [!NOTE]
201+
> JDK tools aren't included in the path for the *source code* deployment type. Run `export PATH="$PATH:/layers/paketo-buildpacks_microsoft-openjdk/jdk/bin"` before running any JDK commands.
202+
149203
## Limitations
150204

151-
Using the shell environment inside your application instances has the following limitation:
205+
Using the shell environment inside your application instances has the following limitations:
152206

153207
- Because the app is running as a non-root user, you can't execute some actions requiring root permission. For example, you can't install new tools by using the system package manager `apt / yum`.
154208

115 KB
Loading
102 KB
Loading
41.6 KB
Loading
39.5 KB
Loading
42.8 KB
Loading
-3.85 KB
Loading
-4.02 KB
Loading

0 commit comments

Comments
 (0)