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
Copy file name to clipboardExpand all lines: articles/container-apps/java-admin-eureka-integration.md
+36-40Lines changed: 36 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
---
2
-
title: "Tutorial: Integrate Admin for Spring with Eureka Server for Spring in Azure Container Apps"
2
+
title: "Tutorial: Integrate Admin for Spring with Eureka Server for Spring in Azure Container Apps (preview)"
3
3
description: Learn to integrate Admin for Spring with Eureka Server for Spring in Azure Container Apps.
4
4
services: container-apps
5
5
author:
6
6
ms.service: container-apps
7
7
ms.custom: devx-track-extended-java
8
8
ms.topic: conceptual
9
-
ms.date: 05/24/2024
9
+
ms.date: 07/08/2024
10
10
ms.author:
11
11
---
12
12
13
-
# Tutorial: Integrate Admin for Spring with Eureka Server for Spring in Azure Container Apps (Preview)
13
+
# Tutorial: Integrate Admin for Spring with Eureka Server for Spring in Azure Container Apps (preview)
14
14
15
15
This tutorial will guide you through the process of integrating a managed Admin for Spring with a Eureka Server for Spring within Azure Container Apps.
16
16
@@ -38,13 +38,7 @@ To complete this tutorial, you need the following items:
38
38
39
39
When running managed Java components in Azure Container Apps, be aware of the following details:
40
40
41
-
| Item | Explanation |
42
-
|---|---|
43
-
|**Scope**| The Java components run in the same environment as the connected container apps. |
44
-
|**Scaling**| Both the Eureka Server and Admin for Spring have fixed scaling properties (`minReplicas` and `maxReplicas` set to `1`). |
45
-
|**Resources**| The resource allocation for both components is fixed. Each is allocated 0.5 CPU cores and 1Gi of memory. |
46
-
|**Pricing**| Billing falls under consumption-based pricing. Resources consumed by managed Java components are billed at active/idle rates. You can delete components that are no longer in use to stop billing. |
47
-
|**Binding**| Container apps connect to managed Java components via a binding, which injects configurations into container app environment variables. |
@@ -90,9 +84,12 @@ Before you begin, create the necessary resources by executing the following comm
90
84
az containerapp env create \
91
85
--name $ENVIRONMENT \
92
86
--resource-group $RESOURCE_GROUP \
93
-
--location $LOCATION
87
+
--location $LOCATION \
88
+
--query "properties.provisioningState"
94
89
```
95
90
91
+
Using the `--query` parameter filters the response down to a simple success or failure message.
92
+
96
93
## Optional: Create the Eureka Server for Spring
97
94
98
95
1. If you don't have an existing Eureka Server for Spring, follow the command below to create the Eureka Server Java component. For more information, see [Create the Eureka Server for Spring](java-eureka-server.md#Create-the-Eureka-Server-for-Spring-Java-component).
@@ -104,7 +101,7 @@ Before you begin, create the necessary resources by executing the following comm
104
101
--name $EUREKA_COMPONENT_NAME
105
102
```
106
103
107
-
## Create the Admin for Spring and bind it to the Eureka Server for Spring
104
+
## Bind the components together
108
105
109
106
1. Create the Admin for Spring Java component.
110
107
@@ -116,12 +113,10 @@ Before you begin, create the necessary resources by executing the following comm
116
113
--bind $EUREKA_COMPONENT_NAME
117
114
```
118
115
119
-
120
-
## Bind Other Applications to the Eureka Server
116
+
## Bind other apps to the Eureka Server
121
117
122
118
With the Eureka Server set up, you can now bind other applications to it for service discovery. And you can also monitor and manage these applications in the dashboard of Admin for Spring. Follow the steps below to create and bind a container app to the Eureka Server:
123
119
124
-
125
120
1. Create the container app and bind it to the Eureka Server.
126
121
127
122
```azurecli
@@ -139,7 +134,7 @@ With the Eureka Server set up, you can now bind other applications to it for ser
139
134
140
135
> [!TIP] Since the Admin for Spring has been binded to the Eureka Server for Spring in previous steps. Bind the container app to the Eureka Server Java component will enable service discovery and allow to be managed through the Admin for Spring dashboard at the same time.
141
136
142
-
## View the application in both Admin for Spring and Eureka Server for Spring dashboards
137
+
## View the dashboards
143
138
144
139
> [!IMPORTANT]
145
140
> To view the dashboard, you need to have at least the `Microsoft.App/managedEnvironments/write` role assigned to your account on the managed environment resource. You can either explicitly assign `Owner` or `Contributor` role on the resource or follow the steps to create a custom role definition and assign it to your account.
@@ -154,53 +149,54 @@ With the Eureka Server set up, you can now bind other applications to it for ser
Before running this command, replace the placeholder in between the `<>` brackets with your user or service principal ID.
171
+
176
172
```azurecli
177
-
az role assignment create \
178
-
--assignee <user-or-service-principal-id> \
179
-
--role "Java Component Dashboard Access" \
180
-
--scope $ENVIRONMENT_ID
173
+
az role assignment create \
174
+
--assignee <USER_OR_SERVICE_PRINCIPAL_ID> \
175
+
--role "Java Component Dashboard Access" \
176
+
--scope $ENVIRONMENT_ID
181
177
```
182
178
183
179
1. Get the URL of the Admin for Spring dashboard.
184
180
185
181
```azurecli
186
-
az containerapp env java-component admin-for-spring show \
187
-
--environment $ENVIRONMENT \
188
-
--resource-group $RESOURCE_GROUP \
189
-
--name $ADMIN_COMPONENT_NAME \
190
-
--query properties.ingress.fqdn -o tsv
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 -o tsv
191
187
```
192
188
193
189
1. Get the URL of the Eureka Server for Spring dashboard.
194
190
195
191
```azurecli
196
-
az containerapp env java-component eureka-server-for-spring show \
197
-
--environment $ENVIRONMENT \
198
-
--resource-group $RESOURCE_GROUP \
199
-
--name $EUREKA_COMPONENT_NAME \
200
-
--query properties.ingress.fqdn -o tsv
192
+
az containerapp env java-component eureka-server-for-spring show \
193
+
--environment $ENVIRONMENT \
194
+
--resource-group $RESOURCE_GROUP \
195
+
--name $EUREKA_COMPONENT_NAME \
196
+
--query properties.ingress.fqdn -o tsv
201
197
```
202
198
203
-
You should be able to access the Admin for Spring dashboard and the Eureka Server for Spring dashboard using the URLs provided. And the container app as well as the Admin for Spring server should be visible in both dashboards like screenshots below:
199
+
This command returns the URL you can use to access the Eureka Server for Spring dashboard. Through the dashboard, you container app is also to you as shown in the following screenshot.
204
200
205
201
:::image type="content" source="media/java-components/sba.png" alt-text="Screenshot of the Admin for Spring dashboard." lightbox="media/java-components/sba.png":::
206
202
@@ -211,7 +207,7 @@ With the Eureka Server set up, you can now bind other applications to it for ser
211
207
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.
0 commit comments