Skip to content

Commit 04e2d66

Browse files
Merge pull request #285791 from Descatles/wenhao/sba-portal
Add doc for admin portal
2 parents efafb13 + 5be1b62 commit 04e2d66

File tree

3 files changed

+142
-15
lines changed

3 files changed

+142
-15
lines changed

articles/container-apps/java-admin.md

Lines changed: 139 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,15 @@ When running Admin for Spring in Azure Container Apps, be aware of the following
4949

5050
Before you begin to work with the Admin for Spring, you first need to create the required resources.
5151

52+
### [Azure CLI](#tab/azure-cli)
53+
5254
The following commands help you create your resource group and Container Apps environment.
5355

5456
1. Create variables to support your application configuration. These values are provided for you for the purposes of this lesson.
5557

5658
```bash
5759
export LOCATION=eastus
58-
export RESOURCE_GROUP=my-demo-resource-group
60+
export RESOURCE_GROUP=my-resource-group
5961
export ENVIRONMENT=my-environment
6062
export JAVA_COMPONENT_NAME=admin
6163
export APP_NAME=sample-admin-client
@@ -96,8 +98,63 @@ The following commands help you create your resource group and Container Apps en
9698
--location $LOCATION
9799
```
98100

101+
### [Azure portal](#tab/azure-portal)
102+
103+
Use the following steps to create each of the resources necessary to create a container app.
104+
105+
1. Search for **Container Apps** in the Azure portal and select **Create**.
106+
107+
1. Enter the following values to *Basics* tab.
108+
109+
| Property | Value |
110+
|---|---|
111+
| **Subscription** | Select your Azure subscription. |
112+
| **Resource group** | Select **Create new** link to create a new resource group named **my-resource-group**. |
113+
| **Container app name** | Enter **sample-admin-client**. |
114+
| **Deployment source** | Select **Container image**. |
115+
| **Region** | Select the region nearest you. |
116+
| **Container Apps environment** | Select the **Create new** link to create a new environment. |
117+
118+
1. In the *Create Container Apps environment* window, enter the following values.
119+
120+
| Property | Value |
121+
|---|---|
122+
| **Environment name** | Enter **my-environment**. |
123+
| **Zone redundancy** | Select **Disabled**. |
124+
125+
Select the **Create** button, and then select the **Container** tab.
126+
127+
1. In *Container* tab, enter the following values.
128+
129+
| Property | Value |
130+
|---|---|
131+
| **Name** | Enter **sample-admin-client**. |
132+
| **Image source** | Select **Docker Hub or other registries**. |
133+
| **Image type** | Select **Public**. |
134+
| **Registry login server** | Enter **mcr.microsoft.com**. |
135+
| **Image and tag** | Enter **javacomponents/samples/sample-admin-for-spring-client:latest**. |
136+
137+
Select the **Ingress** tab.
138+
139+
1. In *Ingress* tab, enter the following and leave the rest of the form with their default values.
140+
141+
| Property | Value |
142+
|---|---|
143+
| **Ingress** | Select **Enabled**. |
144+
| **Ingress traffic** | Select **Accept traffic from anywhere**. |
145+
| **Ingress type** | Select **HTTP**. |
146+
| **Target port** | Enter **8080**. |
147+
148+
Select **Review + create**.
149+
150+
1. Once the validation checks pass, select **Create** to create your container app.
151+
152+
---
153+
99154
## Use the component
100155

156+
### [Azure CLI](#tab/azure-cli)
157+
101158
Now that you have an existing environment, you can create your container app and bind it to a Java component instance of Admin for Spring component.
102159

103160
1. Create the Admin for Spring Java component.
@@ -122,6 +179,33 @@ Now that you have an existing environment, you can create your container app and
122179
--max-replicas 2
123180
```
124181

182+
### [Azure portal](#tab/azure-portal)
183+
184+
Now that you have an existing environment and admin client container app, you can create a Java component instance of Admin for Spring.
185+
186+
1. Go to your container app's environment in the portal.
187+
188+
1. From the left menu, under *Services* category, select **Services**.
189+
190+
1. Select **+ Configure** drop down, and select **Java component**.
191+
192+
1. In the *Configure Java component* panel, enter the following values.
193+
194+
| Property | Value |
195+
|---|---|
196+
| **Java component type** | Select **Admin for Spring**. |
197+
| **Java component name** | Enter **admin**. |
198+
199+
1. Select **Next**.
200+
201+
1. On the *Review* tab, select **Configure**.
202+
203+
---
204+
205+
## Bind your container app to the Admin for Spring Java component
206+
207+
### [Azure CLI](#tab/azure-cli)
208+
125209
1. Create the container app and bind to the Admin for Spring.
126210
127211
```azurecli
@@ -137,17 +221,64 @@ Now that you have an existing environment, you can create your container app and
137221
--bind $JAVA_COMPONENT_NAME
138222
```
139223
140-
The `--bind` parameter binds the container app to the Admin for Spring Java component. The container app can now read the configuration values from environment variables, primarily the `SPRING_BOOT_ADMIN_CLIENT_URL` property and connect to the Admin for Spring.
224+
### [Azure portal](#tab/azure-portal)
141225
142-
The binding also injects the following property:
226+
1. Go to your container app environment in the portal.
143227
144-
```bash
145-
"SPRING_BOOT_ADMIN_CLIENT_INSTANCE_PREFER-IP": "true",
146-
```
228+
1. From the left menu, under *Services* category, select **Services**.
229+
230+
1. From the list, select **admin**.
231+
232+
1. Under *Bindings*, select the *App name* drop-down and select **sample-admin-client**.
233+
234+
1. Select the **Review** tab.
235+
236+
1. Select the **Configure** button.
237+
238+
1. Return to your container app in the portal and copy the URL of your app to a text editor so you can use it in a coming step.
239+
240+
---
241+
242+
The bind operation binds the container app to the Admin for Spring Java component. The container app can now read the configuration values from environment variables, primarily the `SPRING_BOOT_ADMIN_CLIENT_URL` property and connect to the Admin for Spring.
243+
244+
The binding also injects the following property:
245+
246+
```bash
247+
"SPRING_BOOT_ADMIN_CLIENT_INSTANCE_PREFER-IP": "true",
248+
```
147249
148-
This property indicates that the Admin for Spring component client should prefer the IP address of the container app instance when connecting to the Admin for Spring server.
250+
This property indicates that the Admin for Spring component client should prefer the IP address of the container app instance when connecting to the Admin for Spring server.
149251
150-
You can also [remove a binding](java-admin-for-spring-usage.md#unbind) from your application.
252+
## (Optional) Unbind your container app from the Admin for Spring Java component
253+
254+
### [Azure CLI](#tab/azure-cli)
255+
256+
To remove a binding from a container app, use the `--unbind` option.
257+
258+
``` azurecli
259+
az containerapp update \
260+
--name $APP_NAME \
261+
--unbind $JAVA_COMPONENT_NAME \
262+
--resource-group $RESOURCE_GROUP
263+
```
264+
265+
### [Azure portal](#tab/azure-portal)
266+
267+
1. Go to your container app environment in the portal.
268+
269+
1. From the left menu, under *Services* category, select **Services**.
270+
271+
1. From the list, select **admin**.
272+
273+
1. Under *Bindings*, find the line for *sample-admin-client* select and select **Delete**.
274+
275+
1. Select **Next**.
276+
277+
1. Select the **Review** tab.
278+
279+
1. Select the **Configure** button.
280+
281+
---
151282
152283
## View the dashboard
153284

articles/container-apps/java-config-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ If you want to customize your own `SPRING_CONFIG_IMPORT`, you can refer to the e
289289
290290
You can also remove a binding from your application.
291291
292-
## Unbind your container app from the Config Server for Spring Java component
292+
## (Optional) Unbind your container app from the Config Server for Spring Java component
293293
294294
### [Azure CLI](#tab/azure-cli)
295295
To remove a binding from a container app, use the `--unbind` option.

articles/container-apps/java-eureka-server.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Use the following steps to create each of the resources necessary to create a co
122122

123123
| Property | Value |
124124
|---|---|
125-
| **Name** | Enter **my-config-client**. |
125+
| **Name** | Enter **my-eureka-client**. |
126126
| **Image source** | Select **Docker Hub or other registries**. |
127127
| **Image type** | Select **Public**. |
128128
| **Registry login server** | Enter **mcr.microsoft.com**. |
@@ -174,8 +174,6 @@ Now that you have an existing environment, you can create your container app and
174174

175175
Now that you have an existing environment and eureka client container app, you can create a Java component instance of Eureka Server for Spring.
176176

177-
Now that you have an existing environment and config server client container app, you can create a Java component instance of Config Server for Spring.
178-
179177
1. Go to your container app's environment in the portal.
180178
181179
1. From the left menu, under *Services* category, select **Services**.
@@ -189,8 +187,6 @@ Now that you have an existing environment and config server client container app
189187
| **Java component type** | Select **Eureka Server for Spring**. |
190188
| **Java component name** | Enter **eureka**. |
191189
192-
1. In the *Bindings* section, select the *App name* drop-down and select **my-component-app**.
193-
194190
1. Select **Next**.
195191
196192
1. On the *Review* tab, select **Configure**.
@@ -255,7 +251,7 @@ The `eureka.client.register-with-eureka` property is set to `true` to enforce re
255251
256252
The `eureka.instance.prefer-ip-address` is set to `true` due to the specific DNS resolution rule in the container app environment. Don't modify this value so you don't break the binding.
257253
258-
## Unbind your container app from the Eureka Server for Spring Java component
254+
## (Optional) Unbind your container app from the Eureka Server for Spring Java component
259255
260256
### [Azure CLI](#tab/azure-cli)
261257

0 commit comments

Comments
 (0)