Skip to content

Commit 840aac8

Browse files
committed
edits
1 parent 80f371a commit 840aac8

8 files changed

+996
-1014
lines changed

articles/container-apps/.openpublishing.redirection.container-apps.json

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,69 +26,69 @@
2626
"redirect_document_id": false
2727
},
2828
{
29-
"source_path_from_root": "/articles/container-apps/disaster-recovery.md",
30-
"redirect_url": "/azure/reliability/reliability-azure-container-apps",
31-
"redirect_document_id": false
29+
"source_path_from_root": "/articles/container-apps/disaster-recovery.md",
30+
"redirect_url": "/azure/reliability/reliability-azure-container-apps",
31+
"redirect_document_id": false
3232
},
3333
{
34-
"source_path_from_root": "/articles/container-apps/start.md",
35-
"redirect_url": "/azure/container-apps/overview",
36-
"redirect_document_id": false
34+
"source_path_from_root": "/articles/container-apps/start.md",
35+
"redirect_url": "/azure/container-apps/overview",
36+
"redirect_document_id": false
3737
},
3838
{
39-
"source_path_from_root": "/articles/container-apps/spring-cloud-eureka-server-usage.md",
40-
"redirect_url": "/azure/container-apps/java-eureka-server-usage",
41-
"redirect_document_id": false
39+
"source_path_from_root": "/articles/container-apps/spring-cloud-eureka-server-usage.md",
40+
"redirect_url": "/azure/container-apps/java-eureka-server-usage",
41+
"redirect_document_id": false
4242
},
4343
{
44-
"source_path_from_root": "/articles/container-apps/spring-cloud-eureka-server.md",
45-
"redirect_url": "/azure/container-apps/java-eureka-server",
46-
"redirect_document_id": false
44+
"source_path_from_root": "/articles/container-apps/spring-cloud-eureka-server.md",
45+
"redirect_url": "/azure/container-apps/java-eureka-server",
46+
"redirect_document_id": false
4747
},
4848
{
49-
"source_path_from_root": "/articles/container-apps/spring-cloud-config-server-usage.md",
50-
"redirect_url": "/azure/container-apps/java-config-server-usage",
51-
"redirect_document_id": false
49+
"source_path_from_root": "/articles/container-apps/spring-cloud-config-server-usage.md",
50+
"redirect_url": "/azure/container-apps/java-config-server-usage",
51+
"redirect_document_id": false
5252
},
5353
{
54-
"source_path_from_root": "/articles/container-apps/spring-cloud-config-server.md",
55-
"redirect_url": "/azure/container-apps/java-config-server",
56-
"redirect_document_id": false
54+
"source_path_from_root": "/articles/container-apps/spring-cloud-config-server.md",
55+
"redirect_url": "/azure/container-apps/java-config-server",
56+
"redirect_document_id": false
5757
},
5858
{
59-
"source_path_from_root": "/articles/container-apps/authentication-azure-active-directory.md",
60-
"redirect_url": "/azure/container-apps/authentication-entra",
61-
"redirect_document_id": false
59+
"source_path_from_root": "/articles/container-apps/authentication-azure-active-directory.md",
60+
"redirect_url": "/azure/container-apps/authentication-entra",
61+
"redirect_document_id": false
6262
},
6363
{
64-
"source_path_from_root": "/articles/container-apps/network-proxy.md",
65-
"redirect_url": "/azure/container-apps/ingress-overview",
66-
"redirect_document_id": false
64+
"source_path_from_root": "/articles/container-apps/network-proxy.md",
65+
"redirect_url": "/azure/container-apps/ingress-overview",
66+
"redirect_document_id": false
6767
},
6868
{
69-
"source_path_from_root": "/articles/container-apps/hardware.md",
70-
"redirect_url": "/azure/container-apps/workload-profiles-overview",
71-
"redirect_document_id": false
69+
"source_path_from_root": "/articles/container-apps/hardware.md",
70+
"redirect_url": "/azure/container-apps/workload-profiles-overview",
71+
"redirect_document_id": false
7272
},
7373
{
74-
"source_path_from_root": "/articles/container-apps/background-processing.md",
75-
"redirect_url": "/azure/container-apps/tutorial-event-driven-jobs",
76-
"redirect_document_id": false
74+
"source_path_from_root": "/articles/container-apps/background-processing.md",
75+
"redirect_url": "/azure/container-apps/tutorial-event-driven-jobs",
76+
"redirect_document_id": false
7777
},
7878
{
7979
"source_path_from_root": "/articles/container-apps/java-admin-for-spring-usage.md",
80-
"redirect_url": "/azure/container-apps/java-admin",
81-
"redirect_document_id": false
80+
"redirect_url": "/azure/container-apps/java-admin",
81+
"redirect_document_id": false
8282
},
8383
{
8484
"source_path_from_root": "/articles/container-apps/java-config-server-usage.md",
85-
"redirect_url": "/azure/container-apps/java-config-server",
86-
"redirect_document_id": false
85+
"redirect_url": "/azure/container-apps/java-config-server",
86+
"redirect_document_id": false
8787
},
8888
{
8989
"source_path_from_root": "/articles/container-apps/java-eureka-server-usage.md",
90-
"redirect_url": "/azure/container-apps/java-eureka-server",
91-
"redirect_document_id": false
90+
"redirect_url": "/azure/container-apps/java-eureka-server",
91+
"redirect_document_id": false
9292
}
9393
]
94-
}
94+
}

articles/container-apps/java-admin-eureka-integration.md

Lines changed: 99 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,9 @@ In this tutorial, you will learn to:
2626

2727
## Prerequisites
2828

29-
To complete this tutorial, you need the following items:
30-
31-
| Requirement | Instructions |
32-
|--|--|
33-
| Azure account | An active subscription is required. If you don't have one, you [can create one for free](https://azure.microsoft.com/free/). |
34-
| Azure CLI | Install the [Azure CLI](/cli/azure/install-azure-cli).|
35-
| An existing Eureka Server for Spring Java component | If you don't have one, follow the [Create the Eureka Server for Spring](java-eureka-server.md#create-the-eureka-server-for-spring-java-component) section to create one. |
29+
* An Azure account with an active subscription. If you don't already have one, you can [can create one for free](https://azure.microsoft.com/free/).
30+
* [Azure CLI](/cli/azure/install-azure-cli).
31+
* An existing Eureka Server for Spring Java component. If you don't have one, see [Create the Eureka Server for Spring](java-eureka-server.md#create-the-eureka-server-for-spring-java-component).
3632

3733
## Considerations
3834

@@ -46,47 +42,47 @@ Before you begin, create the necessary resources by executing the following comm
4642

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

49-
```bash
50-
export LOCATION=eastus
51-
export RESOURCE_GROUP=my-services-resource-group
52-
export ENVIRONMENT=my-environment
53-
export EUREKA_COMPONENT_NAME=eureka
54-
export ADMIN_COMPONENT_NAME=admin
55-
export CLIENT_APP_NAME=sample-service-eureka-client
56-
export CLIENT_IMAGE="mcr.microsoft.com/javacomponents/samples/sample-admin-for-spring-client:latest"
57-
```
58-
59-
| Variable | Description |
60-
|---|---|
61-
| `LOCATION` | The Azure region location where you create your container app and Java components. |
62-
| `RESOURCE_GROUP` | The Azure resource group name for your demo application. |
63-
| `ENVIRONMENT` | The Azure Container Apps environment name for your demo application. |
64-
| `EUREKA_COMPONENT_NAME` | The name of the Eureka Server Java component. |
65-
| `ADMIN_COMPONENT_NAME` | The name of the Admin for Spring Java component. |
66-
| `CLIENT_APP_NAME` | The name of the container app that will bind to the Eureka Server. |
67-
| `CLIENT_IMAGE` | The container image used in your Eureka Server container app. |
45+
```bash
46+
export LOCATION=eastus
47+
export RESOURCE_GROUP=my-services-resource-group
48+
export ENVIRONMENT=my-environment
49+
export EUREKA_COMPONENT_NAME=eureka
50+
export ADMIN_COMPONENT_NAME=admin
51+
export CLIENT_APP_NAME=sample-service-eureka-client
52+
export CLIENT_IMAGE="mcr.microsoft.com/javacomponents/samples/sample-admin-for-spring-client:latest"
53+
```
54+
55+
| Variable | Description |
56+
|-------------------------|------------------------------------------------------------------------------------|
57+
| `LOCATION` | The Azure region location where you create your container app and Java components. |
58+
| `RESOURCE_GROUP` | The Azure resource group name for your demo application. |
59+
| `ENVIRONMENT` | The Azure Container Apps environment name for your demo application. |
60+
| `EUREKA_COMPONENT_NAME` | The name of the Eureka Server Java component. |
61+
| `ADMIN_COMPONENT_NAME` | The name of the Admin for Spring Java component. |
62+
| `CLIENT_APP_NAME` | The name of the container app that will bind to the Eureka Server. |
63+
| `CLIENT_IMAGE` | The container image used in your Eureka Server container app. |
6864

6965
1. Log in to Azure with the Azure CLI.
7066

71-
```azurecli
72-
az login
73-
```
67+
```azurecli
68+
az login
69+
```
7470

7571
1. Create a resource group.
7672

77-
```azurecli
78-
az group create --name $RESOURCE_GROUP --location $LOCATION
79-
```
73+
```azurecli
74+
az group create --name $RESOURCE_GROUP --location $LOCATION
75+
```
8076

8177
1. Create your container apps environment.
8278

83-
```azurecli
84-
az containerapp env create \
85-
--name $ENVIRONMENT \
86-
--resource-group $RESOURCE_GROUP \
87-
--location $LOCATION \
88-
--query "properties.provisioningState"
89-
```
79+
```azurecli
80+
az containerapp env create \
81+
--name $ENVIRONMENT \
82+
--resource-group $RESOURCE_GROUP \
83+
--location $LOCATION \
84+
--query "properties.provisioningState"
85+
```
9086

9187
Using the `--query` parameter filters the response down to a simple success or failure message.
9288

@@ -96,9 +92,9 @@ If you don't have an existing Eureka Server for Spring, follow the command below
9692

9793
```azurecli
9894
az containerapp env java-component eureka-server-for-spring create \
99-
--environment $ENVIRONMENT \
100-
--resource-group $RESOURCE_GROUP \
101-
--name $EUREKA_COMPONENT_NAME
95+
--environment $ENVIRONMENT \
96+
--resource-group $RESOURCE_GROUP \
97+
--name $EUREKA_COMPONENT_NAME
10298
```
10399

104100
## Bind the components together
@@ -107,12 +103,12 @@ Create the Admin for Spring Java component.
107103

108104
```azurecli
109105
az containerapp env java-component admin-for-spring create \
110-
--environment $ENVIRONMENT \
111-
--resource-group $RESOURCE_GROUP \
112-
--name $ADMIN_COMPONENT_NAME \
113-
--min-replicas 1 \
114-
--max-replicas 1 \
115-
--bind $EUREKA_COMPONENT_NAME
106+
--environment $ENVIRONMENT \
107+
--resource-group $RESOURCE_GROUP \
108+
--name $ADMIN_COMPONENT_NAME \
109+
--min-replicas 1 \
110+
--max-replicas 1 \
111+
--bind $EUREKA_COMPONENT_NAME
116112
```
117113

118114
## Bind other apps to the Eureka Server
@@ -123,15 +119,15 @@ Create the container app and bind it to the Eureka Server.
123119

124120
```azurecli
125121
az containerapp create \
126-
--name $CLIENT_APP_NAME \
127-
--resource-group $RESOURCE_GROUP \
128-
--environment $ENVIRONMENT \
129-
--image $CLIENT_IMAGE \
130-
--min-replicas 1 \
131-
--max-replicas 1 \
132-
--ingress external \
133-
--target-port 8080 \
134-
--bind $EUREKA_COMPONENT_NAME
122+
--name $CLIENT_APP_NAME \
123+
--resource-group $RESOURCE_GROUP \
124+
--environment $ENVIRONMENT \
125+
--image $CLIENT_IMAGE \
126+
--min-replicas 1 \
127+
--max-replicas 1 \
128+
--ingress external \
129+
--target-port 8080 \
130+
--bind $EUREKA_COMPONENT_NAME
135131
```
136132

137133
> [!TIP]
@@ -144,74 +140,76 @@ az containerapp create \
144140
145141
1. Create the custom role definition.
146142

147-
```azurecli
148-
az role definition create --role-definition '{
149-
"Name": "Java Component Dashboard Access",
150-
"IsCustom": true,
151-
"Description": "Can access managed Java Component dashboards in managed environments",
152-
"Actions": [
153-
"Microsoft.App/managedEnvironments/write"
154-
],
155-
"AssignableScopes": ["/subscriptions/<SUBSCRIPTION_ID>"]
156-
}'
157-
```
143+
```azurecli
144+
az role definition create --role-definition '{
145+
"Name": "Java Component Dashboard Access",
146+
"IsCustom": true,
147+
"Description": "Can access managed Java Component dashboards in managed environments",
148+
"Actions": [
149+
"Microsoft.App/managedEnvironments/write"
150+
],
151+
"AssignableScopes": ["/subscriptions/<SUBSCRIPTION_ID>"]
152+
}'
153+
```
158154

159-
Make sure to replace placeholder in between the `<>` brackets in the `AssignableScopes` value with your subscription ID.
155+
Make sure to replace placeholder in between the `<>` brackets in the `AssignableScopes` value with your subscription ID.
160156

161157
1. Assign the custom role to your account on managed environment resource.
162158

163-
Get the resource id of the managed environment.
159+
Get the resource id of the managed environment.
164160

165-
```azurecli
166-
export ENVIRONMENT_ID=$(az containerapp env show \
167-
--name $ENVIRONMENT --resource-group $RESOURCE_GROUP \
168-
--query id -o tsv)
169-
```
161+
```azurecli
162+
export ENVIRONMENT_ID=$(az containerapp env show \
163+
--name $ENVIRONMENT --resource-group $RESOURCE_GROUP \
164+
--query id \
165+
--output tsv)
166+
```
170167

171168
1. Assign the role to your account.
172169

173-
Before running this command, replace the placeholder in between the `<>` brackets with your user or service principal ID.
170+
Before running this command, replace the placeholder in between the `<>` brackets with your user or service principal ID.
174171

175-
```azurecli
176-
az role assignment create \
177-
--assignee <USER_OR_SERVICE_PRINCIPAL_ID> \
178-
--role "Java Component Dashboard Access" \
179-
--scope $ENVIRONMENT_ID
180-
```
172+
```azurecli
173+
az role assignment create \
174+
--assignee <USER_OR_SERVICE_PRINCIPAL_ID> \
175+
--role "Java Component Dashboard Access" \
176+
--scope $ENVIRONMENT_ID
177+
```
181178

182179
1. Get the URL of the Admin for Spring dashboard.
183180

184-
```azurecli
185-
az containerapp env java-component admin-for-spring show \
186-
--environment $ENVIRONMENT \
187-
--resource-group $RESOURCE_GROUP \
188-
--name $ADMIN_COMPONENT_NAME \
189-
--query properties.ingress.fqdn -o tsv
190-
```
181+
```azurecli
182+
az containerapp env java-component admin-for-spring show \
183+
--environment $ENVIRONMENT \
184+
--resource-group $RESOURCE_GROUP \
185+
--name $ADMIN_COMPONENT_NAME \
186+
--query properties.ingress.fqdn \
187+
--output tsv
188+
```
191189

192190
1. Get the URL of the Eureka Server for Spring dashboard.
193191

194-
```azurecli
195-
az containerapp env java-component eureka-server-for-spring show \
196-
--environment $ENVIRONMENT \
197-
--resource-group $RESOURCE_GROUP \
198-
--name $EUREKA_COMPONENT_NAME \
199-
--query properties.ingress.fqdn -o tsv
200-
```
192+
```azurecli
193+
az containerapp env java-component eureka-server-for-spring show \
194+
--environment $ENVIRONMENT \
195+
--resource-group $RESOURCE_GROUP \
196+
--name $EUREKA_COMPONENT_NAME \
197+
--query properties.ingress.fqdn \
198+
--output tsv
199+
```
201200

202-
This command returns the URL you can use to access the Eureka Server for Spring dashboard. Through the dashboard, your container app is also to you as shown in the following screenshot.
201+
This command returns the URL you can use to access the Eureka Server for Spring dashboard. Through the dashboard, your container app is also to you as shown in the following screenshot.
203202

204-
:::image type="content" source="media/java-components/spring-boot-admin.png" alt-text="Screenshot of the Admin for Spring dashboard." lightbox="media/java-components/spring-boot-admin.png":::
203+
:::image type="content" source="media/java-components/spring-boot-admin.png" alt-text="Screenshot of the Admin for Spring dashboard." lightbox="media/java-components/spring-boot-admin.png":::
205204

206-
:::image type="content" source="media/java-components/eureka.png" alt-text="Screenshot of the Eureka Server for Spring dashboard." lightbox="media/java-components/eureka.png":::
205+
:::image type="content" source="media/java-components/eureka.png" alt-text="Screenshot of the Eureka Server for Spring dashboard." lightbox="media/java-components/eureka.png":::
207206

208207
## Clean up resources
209208

210209
The resources created in this tutorial have an effect on your Azure bill. If you aren't going to use these services long-term, run the following command to remove everything created in this tutorial.
211210

212211
```azurecli
213-
az group delete \
214-
--resource-group $RESOURCE_GROUP
212+
az group delete --resource-group $RESOURCE_GROUP
215213
```
216214

217215
## Related content

0 commit comments

Comments
 (0)