You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -45,7 +45,7 @@ When running in Config Server for Spring in Azure Container Apps, be aware of th
45
45
|**Scope**| The Config Server for Spring runs in the same environment as the connected container app. |
46
46
|**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`. |
47
47
|**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. |
49
49
|**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. |
50
50
51
51
## Setup
@@ -77,7 +77,7 @@ Execute the following commands to create your resource group and Container Apps
77
77
|`IMAGE`| The container image used in your container app. |
78
78
|`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`. |
79
79
80
-
1. Log in to Azure with the Azure CLI.
80
+
1. Sign in to Azure with the Azure CLI.
81
81
82
82
```azurecli
83
83
az login
@@ -100,22 +100,54 @@ Execute the following commands to create your resource group and Container Apps
100
100
101
101
### [Azure portal](#tab/azure-portal)
102
102
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.
104
104
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**.
107
106
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.
109
108
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**. |
| **Container Apps environment** | Select the **Create new** link to create a new environment. |
111
117
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.
113
119
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**. |
117
124
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.
119
151
120
152
---
121
153
@@ -126,6 +158,7 @@ This environment is used to host both the Config Server for Spring java componen
126
158
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.
127
159
128
160
### [Azure CLI](#tab/azure-cli)
161
+
129
162
1. Create the Config Server for Spring Java component.
130
163
131
164
```azurecli
@@ -147,28 +180,43 @@ Now that you have a Container Apps environment, you can create your container ap
147
180
```
148
181
149
182
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 forchangesin your git repository.
183
+
150
184
### [Azure portal](#tab/azure-portal)
151
185
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**.
153
193
154
-
1. Go to your container app environment page, select**Service** on the left panel, and thenselect**Configure**,**Java component**
194
+
1. In the *Configure Java component* panel, enter the following values.
155
195
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**. |
157
200
158
-
2. In new **Configure Java component** panel, selector enter the following values
201
+
1. In the *Git repositories* section, select the **+ Add** button and enter the following values.
159
202
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**. |
161
207
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**.
165
213
166
-
4. Click **Next**, and then click **Configure** on **Review** page
167
214
---
168
215
169
216
## Bind your container app to the Config Server for Spring Java component
170
217
171
218
### [Azure CLI](#tab/azure-cli)
219
+
172
220
1. Create the container app that consumes configuration data.
173
221
174
222
```azurecli
@@ -203,16 +251,21 @@ Now that you have an existing environment and config server client container app
203
251
204
252
### [Azure portal](#tab/azure-portal)
205
253
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, selectapp**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.
212
255
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**.
215
257
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
+
---
216
269
217
270
Once the container app and the Config Server component are bound together, configuration changes are automatically synchronized to the container app.
218
271
@@ -233,6 +286,7 @@ If you want to customize your own `SPRING_CONFIG_IMPORT`, you can refer to the e
233
286
You can also remove a binding from your application.
234
287
235
288
## Unbind your container app from the Config Server for Spring Java component
289
+
236
290
### [Azure CLI](#tab/azure-cli)
237
291
To remove a binding from a container app, use the `--unbind` option.
238
292
@@ -242,13 +296,22 @@ You can also remove a binding from your application.
242
296
--unbind $JAVA_COMPONENT_NAME \
243
297
--resource-group $RESOURCE_GROUP
244
298
```
299
+
245
300
### [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.
252
315
253
316
---
254
317
@@ -267,4 +330,3 @@ az group delete \
267
330
268
331
> [!div class="nextstepaction"]
269
332
> [Customize Config Server for Spring settings](java-config-server-usage.md)
0 commit comments