Skip to content

Commit 3a6af68

Browse files
committed
revise the guide to work with agic
Signed-off-by: Jianguo Ma <[email protected]>
1 parent 67cbb0c commit 3a6af68

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

articles/aks/howto-deploy-java-liberty-app.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ If you navigated away from the **Deployment is in progress** page, the following
7171
1. Using the same copy technique as with the preceding values, save aside the values for the following outputs:
7272

7373
* **cmdToConnectToCluster**
74-
74+
* **appDeploymentTemplateYaml**
75+
76+
1. Paste the value of **appDeploymentTemplateYaml** into a bash shell, append `| grep secretName` and execute. It will output the Ingress TLS secret name, e.g., `- secretName: secret785e2c`. Save aside the value for **secretName** from the output.
7577

7678
These values will be used later in this article. Note that several other useful commands are listed in the outputs.
7779

@@ -109,7 +111,7 @@ java-app
109111
├─ src/main/
110112
│ ├─ aks/
111113
│ │ ├─ db-secret.yaml
112-
│ │ ├─ openlibertyapplication.yaml
114+
│ │ ├─ openlibertyapplication-agic.yaml
113115
│ ├─ docker/
114116
│ │ ├─ Dockerfile
115117
│ │ ├─ Dockerfile-local
@@ -125,7 +127,7 @@ java-app
125127

126128
The directories *java*, *resources*, and *webapp* contain the source code of the sample application. The code declares and uses a data source named `jdbc/JavaEECafeDB`.
127129

128-
In the *aks* directory, we placed two deployment files. *db-secret.xml* is used to create [Kubernetes Secrets](https://kubernetes.io/docs/concepts/configuration/secret/) with DB connection credentials. The file *openlibertyapplication.yaml* is used to deploy the application image.
130+
In the *aks* directory, we placed three deployment files. *db-secret.xml* is used to create [Kubernetes Secrets](https://kubernetes.io/docs/concepts/configuration/secret/) with DB connection credentials. The file *openlibertyapplication-agic.yaml* is used to deploy the application image.
129131

130132
In directory *liberty/config*, the *server.xml* FILE is used to configure the DB connection for the Open Liberty and WebSphere Liberty cluster.
131133

@@ -145,6 +147,7 @@ export DB_SERVER_NAME=<Server name>.database.windows.net
145147
export DB_NAME=<Database name>
146148
export DB_USER=<Server admin login>@<Server name>
147149
export DB_PASSWORD=<Server admin password>
150+
export INGRESS_TLS_SECRET=<Ingress TLS secret name>
148151

149152
mvn clean install
150153
```
@@ -196,7 +199,7 @@ The following steps deploy and test the application.
196199

197200
1. Connect to the AKS cluster.
198201

199-
Paste the value of **cmdToConnectToCluster** into a bash shell.
202+
Paste the value of **cmdToConnectToCluster** into a bash shell and execute.
200203

201204
1. Apply the DB secret.
202205

@@ -210,7 +213,7 @@ The following steps deploy and test the application.
210213
1. Apply the deployment file.
211214

212215
```bash
213-
kubectl apply -f openlibertyapplication.yaml
216+
kubectl apply -f openlibertyapplication-agic.yaml
214217
```
215218

216219
1. Wait for the pods to be restarted.
@@ -224,21 +227,23 @@ The following steps deploy and test the application.
224227
You should see output similar to the following to indicate that all the pods are running.
225228

226229
```bash
227-
NAME READY STATUS RESTARTS AGE
228-
javaee-cafe-cluster-67cdc95bc-2j2gr 1/1 Running 0 29s
229-
javaee-cafe-cluster-67cdc95bc-fgtt8 1/1 Running 0 29s
230-
javaee-cafe-cluster-67cdc95bc-h47qm 1/1 Running 0 29s
230+
NAME READY STATUS RESTARTS AGE
231+
javaee-cafe-cluster-agic-67cdc95bc-2j2gr 1/1 Running 0 29s
232+
javaee-cafe-cluster-agic-67cdc95bc-fgtt8 1/1 Running 0 29s
233+
javaee-cafe-cluster-agic-67cdc95bc-h47qm 1/1 Running 0 29s
231234
```
232235

233236
1. Verify the results.
234237

235-
1. Get endpoint of the deployed service
238+
1. Get **ADDRESS** of the Ingress resource deployed with the application
236239

237240
```bash
238-
kubectl get service
241+
kubectl get ingress
239242
```
240243

241-
1. Go to `http://EXTERNAL-IP` to test the application.
244+
Copy the value of **ADDRESS** from the output, this is the frontend public IP address of the deployed Azure Application Gateway.
245+
246+
1. Go to `https://<ADDRESS>` to test the application.
242247

243248

244249
## Clean up resources

0 commit comments

Comments
 (0)