Skip to content

Commit da03a10

Browse files
Merge pull request #271479 from KarlErickson/m-reza-rahman-patch-1-271224
edit "Bug fixes and simplifications. #271224"
2 parents e5b896c + 62e66e3 commit da03a10

File tree

1 file changed

+29
-11
lines changed

1 file changed

+29
-11
lines changed

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

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ description: Shows you how to quickly stand up IBM WebSphere Liberty and Open Li
44
author: KarlErickson
55
ms.author: haiche
66
ms.topic: how-to
7-
ms.date: 01/31/2024
7+
ms.date: 04/04/2024
88
ms.custom: template-overview, devx-track-java, devx-track-javaee, devx-track-javaee-liberty, devx-track-javaee-liberty-aro, devx-track-javaee-websphere, devx-track-extended-java
99
---
1010

1111
# Deploy IBM WebSphere Liberty and Open Liberty on Azure Red Hat OpenShift
1212

1313
This article shows you how to quickly stand up IBM WebSphere Liberty and Open Liberty on Azure Red Hat OpenShift (ARO) using the Azure portal.
1414

15-
This article uses the Azure Marketplace offer for Open/WebSphere Liberty to accelerate your journey to ARO. The offer automatically provisions several resources including an ARO cluster with a built-in OpenShift Container Registry (OCR), the Liberty Operator, and optionally a container image including Liberty and your application. To see the offer, visit the [Azure portal](https://aka.ms/liberty-aro). If you prefer manual step-by-step guidance for running Liberty on ARO that doesn't utilize the automation enabled by the offer, see [Deploy a Java application with Open Liberty/WebSphere Liberty on an Azure Red Hat OpenShift cluster](/azure/developer/java/ee/liberty-on-aro).
15+
This article uses the Azure Marketplace offer for Open/WebSphere Liberty to accelerate your journey to ARO. The offer automatically provisions several resources including an ARO cluster with a built-in OpenShift Container Registry (OCR), the Liberty Operators, and optionally a container image including Liberty and your application. To see the offer, visit the [Azure portal](https://aka.ms/liberty-aro). If you prefer manual step-by-step guidance for running Liberty on ARO that doesn't utilize the automation enabled by the offer, see [Deploy a Java application with Open Liberty/WebSphere Liberty on an Azure Red Hat OpenShift cluster](/azure/developer/java/ee/liberty-on-aro).
1616

1717
This article is intended to help you quickly get to deployment. Before going to production, you should explore [Tuning Liberty](https://www.ibm.com/docs/was-liberty/base?topic=tuning-liberty).
1818

@@ -22,13 +22,21 @@ This article is intended to help you quickly get to deployment. Before going to
2222

2323
## Prerequisites
2424

25-
- A local machine with a Unix-like operating system installed (for example, Ubuntu, Azure Linux, or macOS, Windows Subsystem for Linux).
25+
- A local machine with a Unix-like operating system installed (for example, Ubuntu, macOS, or Windows Subsystem for Linux).
26+
- The [Azure CLI](/cli/azure/install-azure-cli). If you're running on Windows or macOS, consider running Azure CLI in a Docker container. For more information, see [How to run the Azure CLI in a Docker container](/cli/azure/run-azure-cli-docker).
27+
* Sign in to the Azure CLI by using the [az login](/cli/azure/reference-index#az-login) command. To finish the authentication process, follow the steps displayed in your terminal. For other sign-in options, see [Sign in with the Azure CLI](/cli/azure/authenticate-azure-cli).
28+
* When you're prompted, install the Azure CLI extension on first use. For more information about extensions, see [Use extensions with the Azure CLI](/cli/azure/azure-cli-extensions-overview).
29+
* Run [az version](/cli/azure/reference-index?#az-version) to find the version and dependent libraries that are installed. To upgrade to the latest version, run [az upgrade](/cli/azure/reference-index?#az-upgrade). This article requires at least version 2.31.0 of Azure CLI.
2630
- A Java SE implementation, version 17 or later (for example, [Eclipse Open J9](https://www.eclipse.org/openj9/)).
2731
- [Maven](https://maven.apache.org/download.cgi) version 3.5.0 or higher.
2832
- [Docker](https://docs.docker.com/get-docker/) for your OS.
29-
- [Azure CLI](/cli/azure/install-azure-cli) version 2.31.0 or higher.
3033
- The Azure identity you use to sign in has either the [Contributor](/azure/role-based-access-control/built-in-roles#contributor) role and the [User Access Administrator](/azure/role-based-access-control/built-in-roles#user-access-administrator) role or the [Owner](/azure/role-based-access-control/built-in-roles#owner) role in the current subscription. For an overview of Azure roles, see [What is Azure role-based access control (Azure RBAC)?](/azure/role-based-access-control/overview)
3134

35+
> [!NOTE]
36+
> You can also execute this guidance from the [Azure Cloud Shell](/azure/cloud-shell/quickstart). This approach has all the prerequisite tools pre-installed, with the exception of Docker.
37+
>
38+
> :::image type="icon" source="~/reusable-content/ce-skilling/azure/media/cloud-shell/launch-cloud-shell-button.png" alt-text="Button to launch the Azure Cloud Shell." border="false" link="https://shell.azure.com":::
39+
3240
## Get a Red Hat pull secret
3341

3442
The Azure Marketplace offer you're going to use in this article requires a Red Hat pull secret. This section shows you how to get a Red Hat pull secret for Azure Red Hat OpenShift. To learn about what a Red Hat pull secret is and why you need it, see the [Get a Red Hat pull secret](/azure/openshift/tutorial-create-cluster?WT.mc_id=Portal-fx#get-a-red-hat-pull-secret-optional) section of [Tutorial: Create an Azure Red Hat OpenShift 4 cluster](/azure/openshift/tutorial-create-cluster?WT.mc_id=Portal-fx). To get the pull secret for use, follow the steps in this section.
@@ -49,8 +57,6 @@ The following content is an example that was copied from the Red Hat console por
4957

5058
Save the secret to a file so you can use it later.
5159

52-
<a name='create-an-azure-active-directory-service-principal-from-the-azure-portal'></a>
53-
5460
## Create a Microsoft Entra service principal from the Azure portal
5561

5662
The Azure Marketplace offer you're going to use in this article requires a Microsoft Entra service principal to deploy your Azure Red Hat OpenShift cluster. The offer assigns the service principal with proper privileges during deployment time, with no role assignment needed. If you have a service principal ready to use, skip this section and move on to the next section, where you deploy the offer.
@@ -87,7 +93,7 @@ The steps in this section direct you to deploy IBM WebSphere Liberty or Open Lib
8793

8894
The following steps show you how to find the offer and fill out the **Basics** pane.
8995

90-
1. In the search bar at the top of the Azure portal, enter *Liberty*. In the auto-suggested search results, in the **Marketplace** section, select **IBM WebSphere Liberty and Open Liberty on Azure Red Hat OpenShift**, as shown in the following screenshot.
96+
1. In the search bar at the top of the Azure portal, enter *Liberty*. In the auto-suggested search results, in the **Marketplace** section, select **IBM Liberty on ARO**, as shown in the following screenshot.
9197

9298
:::image type="content" source="media/howto-deploy-java-liberty-app/marketplace-search-results.png" alt-text="Screenshot of Azure portal showing IBM WebSphere Liberty and Open Liberty on Azure Red Hat OpenShift in search results." lightbox="media/howto-deploy-java-liberty-app/marketplace-search-results.png":::
9399

@@ -99,6 +105,12 @@ The following steps show you how to find the offer and fill out the **Basics** p
99105

100106
1. The offer must be deployed in an empty resource group. In the **Resource group** field, select **Create new** and fill in a value for the resource group. Because resource groups must be unique within a subscription, pick a unique name. An easy way to have unique names is to use a combination of your initials, today's date, and some identifier. For example, *abc1228rg*.
101107

108+
1. Create an environment variable in your shell for the resource group name.
109+
110+
```bash
111+
export RESOURCE_GROUP_NAME=<your-resource-group-name>
112+
```
113+
102114
1. Under **Instance details**, select the region for the deployment. For a list of Azure regions where OpenShift operates, see [Regions for Red Hat OpenShift 4.x on Azure](https://azure.microsoft.com/explore/global-infrastructure/products-by-region/?products=openshift&regions=all).
103115

104116
1. After selecting the region, select **Next**.
@@ -111,9 +123,9 @@ The following steps show you how to fill out the **ARO** pane shown in the follo
111123

112124
1. Under **Provide information to create a new cluster**, for **Red Hat pull secret**, fill in the Red Hat pull secret that you obtained in the [Get a Red Hat pull secret](#get-a-red-hat-pull-secret) section. Use the same value for **Confirm secret**.
113125

114-
1. Fill in **Service principal client ID** with the service principal Application (client) ID that you obtained in the [Create a Microsoft Entra service principal from the Azure portal](#create-an-azure-active-directory-service-principal-from-the-azure-portal) section.
126+
1. Fill in **Service principal client ID** with the service principal Application (client) ID that you obtained in the [Create a Microsoft Entra service principal from the Azure portal](#create-a-microsoft-entra-service-principal-from-the-azure-portal) section.
115127

116-
1. Fill in **Service principal client secret** with the service principal Application secret that you obtained in the [Create a Microsoft Entra service principal from the Azure portal](#create-an-azure-active-directory-service-principal-from-the-azure-portal) section. Use the same value for **Confirm secret**.
128+
1. Fill in **Service principal client secret** with the service principal Application secret that you obtained in the [Create a Microsoft Entra service principal from the Azure portal](#create-a-microsoft-entra-service-principal-from-the-azure-portal) section. Use the same value for **Confirm secret**.
117129

118130
1. After filling in the values, select **Next**.
119131

@@ -200,6 +212,12 @@ The following steps guide you through creating an Azure SQL Database single data
200212
>
201213
> :::image type="content" source="media/howto-deploy-java-liberty-app/create-sql-database-networking.png" alt-text="Screenshot of the Azure portal that shows the Networking tab of the Create SQL Database page with the Connectivity method and Firewall rules settings highlighted." lightbox="media/howto-deploy-java-liberty-app/create-sql-database-networking.png":::
202214
215+
1. Create an environment variable in your shell for the resource group name for the database.
216+
217+
```bash
218+
export DB_RESOURCE_GROUP_NAME=<db-resource-group>
219+
```
220+
203221
Now that you created the database and ARO cluster, you can prepare the ARO to host your WebSphere Liberty application.
204222

205223
## Configure and deploy the sample application
@@ -390,8 +408,8 @@ Use the following steps to deploy and test the application:
390408
To avoid Azure charges, you should clean up unnecessary resources. When the cluster is no longer needed, use the [az group delete](/cli/azure/group#az-group-delete) command to remove the resource group, ARO cluster, Azure SQL Database, and all related resources.
391409

392410
```bash
393-
az group delete --name abc1228rg --yes --no-wait
394-
az group delete --name <db-resource-group> --yes --no-wait
411+
az group delete --name $RESOURCE_GROUP_NAME --yes --no-wait
412+
az group delete --name $DB_RESOURCE_GROUP_NAME --yes --no-wait
395413
```
396414

397415
## Next steps

0 commit comments

Comments
 (0)