Skip to content

Commit f1be909

Browse files
authored
Merge pull request #186538 from edburns/edburns-msft-dd-1468124-eap-openshift
On branch edburns-msft-dd-1468124-eap-openshift
2 parents 2f12587 + 15a1a07 commit f1be909

File tree

2 files changed

+19
-21
lines changed

2 files changed

+19
-21
lines changed

articles/openshift/howto-deploy-java-jboss-enterprise-application-platform-app.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The application is a stateful application that stores information in an HTTP Ses
3535

3636
[!INCLUDE [aro-quota](includes/aro-quota.md)]
3737

38-
1. Prepare a local machine with a Unix-like operating system that is supported by the various products installed (for example Red Hat Enterprise Linux 8 (latest update) in the case of JBoss EAP).
38+
1. Prepare a local machine with a Unix-like operating system that is supported by the various products installed.
3939
1. Install a Java SE implementation (for example, [Oracle JDK 11](https://www.oracle.com/java/technologies/downloads/#java11)).
4040
1. Install [Maven](https://maven.apache.org/download.cgi) 3.6.3 or higher.
4141
1. Install [Docker](https://docs.docker.com/get-docker/) for your OS.
@@ -85,9 +85,9 @@ However, when you are targeting OpenShift, you might want to trim the capabiliti
8585
Navigate to your demo application local repository and change the branch to `bootable-jar`:
8686
8787
```bash
88-
jboss-on-aro-jakartaee (main) $ git checkout bootable-jar
88+
$ git checkout bootable-jar
8989
Switched to branch 'bootable-jar'
90-
jboss-on-aro-jakartaee (bootable-jar) $
90+
$
9191
```
9292
9393
Let's do a quick review about what we have changed:
@@ -133,14 +133,14 @@ Follow the next steps to build and run the application locally.
133133
1. Build the Bootable JAR. When we are building the Bootable JAR, we need to specify the database driver version we want to use:
134134
135135
```bash
136-
jboss-on-aro-jakartaee (bootable-jar) $ MSSQLSERVER_DRIVER_VERSION=7.4.1.jre11 \
136+
$ MSSQLSERVER_DRIVER_VERSION=7.4.1.jre11 \
137137
mvn clean package
138138
```
139139
140140
1. Launch the Bootable JAR by using the following command. When we are launching the application, we need to pass the required environment variables to configure the data source:
141141
142142
```bash
143-
jboss-on-aro-jakartaee (bootable-jar) $ MSSQLSERVER_USER=SA \
143+
$ MSSQLSERVER_USER=SA \
144144
MSSQLSERVER_PASSWORD=Passw0rd! \
145145
MSSQLSERVER_JNDI=java:/comp/env/jdbc/mssqlds \
146146
MSSQLSERVER_DATABASE=todos_db \
@@ -154,7 +154,7 @@ Follow the next steps to build and run the application locally.
154154
1. (Optional) If you want to verify the clustering capabilities, you can also launch more instances of the same application by passing to the Bootable JAR the `jboss.node.name` argument and, to avoid conflicts with the port numbers, shifting the port numbers by using `jboss.socket.binding.port-offset`. For example, to launch a second instance that will represent a new pod on OpenShift, you can execute the following command in a new terminal window:
155155
156156
```bash
157-
jboss-on-aro-jakartaee (bootable-jar) $ MSSQLSERVER_USER=SA \
157+
$ MSSQLSERVER_USER=SA \
158158
MSSQLSERVER_PASSWORD=Passw0rd! \
159159
MSSQLSERVER_JNDI=java:/comp/env/jdbc/mssqlds \
160160
MSSQLSERVER_DATABASE=todos_db \
@@ -179,10 +179,10 @@ Follow the next steps to build and run the application locally.
179179
1. Check the application health endpoints (live and ready). These endpoints will be used by OpenShift to verify when your pod is live and ready to receive user requests:
180180
181181
```bash
182-
jboss-on-aro-jakartaee (bootable-jar) $ curl http://localhost:9990/health/live
182+
$ curl http://localhost:9990/health/live
183183
{"status":"UP","checks":[{"name":"SuccessfulCheck","status":"UP"}]}
184184
185-
jboss-on-aro-jakartaee (bootable-jar) $ curl http://localhost:9990/health/ready
185+
$ curl http://localhost:9990/health/ready
186186
{"status":"UP","checks":[{"name":"deployments-status","status":"UP","data":{"todo-list.war":"OK"}},{"name":"server-state","status":"UP","data":{"value":"running"}},{"name":"boot-errors","status":"UP"},{"name":"DBConnectionHealthCheck","status":"UP"}]}
187187
```
188188
@@ -217,9 +217,9 @@ To deploy the application, we are going to use the JBoss EAP Helm Charts already
217217
Navigate to your demo application local repository and change the current branch to `bootable-jar-openshift`:
218218

219219
```bash
220-
jboss-on-aro-jakartaee (bootable-jar) $ git checkout bootable-jar-openshift
220+
$ git checkout bootable-jar-openshift
221221
Switched to branch 'bootable-jar-openshift'
222-
jboss-on-aro-jakartaee (bootable-jar-openshift) $
222+
$
223223
```
224224

225225
Let's do a quick review about what we have changed:
@@ -240,7 +240,7 @@ This file expects the presence of an OpenShift Secret object named `mssqlserver-
240240
1. To create the Secret object with the information relative to the database, execute the following command on the `eap-demo` project created before at the pre-requisite steps section:
241241
242242
```bash
243-
jboss-on-aro-jakartaee (bootable-jar-openshift) $ oc create secret generic mssqlserver-secret \
243+
$ oc create secret generic mssqlserver-secret \
244244
--from-literal db-password=Passw0rd! \
245245
--from-literal db-user=sa \
246246
--from-literal db-name=todos_db
@@ -250,7 +250,7 @@ This file expects the presence of an OpenShift Secret object named `mssqlserver-
250250
1. Deploy the database server by executing the following:
251251
252252
```bash
253-
jboss-on-aro-jakartaee (bootable-jar-openshift) $ oc apply -f ./deployment/msqlserver/mssqlserver.yaml
253+
$ oc apply -f ./deployment/msqlserver/mssqlserver.yaml
254254
service/mssqlserver created
255255
deploymentconfig.apps.openshift.io/mssqlserver created
256256
persistentvolumeclaim/mssqlserver-pvc created
@@ -259,7 +259,7 @@ This file expects the presence of an OpenShift Secret object named `mssqlserver-
259259
1. Monitor the status of the pods and wait until the database server is running:
260260
261261
```bash
262-
jboss-on-aro-jakartaee (bootable-jar-openshift) $ oc get pods -w
262+
$ oc get pods -w
263263
NAME READY STATUS RESTARTS AGE
264264
mssqlserver-1-deploy 0/1 Completed 0 34s
265265
mssqlserver-1-gw7qw 1/1 Running 0 31s
@@ -268,7 +268,7 @@ This file expects the presence of an OpenShift Secret object named `mssqlserver-
268268
1. Connect to the database pod and create the database `todos_db`:
269269
270270
```bash
271-
jboss-on-aro-jakartaee (bootable-jar-openshift) $ oc rsh mssqlserver-1-gw7qw
271+
$ oc rsh mssqlserver-1-gw7qw
272272
sh-4.4$ /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'Passw0rd!'
273273
1> CREATE DATABASE todos_db
274274
2> GO
@@ -286,7 +286,7 @@ Before deploying the application, let's create the expected Secret object that w
286286
1. Execute the following to create the OpenShift secret object that will hold the application configuration:
287287

288288
```bash
289-
jboss-on-aro-jakartaee (bootable-jar-openshift) $ oc create secret generic todo-list-secret \
289+
$ oc create secret generic todo-list-secret \
290290
--from-literal app-driver-version=7.4.1.jre11 \
291291
--from-literal app-ds-jndi=java:/comp/env/jdbc/mssqlds \
292292
--from-literal app-cluster-password=mut2UTG6gDwNDcVW
@@ -353,7 +353,7 @@ Select **Uninstall Helm Release** to remove the application. Notice that the sec
353353
Execute the following command if you want to delete the secret that holds the application configuration:
354354

355355
```bash
356-
jboss-on-aro-jakartaee (bootable-jar-openshift) $ oc delete secrets/todo-list-secret
356+
$ oc delete secrets/todo-list-secret
357357
secret "todo-list-secret" deleted
358358
```
359359

@@ -362,12 +362,12 @@ secret "todo-list-secret" deleted
362362
If you want to delete the database and the related objects, execute the following command:
363363

364364
```bash
365-
jboss-on-aro-jakartaee (bootable-jar-openshift) $ oc delete all -l app=mssql2019
365+
$ oc delete all -l app=mssql2019
366366
replicationcontroller "mssqlserver-1" deleted
367367
service "mssqlserver" deleted
368368
deploymentconfig.apps.openshift.io "mssqlserver" deleted
369369
370-
jboss-on-aro-jakartaee (bootable-jar-openshift) $ oc delete secrets/mssqlserver-secret
370+
$ oc delete secrets/mssqlserver-secret
371371
secret "mssqlserver-secret" deleted
372372
```
373373

@@ -376,7 +376,7 @@ secret "mssqlserver-secret" deleted
376376
You can also delete all the configuration created for this demo by deleting the `eap-demo` project. To do so, execute the following:
377377

378378
```bash
379-
jboss-on-aro-jakartaee (bootable-jar-openshift) $ oc delete project eap-demo
379+
$ oc delete project eap-demo
380380
project.project.openshift.io "eap-demo" deleted
381381
```
382382

articles/openshift/includes/aro-support.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,3 @@ ms.date: 10/29/2020
77

88
> [!IMPORTANT]
99
> While ARO is jointly engineered, operated, and supported by Red Hat and Microsoft to provide an integrated support experience, the software you run on top of ARO, including that described in this article, is subject to its own support and license terms. For details about support of ARO, see [Support lifecycle for Azure Red Hat OpenShift 4](../support-lifecycle.md). For details about support of the software described in this article, see the main pages for that software as listed in the article.
10-
> * For support for Open Liberty and the the Open Liberty Operator for ARO, please go to [The Open Liberty support page](https://openliberty.io/support/).
11-
> * For support for WebSphere Liberty, please go to [IBM Cloud Support](https://www.ibm.com/cloud/support).

0 commit comments

Comments
 (0)