Skip to content

Commit 5a71725

Browse files
Merge pull request #276812 from backwind1233/s2i_aro_autodeploy
Auto Redeploy JBoss EAP on Azure Red Hat OpenShift With Source-2-Image (S2I)
2 parents abc0634 + 7a05d47 commit 5a71725

28 files changed

+368
-80
lines changed

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

Lines changed: 38 additions & 79 deletions
Large diffs are not rendered by default.

articles/openshift/howto-deploy-java-jboss-enterprise-application-platform-with-auto-redeploy.md

Lines changed: 223 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The Azure Marketplace offer you're going to use in this article requires a Micro
6767
Use the following steps to deploy a service principal and get its Application (client) ID and secret from the Azure portal. For more information, see [Create and use a service principal to deploy an Azure Red Hat OpenShift cluster](/azure/openshift/howto-create-service-principal?pivots=aro-azureportal).
6868

6969
> [!NOTE]
70-
> You must have sufficient permissions to register an application with your Microsoft Entra tenant. If you run into a problem, check the required permissions to make sure your account can create the identity. For more information, see the [Permissions required for registering an app](/azure/active-directory/develop/howto-create-service-principal-portal#permissions-required-for-registering-an-app) section of [Use the portal to create a Microsoft Entra application and service principal that can access resources](/azure/active-directory/develop/howto-create-service-principal-portal).
70+
> You must have sufficient permissions to register an application with your Microsoft Entra tenant. If you run into a problem, check the required permissions to make sure your account can create the identity. For more information, see [Register a Microsoft Entra app and create a service principal](/entra/identity-platform/howto-create-service-principal-portal).
7171
7272
1. Sign in to your Azure account through the [Azure portal](https://portal.azure.com/).
7373
1. Select **Microsoft Entra ID**.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
author: backwind1233
3+
ms.author: zhihaoguo
4+
ms.date: 06/26/2024
5+
ms.topic: include
6+
---
7+
8+
## Clean up resources
9+
10+
If you're not going to continue to use the OpenShift cluster, navigate back to your working resource group. At the top of the page, under the text **Resource group**, select the resource group. Then, select **Delete resource group**.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
author: backwind1233
3+
ms.author: zhihaoguo
4+
ms.date: 06/26/2024
5+
ms.topic: include
6+
---
7+
8+
## Get a Red Hat pull secret
9+
10+
The Azure Marketplace offer used 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](../tutorial-create-cluster.md#get-a-red-hat-pull-secret-optional) section of [Tutorial: Create an Azure Red Hat OpenShift 4 cluster](../tutorial-create-cluster.md).
11+
12+
Use the following steps to get the pull secret:
13+
14+
1. Open the [Red Hat OpenShift Hybrid Cloud Console](https://console.redhat.com/openshift/install/azure/aro-provisioned), then use your Red Hat account to sign in to the OpenShift cluster manager portal. You may need to accept more terms and update your account as shown in the following screenshot. Use the same password as when you created the account.
15+
16+
:::image type="content" source="../media/howto-deploy-java-jboss-enterprise-application-platform-app/red-hat-account-complete-profile.png" alt-text="Screenshot of Red Hat Update Your Account page." lightbox="../media/howto-deploy-java-jboss-enterprise-application-platform-app/red-hat-account-complete-profile.png":::
17+
18+
1. After you sign in, select **OpenShift** then **Downloads**.
19+
1. Select the **All categories** dropdown list and then select **Tokens**.
20+
1. Under **Pull secret**, select **Copy** or **Download** to get the value, as shown in the following screenshot.
21+
22+
:::image type="content" source="../media/howto-deploy-java-jboss-enterprise-application-platform-app/red-hat-console-portal-pull-secret.png" alt-text="Screenshot of the Red Hat console portal that shows the pull secret." lightbox="../media/howto-deploy-java-jboss-enterprise-application-platform-app/red-hat-console-portal-pull-secret.png":::
23+
24+
The following content is an example that was copied from the Red Hat console portal, with the auth codes replaced with `xxxx...xxx`.
25+
26+
```json
27+
{"auths":{"cloud.openshift.com":{"auth":"xxxx...xxx","email":"[email protected]"},"quay.io":{"auth":"xxx...xxx","email":"[email protected]"},"registry.connect.redhat.com":{"auth":"xxxx...xxx","email":"[email protected]"},"registry.redhat.io":{"auth":"xxxx...xxx","email":"[email protected]"}}}
28+
```
29+
30+
1. Save the secret to a file so you can use it later.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
author: backwind1233
3+
ms.author: zhihaoguo
4+
ms.date: 06/26/2024
5+
ms.topic: include
6+
---
7+
8+
> [!NOTE]
9+
> Azure Red Hat OpenShift requires a minimum of 40 cores to create and run an OpenShift cluster. The default Azure resource quota for a new Azure subscription doesn't meet this requirement. To request an increase in your resource limit, see [Increase VM-family vCPU quotas](../../quotas/per-vm-quota-requests.md). Note that the free trial subscription isn't eligible for a quota increase. Upgrade to a Pay-As-You-Go subscription before you request a quota increase. For more information, see [Upgrade your Azure free account or Azure for Students Starter account](../../cost-management-billing/manage/upgrade-azure-subscription.md).
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
author: backwind1233
3+
ms.author: zhihaoguo
4+
ms.date: 06/26/2024
5+
ms.topic: include
6+
---
7+
8+
## Next step
9+
10+
For more information about deploying JBoss EAP on Azure, see [Red Hat JBoss EAP on Azure](/azure/developer/java/ee/jboss-on-azure?toc=/azure/openshift/toc.json&bc=/azure/openshift/breadcrumb/toc.json).
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
author: backwind1233
3+
ms.author: zhihaoguo
4+
ms.date: 06/26/2024
5+
ms.topic: include
6+
---
7+
8+
## Create a Red Hat Container Registry service account
9+
10+
Later, this article shows you how to manually deploy an application to OpenShift using Source-to-Image (S2I). A Red Hat Container Registry service account is necessary to pull the container image for JBoss EAP on which to run your application. If you have a Red Hat Container Registry service account ready to use, skip this section and move on to the next section, where you deploy the offer.
11+
12+
Use the following steps to create a Red Hat Container Registry service account and get its username and password. For more information, see [Creating Registry Service Accounts](https://access.redhat.com/RegistryAuthentication#creating-registry-service-accounts-6) in the Red Hat documentation.
13+
14+
1. Use your Red Hat account to sign in to the [Registry Service Account Management Application](https://access.redhat.com/terms-based-registry/).
15+
1. From the **Registry Service Accounts** page, select **New Service Account**.
16+
1. Provide a name for the Service Account. The name is prepended with a fixed, random string.
17+
- Enter a description.
18+
- Select **create**.
19+
1. Navigate back to your Service Accounts.
20+
1. Select the Service Account you created.
21+
- Note down the **username**, including the prepended string (that is, `XXXXXXX|username`). Use this username when you sign in to `registry.redhat.io`.
22+
- Note down the **password**. Use this password when you sign in to `registry.redhat.io`.
23+
24+
You created your Red Hat Container Registry service account.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
author: backwind1233
3+
ms.author: zhihaoguo
4+
ms.date: 06/26/2024
5+
ms.topic: include
6+
---
7+
8+
### Validate the service principal
9+
10+
Use the following command to validate the service principal:
11+
12+
```azurecli
13+
az login \
14+
--service-principal \
15+
--username <service-principal-client-id> \
16+
--password <service-principal-client-secret> \
17+
--tenant <tenant-id>
18+
az account show
19+
```
20+
21+
Replace `<service-principal-client-id>`, `<service-principal-client-secret>`, and `<tenant-id>` with the values you obtained in the previous steps. If you see the account information, the service principal is valid.

0 commit comments

Comments
 (0)