Skip to content

Commit 363b792

Browse files
authored
Merge pull request #220832 from edburns/edburns-msft-eap-92-jdk-17-aro
Update guidance to promote JDK 17
2 parents 210dd7f + 4bacb87 commit 363b792

File tree

3 files changed

+33
-14
lines changed

3 files changed

+33
-14
lines changed

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

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Deploy a Java application with Red Hat JBoss Enterprise Application Platf
33
description: Deploy a Java application with Red Hat JBoss Enterprise Application Platform (JBoss EAP) on an Azure Red Hat OpenShift (ARO) 4 cluster.
44
author: yersan
55
ms.author: edburns
6-
ms.date: 06/06/2022
6+
ms.date: 12/20/2022
77
ms.topic: article
88
ms.service: azure-redhat-openshift
99
keywords: java, jakartaee, microprofile, EAP, JBoss EAP, ARO, OpenShift, JBoss Enterprise Application Platform
@@ -33,9 +33,9 @@ The application is a stateful application that stores information in an HTTP Ses
3333
[!INCLUDE [aro-quota](includes/aro-quota.md)]
3434

3535
1. Prepare a local machine with a Unix-like operating system that is supported by the various products installed (such as [WSL](/windows/wsl/) on Windows).
36-
1. Install a Java SE implementation (for example, [Oracle JDK 11](https://www.oracle.com/java/technologies/downloads/#java11)).
37-
1. Install [Maven](https://maven.apache.org/download.cgi) 3.6.3 or higher.
38-
1. Install [Azure CLI](/cli/azure/install-azure-cli) 2.29.2 or later.
36+
1. Install a Java SE implementation. The local development steps in this article were tested with JDK 17 [from the Microsoft build of OpenJDK](https://www.microsoft.com/openjdk).
37+
1. Install [Maven](https://maven.apache.org/download.cgi) 3.8.6 or later.
38+
1. Install [Azure CLI](/cli/azure/install-azure-cli) 2.40 or later.
3939
1. Clone the code for this demo application (todo-list) to your local system. The demo application is at [GitHub](https://github.com/Azure-Samples/jboss-on-aro-jakartaee).
4040
1. Follow the instructions in [Create an Azure Red Hat OpenShift 4 cluster](./tutorial-create-cluster.md).
4141

@@ -87,6 +87,7 @@ Before deploying the application on OpenShift, we are going to run it locally to
8787
8888
To create the database, follow the steps in [Quickstart: Create an Azure SQL Database single database](/azure/azure-sql/database/single-database-create-quickstart?tabs=azure-portal), but use the following substitutions.
8989
90+
* For **Resource group** use the resource group you created previously.
9091
* For **Database name** use `todos_db`.
9192
* For **Server admin login** use `azureuser`.
9293
* For **Password** use `Passw0rd!`.
@@ -99,11 +100,11 @@ On the **Additional settings** page, you don't have to choose the option to pre-
99100
Once the database has been created with the above database name, Server admin login and password, get the value for the server name from the overview page for the newly created database resource in the portal. Hover the mouse over the value of the **Server name** field and select the copy icon that appears beside the value. Save this aside for use later (we will set a variable named `MSSQLSERVER_HOST` to this value).
100101

101102
> [!NOTE]
102-
> To keep monetary costs low, the Quickstart directs the reader to select the serverless compute tier. This tier scales to zero when there is no activity. When this happens, the database is not immediately responsive. If, at any point when executing the steps in this article, you observe database problems, consider disabling Auto-pause. To learn how, search for Auto-pause in [Azure SQL Database serverless](/azure/azure-sql/database/serverless-tier-overview).
103+
> To keep monetary costs low, the Quickstart directs the reader to select the serverless compute tier. This tier scales to zero when there is no activity. When this happens, the database is not immediately responsive. If, at any point when executing the steps in this article, you observe database problems, consider disabling Auto-pause. To learn how, search for Auto-pause in [Azure SQL Database serverless](/azure/azure-sql/database/serverless-tier-overview). At the time of writing, the following AZ CLI command would disable Auto-pause for the database configured in this article. `az sql db update -g $RESOURCEGROUP -s $RESOURCEGROUP -n todos_db --auto-pause-delay -1`
103104

104105
Follow the next steps to build and run the application locally.
105106

106-
1. Build the Bootable JAR. When we are building the Bootable JAR, we need to specify the database driver version we want to use:
107+
1. Build the Bootable JAR. Because we are using the `eap-datasources-galleon-pack` with MS SQL Server database, we must specify the database driver version we want to use with this specific environment variable. For more information on the `eap-datasources-galleon-pack` and MS SQL Server, see the [documentation from Red Hat](https://github.com/jbossas/eap-datasources-galleon-pack/blob/main/doc/mssqlserver/README.md)
107108

108109
```bash
109110
export MSSQLSERVER_DRIVER_VERSION=7.4.1.jre11
@@ -136,7 +137,7 @@ Follow the next steps to build and run the application locally.
136137
137138
Your steps to ensure the network traffic is permitted above were ineffective. Ensure the IP address from the error message is included in the firewall rules.
138139
139-
If you receive an message with text similar to the following:
140+
If you receive a message with text similar to the following:
140141
141142
```bash
142143
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: There is already an object named 'TODOS' in the database.
@@ -183,7 +184,7 @@ Follow the next steps to build and run the application locally.
183184
{"status":"UP","checks":[{"name":"SuccessfulCheck","status":"UP"}]}
184185
```
185186
186-
To check the status of readyness, run:
187+
To check the status of readiness, run:
187188
188189
```bash
189190
curl http://localhost:9990/health/ready
@@ -244,27 +245,37 @@ The next steps explain how you can deploy the application with a Helm chart usin
244245
1. Create `todo-list-secret`.
245246

246247
```bash
248+
export MSSQLSERVER_DRIVER_VERSION=7.4.1.jre11
247249
oc create secret generic todo-list-secret \
248250
--from-literal app-cluster-password=mut2UTG6gDwNDcVW \
249251
--from-literal app-driver-version=${MSSQLSERVER_DRIVER_VERSION} \
250252
--from-literal app-ds-jndi=${MSSQLSERVER_JNDI}
251253
```
252254

253-
1. Open the OpenShift console and navigate to the developer view. Select the **</> Developer** perspective from the drop down menu at the top of the navigation pane.
255+
1. Open the OpenShift console and navigate to the developer view. You can discover the console URL for your OpenShift cluster by running this command. Log in with the `kubeadmin` userid and password you obtained from a preceding step.
256+
257+
```bash
258+
az aro show \
259+
--name $CLUSTER \
260+
--resource-group $RESOURCEGROUP \
261+
--query "consoleProfile.url" -o tsv
262+
```
263+
264+
Select the **</> Developer** perspective from the drop-down menu at the top of the navigation pane.
254265

255-
:::image type="content" source="media/howto-deploy-java-enterprise-application-platform-app/console-developer-view.png" alt-text="Screenshot of OpenShift console developer view.":::
266+
:::image type="content" source="media/howto-deploy-java-enterprise-application-platform-app/console-developer-view.png" alt-text="Screenshot of OpenShift console developer view.":::
256267

257-
1. In the **</> Developer** perspective, select the **eap-demo** project from the **Project** drop down menu.
268+
1. In the **</> Developer** perspective, select the **eap-demo** project from the **Project** drop-down menu.
258269

259270
:::image type="content" source="media/howto-deploy-java-enterprise-application-platform-app/console-project-combo-box.png" alt-text="Screenshot of OpenShift console project combo box.":::
260271

261-
1. Select **+Add**. In the **Developer Catalog** section, select **Helm Chart**. You'll arrive at the Helm Chart catalog available on your ARO cluster. In the **Filter by keyword** box, type **eap**. You should see two options similar to this:
272+
1. Select **+Add**. In the **Developer Catalog** section, select **Helm Chart**. You'll arrive at the Helm Chart catalog available on your ARO cluster. In the **Filter by keyword** box, type **eap**. You should see several options, as shown here:
262273
263274
:::image type="content" source="media/howto-deploy-java-enterprise-application-platform-app/console-eap-helm-charts.png" alt-text="Screenshot of OpenShift console EAP Helm Charts.":::
264275
265276
Because our application uses MicroProfile capabilities, we'll select the Helm Chart for EAP Xp. The `Xp` stands for Expansion Pack. With the JBoss Enterprise Application Platform expansion pack, developers can use Eclipse MicroProfile application programming interfaces (APIs) to build and deploy microservices-based applications.
266277

267-
1. Select the **EAP Xp** Helm Chart, and then select **Install Helm Chart**.
278+
1. Select the **EAP Xp4** Helm Chart, and then select **Install Helm Chart**.
268279

269280
At this point, we need to configure the chart to build and deploy the application:
270281

@@ -273,6 +284,8 @@ At this point, we need to configure the chart to build and deploy the applicatio
273284
1. Change the YAML content to configure the Helm Chart by copying and pasting the content of the Helm Chart file available at _deployment/application/todo-list-helm-chart.yaml_ instead of the existing content:
274285

275286
:::image type="content" source="media/howto-deploy-java-enterprise-application-platform-app/console-eap-helm-charts-yaml-content-inline.png" alt-text="OpenShift console EAP Helm Chart YAML content" lightbox="media/howto-deploy-java-enterprise-application-platform-app/console-eap-helm-charts-yaml-content-expanded.png":::
287+
288+
Note that this content makes references to the secrets you set earlier.
276289

277290
1. Finally, select **Install** to start the application deployment. This will open the **Topology** view with a graphical representation of the Helm release (named **eap-todo-list-demo**) and its associated resources.
278291

@@ -282,7 +295,9 @@ At this point, we need to configure the chart to build and deploy the applicatio
282295

283296
If you select the icon with two arrows in a circle at the lower left of the **D** box, you will be taken to the **Logs** pane. Here you can observe the progress of the build. To return to the topology view, select **Topology** in the left navigation pane.
284297

285-
1. When the build is finished (the bottom-left icon will display a green check) and the application is deployed (the circle outline is in dark blue), you can go to application the URL (using the top-right icon) from the route associated with the deployment.
298+
1. When the build is finished, the bottom-left icon will display a green check
299+
300+
1. When the deployment is completed, the circle outline will be dark blue. If you hover the mouse over the dark blue, you should see a message appear stating something similar to "3 Running". When you see that message, you can go to application the URL (using the top-right icon) from the route associated with the deployment.
286301

287302
:::image type="content" source="media/howto-deploy-java-enterprise-application-platform-app/console-open-application.png" alt-text="Screenshot of OpenShift console open application.":::
288303

@@ -324,6 +339,10 @@ $ oc delete project eap-demo
324339
325340
Delete the ARO cluster by following the steps in [Tutorial: Delete an Azure Red Hat OpenShift 4 cluster](./tutorial-delete-cluster.md)
326341
342+
### Delete the resource group
343+
344+
If you want to delete all of the resources created by the preceding steps, simply delete the resource group you created for the ARO cluster.
345+
327346
## Next steps
328347
329348
In this guide, you learned how to:
-188 KB
Loading
0 Bytes
Loading

0 commit comments

Comments
 (0)