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/aks/howto-deploy-java-liberty-app.md
+23-19Lines changed: 23 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Deploy a Java application with Open Liberty/WebSphere Liberty on an Azure Kubernetes Service (AKS) cluster
3
3
recommendations: false
4
4
description: Deploy a Java application with Open Liberty/WebSphere Liberty on an Azure Kubernetes Service (AKS) cluster
5
-
author: zhengchang907
5
+
author: KarlErickson
6
6
ms.author: zhengchang
7
7
ms.service: container-service
8
8
ms.topic: how-to
@@ -66,12 +66,14 @@ If you navigated away from the **Deployment is in progress** page, the following
66
66
1. Save aside the values for **Login server**, **Registry name**, **Username**, and **password**. You may use the copy icon at the right of each field to copy the value of that field to the system clipboard.
67
67
1. Navigate again to the resource group into which you deployed the resources.
68
68
1. In the **Settings** section, select **Deployments**.
69
-
1. Select the bottom-most deployment in the list. The **Deployment name** will match the publisher ID of the offer. It will contain the string **ibm**.
69
+
1. Select the bottom-most deployment in the list. The **Deployment name** will match the publisher ID of the offer. It will contain the string `ibm`.
70
70
1. In the left pane, select **Outputs**.
71
71
1. Using the same copy technique as with the preceding values, save aside the values for the following outputs:
72
72
73
-
***cmdToConnectToCluster**
74
-
73
+
*`cmdToConnectToCluster`
74
+
*`appDeploymentTemplateYaml`
75
+
76
+
1. Paste the value of `appDeploymentTemplateYaml` into a Bash shell, append `| grep secretName`, and execute. This command will output the Ingress TLS secret name, such as `- secretName: secret785e2c`. Save aside the value for `secretName` from the output.
75
77
76
78
These values will be used later in this article. Note that several other useful commands are listed in the outputs.
77
79
@@ -109,7 +111,7 @@ java-app
109
111
├─ src/main/
110
112
│ ├─ aks/
111
113
│ │ ├─ db-secret.yaml
112
-
│ │ ├─ openlibertyapplication.yaml
114
+
│ │ ├─ openlibertyapplication-agic.yaml
113
115
│ ├─ docker/
114
116
│ │ ├─ Dockerfile
115
117
│ │ ├─ Dockerfile-local
@@ -125,7 +127,7 @@ java-app
125
127
126
128
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`.
127
129
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.
129
131
130
132
In directory *liberty/config*, the *server.xml* FILE is used to configure the DB connection for the Open Liberty and WebSphere Liberty cluster.
@@ -161,7 +164,7 @@ Use your local ide, or `liberty:run` command to run and test the project locally
161
164
cd<path-to-your-repo>/java-app
162
165
mvn liberty:run
163
166
```
164
-
167
+
165
168
1. Verify the application works as expected. You should see a message similar to `[INFO] [AUDIT] CWWKZ0003I: The application javaee-cafe updated in 1.930 seconds.` in the command output if successful. Go to `http://localhost:9080/` in your browser and verify the application is accessible and all functions are working.
166
169
167
170
1. Press `Ctrl+C` to stop `liberty:run` mode.
@@ -173,10 +176,10 @@ After successfully running the app in the Liberty Docker container, you can run
0 commit comments