Skip to content

Commit fba45a3

Browse files
Updated portal steps and removed screenshots
1 parent a6d819f commit fba45a3

15 files changed

+190
-70
lines changed

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

Lines changed: 96 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: craigshoemaker
66
ms.service: azure-container-apps
77
ms.custom: devx-track-azurecli, devx-track-extended-java
88
ms.topic: tutorial
9-
ms.date: 03/13/2024
9+
ms.date: 08/13/2024
1010
ms.author: cshoe
1111
---
1212

@@ -45,7 +45,7 @@ When running in Config Server for Spring in Azure Container Apps, be aware of th
4545
| **Scope** | The Config Server for Spring runs in the same environment as the connected container app. |
4646
| **Scaling** | To maintain a single source of truth, the Config Server for Spring doesn't scale. The scaling properties `minReplicas` and `maxReplicas` are both set to `1`. |
4747
| **Resources** | The container resource allocation for Config Server for Spring is fixed, the number of the CPU cores is 0.5, and the memory size is 1Gi. |
48-
| **Pricing** | The Config Server for Spring billing falls under consumption-based pricing. Resources consumed by managed Java components are billed at the active/idle rates. You may delete components that are no longer in use to stop billing. |
48+
| **Pricing** | The Config Server for Spring billing falls under consumption-based pricing. Resources consumed by managed Java components are billed at the active/idle rates. You can delete components that are no longer in use to stop billing. |
4949
| **Binding** | The container app connects to a Config Server for Spring via a binding. The binding injects configurations into container app environment variables. Once a binding is established, the container app can read configuration values from environment variables. |
5050

5151
## Setup
@@ -77,7 +77,7 @@ Execute the following commands to create your resource group and Container Apps
7777
| `IMAGE` | The container image used in your container app. |
7878
| `URI` | You can replace the URI with your git repo url, if it's private, add the related authentication configurations such as `spring.cloud.config.server.git.username` and `spring.cloud.config.server.git.password`. |
7979
80-
1. Log in to Azure with the Azure CLI.
80+
1. Sign in to Azure with the Azure CLI.
8181
8282
```azurecli
8383
az login
@@ -100,22 +100,54 @@ Execute the following commands to create your resource group and Container Apps
100100
101101
### [Azure portal](#tab/azure-portal)
102102
103-
Follow the following steps to create the resource group, client container app and container apps environment.
103+
Use the following steps to create each of the resources necessary to create a container app.
104104
105-
1. Search for **Container Apps** in the Azure portal and select **Create**
106-
2. Enter the following values to **Basics** tab. You need to select **Create new** in **Resource group** and **Container Apps Environment** to create the new resource.
105+
1. Search for **Container Apps** in the Azure portal and select **Create**.
107106
108-
:::image type="content" source="media/java-components/create-containerapp-config.png" alt-text="Screenshot of create container apps." lightbox="media/java-components/create-containerapp-config.png":::
107+
1. Enter the following values to *Basics* tab.
109108
110-
3. In Container tab, select or enter the following values and leave others be the default. The container image value is `mcr.microsoft.com/javacomponents/samples/sample-service-config-client:latest`, which is a sample config server client image provided by us.
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 **my-config-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. |
111117
112-
:::image type="content" source="media/java-components/select-config-image.png" alt-text="Screenshot of select image when create container apps." lightbox="media/java-components/select-config-image.png":::
118+
1. In the *Create Container Apps environment* screen, enter the following values.
113119
114-
4. In Ingress tab, select or enter the following values and leave others be the default, then click **Review + create**
115-
116-
:::image type="content" source="media/java-components/config-ingress.png" alt-text="Screenshot of config ingress when create container apps." lightbox="media/java-components/config-ingress.png":::
120+
| Property | Value |
121+
|---|---|
122+
| **Environment name** | Enter **my-environment**. |
123+
| **Zone redundancy** | Select **Disabled**. |
117124
118-
5. Click **Create** after validation passed
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 **my-config-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-service-config-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.
119151
120152
---
121153
@@ -147,28 +179,43 @@ Now that you have a Container Apps environment, you can create your container ap
147179
```
148180
149181
Here, you're telling the component where to find the repository that holds your configuration information via the `uri` property. The `refresh-rate` property tells Container Apps how often to check for changes in your git repository.
182+
150183
### [Azure portal](#tab/azure-portal)
151184

152-
Now that you have an existing environment and config server client container app, create a Java component instance of Config Server for Spring.
185+
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.
153186

154-
1. Go to your container app environment page, select **Service** on the left panel, and then select **Configure**, **Java component**
187+
1. Go to your container app's environment in the portal.
155188
156-
:::image type="content" source="media/java-components/select-java-component.png" alt-text="Screenshot of how to select Java component." lightbox="media/java-components/select-java-component.png":::
189+
1. From the left menu, under *Services* category, select **Services**.
157190
158-
2. In new **Configure Java component** panel, select or enter the following values
191+
1. Select **+ Configure** drop down, and select **Java component**.
159192
160-
:::image type="content" source="media/java-components/create-config-server-java-component.png" alt-text="Screenshot of how to create Config Server Java component." lightbox="media/java-components/create-config-server-java-component.png":::
193+
1. In the *Configure Java component* panel, enter the following values.
161194
162-
3. Select **Add** under **Git repositories**, Enter **URI** value `https://github.com/Azure-Samples/azure-spring-cloud-config-java-aca.git` under Add Git repository, select **Add**
163-
164-
:::image type="content" source="media/java-components/configure-git-uri.png" alt-text="Screenshot of how to configure config server git uri." lightbox="media/java-components/configure-git-uri.png":::
195+
| Property | Value |
196+
|---|---|
197+
| **Java component type** | Select **Config Server for Spring**. |
198+
| **Java component name** | Enter **configserver**. |
199+
200+
1. In the *Git repositories* section, select the **+ Add** button and enter the following values.
201+
202+
| Property | Value |
203+
|---|---|
204+
| **Type** | Select **HTTP**. |
205+
| **URI** | Enter **https://github.com/Azure-Samples/azure-spring-cloud-config-java-aca.git**. |
206+
207+
Leave the rest of the fields with the default values and select **Add**.
208+
209+
1. Select **Next**.
210+
211+
1. On the *Review* tab, select **Configure**.
165212
166-
4. Click **Next**, and then click **Configure** on **Review** page
167213
---
168214
169215
## Bind your container app to the Config Server for Spring Java component
170216
171217
### [Azure CLI](#tab/azure-cli)
218+
172219
1. Create the container app that consumes configuration data.
173220
174221
```azurecli
@@ -203,16 +250,19 @@ Now that you have an existing environment and config server client container app
203250
204251
### [Azure portal](#tab/azure-portal)
205252
206-
1. Go to your container app environment page, select **Service** on the left panel
207-
2. Select **configserver** in Service list
208-
3. Under bindings, select app **my-config-client**, Click **Next**
209-
4. Click Click **Configure** on **Review** page
210-
211-
:::image type="content" source="media/java-components/app-bind-configserver.png" alt-text="Screenshot of container app bind with config server." lightbox="media/java-components/app-bind-configserver.png":::
253+
1. Go to your container app environment in the portal.
212254
213-
5. Go to your container app **my-config-client** page, get the **Application URL** of the container app
214-
---
255+
1. From the left menu, under *Services* category, select **Services**.
215256
257+
1. From the list, select **configserver**.
258+
259+
1. Under *bindings, select the *App name* drop-down and select **my-config-client**.
260+
261+
1. Select the **Review** tab.
262+
263+
1. Select the **Configure** button.
264+
265+
---
216266
217267
Once the container app and the Config Server component are bound together, configuration changes are automatically synchronized to the container app.
218268
@@ -233,6 +283,7 @@ If you want to customize your own `SPRING_CONFIG_IMPORT`, you can refer to the e
233283
You can also remove a binding from your application.
234284
235285
## Unbind your container app from the Config Server for Spring Java component
286+
236287
### [Azure CLI](#tab/azure-cli)
237288
To remove a binding from a container app, use the `--unbind` option.
238289
@@ -242,13 +293,22 @@ You can also remove a binding from your application.
242293
--unbind $JAVA_COMPONENT_NAME \
243294
--resource-group $RESOURCE_GROUP
244295
```
296+
245297
### [Azure portal](#tab/azure-portal)
246-
1. Go to your container app environment page, **Service** on the left panel
247-
2. Select **configserver** in Service list
248-
3. Under bindings, select **Delete** after app **my-config-client**, Click **Next**
249-
4. Click **Configure** on **Review** page
250-
251-
:::image type="content" source="media/java-components/app-unbind-configserver.png" alt-text="Screenshot of container app unbind with config server." lightbox="media/java-components/app-unbind-configserver.png":::
298+
299+
1. Go to your container app environment in the portal.
300+
301+
1. From the left menu, under *Services* category, select **Services**.
302+
303+
1. From the list, select **configserver**.
304+
305+
1. Under *Bindings*, find the line for *my-config-client* select and select **Delete**.
306+
307+
1. Select **Next**.
308+
309+
1. Select the **Review** tab.
310+
311+
1. Select the **Configure** button.
252312
253313
---
254314
@@ -267,4 +327,3 @@ az group delete \
267327
268328
> [!div class="nextstepaction"]
269329
> [Customize Config Server for Spring settings](java-config-server-usage.md)
270-

0 commit comments

Comments
 (0)