Skip to content

Commit b90e7e1

Browse files
Merge pull request #1 from craigshoemaker/aca/component-portal
[Container Apps] Update: Copy edit portal steps for components
2 parents 612fa22 + c7ac1c2 commit b90e7e1

15 files changed

+199
-72
lines changed

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

Lines changed: 99 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* window, 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
@@ -126,6 +158,7 @@ This environment is used to host both the Config Server for Spring java componen
126158
Now that you have a Container Apps environment, you can create your container app and bind it to a Config Server for Spring java component. When you bind your container app, configuration values automatically synchronize from the Config Server component to your application.
127159
128160
### [Azure CLI](#tab/azure-cli)
161+
129162
1. Create the Config Server for Spring Java component.
130163
131164
```azurecli
@@ -147,28 +180,43 @@ Now that you have a Container Apps environment, you can create your container ap
147180
```
148181
149182
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.
183+
150184
### [Azure portal](#tab/azure-portal)
151185

152-
Now that you have an existing environment and config server client container app, create a Java component instance of Config Server for Spring.
186+
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.
187+
188+
1. Go to your container app's environment in the portal.
189+
190+
1. From the left menu, under *Services* category, select **Services**.
191+
192+
1. Select **+ Configure** drop down, and select **Java component**.
153193
154-
1. Go to your container app environment page, select **Service** on the left panel, and then select **Configure**, **Java component**
194+
1. In the *Configure Java component* panel, enter the following values.
155195
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":::
196+
| Property | Value |
197+
|---|---|
198+
| **Java component type** | Select **Config Server for Spring**. |
199+
| **Java component name** | Enter **configserver**. |
157200
158-
2. In new **Configure Java component** panel, select or enter the following values
201+
1. In the *Git repositories* section, select the **+ Add** button and enter the following values.
159202
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":::
203+
| Property | Value |
204+
|---|---|
205+
| **Type** | Select **HTTP**. |
206+
| **URI** | Enter **https://github.com/Azure-Samples/azure-spring-cloud-config-java-aca.git**. |
161207
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":::
208+
Leave the rest of the fields with the default values and select **Add**.
209+
210+
1. Select **Next**.
211+
212+
1. On the *Review* tab, select **Configure**.
165213
166-
4. Click **Next**, and then click **Configure** on **Review** page
167214
---
168215
169216
## Bind your container app to the Config Server for Spring Java component
170217
171218
### [Azure CLI](#tab/azure-cli)
219+
172220
1. Create the container app that consumes configuration data.
173221
174222
```azurecli
@@ -203,16 +251,21 @@ Now that you have an existing environment and config server client container app
203251
204252
### [Azure portal](#tab/azure-portal)
205253
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":::
254+
1. Go to your container app environment in the portal.
212255
213-
5. Go to your container app **my-config-client** page, get the **Application URL** of the container app
214-
---
256+
1. From the left menu, under *Services* category, select **Services**.
215257
258+
1. From the list, select **configserver**.
259+
260+
1. Under *bindings, select the *App name* drop-down and select **my-config-client**.
261+
262+
1. Select the **Review** tab.
263+
264+
1. Select the **Configure** button.
265+
266+
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.
267+
268+
---
216269
217270
Once the container app and the Config Server component are bound together, configuration changes are automatically synchronized to the container app.
218271
@@ -233,6 +286,7 @@ If you want to customize your own `SPRING_CONFIG_IMPORT`, you can refer to the e
233286
You can also remove a binding from your application.
234287
235288
## Unbind your container app from the Config Server for Spring Java component
289+
236290
### [Azure CLI](#tab/azure-cli)
237291
To remove a binding from a container app, use the `--unbind` option.
238292
@@ -242,13 +296,22 @@ You can also remove a binding from your application.
242296
--unbind $JAVA_COMPONENT_NAME \
243297
--resource-group $RESOURCE_GROUP
244298
```
299+
245300
### [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":::
301+
302+
1. Go to your container app environment in the portal.
303+
304+
1. From the left menu, under *Services* category, select **Services**.
305+
306+
1. From the list, select **configserver**.
307+
308+
1. Under *Bindings*, find the line for *my-config-client* select and select **Delete**.
309+
310+
1. Select **Next**.
311+
312+
1. Select the **Review** tab.
313+
314+
1. Select the **Configure** button.
252315
253316
---
254317
@@ -267,4 +330,3 @@ az group delete \
267330
268331
> [!div class="nextstepaction"]
269332
> [Customize Config Server for Spring settings](java-config-server-usage.md)
270-

0 commit comments

Comments
 (0)