Skip to content

WASdev/azure.liberty.aro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Related Repositories

Deploy a Java application with Open Liberty/WebSphere Liberty on an Azure Red Hat OpenShift 4 cluster

Prerequisites

  1. Register an Azure subscription.
    1. 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 does not meet this requirement. To request an increase in your resource limit, see Standard quota: Increase limits by VM series. Note that the free trial subscription isn't eligible for a quota increase, upgrade to a Pay-As-You-Go subscription before requesting a quota increase.
    2. You must have either Contributor and User Access Administrator permissions, or Owner permissions on the subscription.
  2. Install Azure CLI.
  3. Install PowerShell Core.
  4. Install Maven.
  5. Install jq.

Local Build Setup and Requirements

This project utilizes GitHub Packages for hosting and retrieving some dependencies. To ensure you can smoothly run and build the project in your local environment, specific configuration settings are required.

GitHub Packages requires authentication to download or publish packages. Therefore, you need to configure your Maven settings.xml file to authenticate using your GitHub credentials. The primary reason for this is that GitHub Packages does not support anonymous access, even for public packages.

Please follow these steps:

  1. Create a Personal Access Token (PAT)

    • Go to Personal access tokens.
    • Click on Generate new token.
    • Give your token a descriptive name, set the expiration as needed, and select the scopes (read:packages, write:packages).
    • Click Generate token and make sure to copy the token.
  2. Configure Maven Settings

    • Locate or create the settings.xml file in your .m2 directory(~/.m2/settings.xml).
    • Add the GitHub Package Registry server configuration with your username and the PAT you just created. It should look something like this:
       <settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 
                              https://maven.apache.org/xsd/settings-1.2.0.xsd">
        
      <!-- other settings
      ...
      -->
      
        <servers>
          <server>
            <id>github</id>
            <username>YOUR_GITHUB_USERNAME</username>
            <password>YOUR_PERSONAL_ACCESS_TOKEN</password>
          </server>
        </servers>
      
      <!-- other settings
      ...
      -->
      
       </settings>

Steps of deployment

  1. Checkout azure-javaee-iaas

    1. Change to directory hosting the repo project & run mvn clean install
  2. Checkout arm-ttk under the specified parent directory

  3. Checkout this repo under the same parent directory and change to directory hosting the repo project

  4. Build the project by replacing all placeholder ${<place_holder>} with valid values

    1. Create a new ARO 4 cluster:

      mvn -Dgit.repo=<repo_user> -Dgit.tag=<repo_tag> -DcreateCluster=true -DdeployWLO=<true|false> -Dedition=<edition> -DproductEntitlementSource=<productEntitlementSource> -DdeployApplication=<true|false> -DappImagePath=<app-image-path> -DappReplicas=<app-replicas> -Dtest.args="-Test All" -Ptemplate-validation-tests clean install
    2. Use an existing ARO 4 cluster:

      mvn -Dgit.repo=<repo_user> -Dgit.tag=<repo_tag> -DcreateCluster=false -DclusterName=<cluste-name> -DclusterRGName=<cluster-resource-group-name> -DdeployWLO=<true|false> -Dedition=<edition> -DproductEntitlementSource=<productEntitlementSource> -DdeployApplication=<true|false> -DappImagePath=<app-image-path> -DappReplicas=<app-replicas> -Dtest.args="-Test All" -Ptemplate-validation-tests clean install
  5. Change to ./target/cli directory

  6. Using deploy.azcli to deploy

    ./deploy.azcli -n <deploymentName> -g <resourceGroupName> -l eastus -p <pull-secret-path> -c <aadClientId> -s <aadClientSecret> -a <aadObjectId> -r <rpObjectId>

After deployment

  1. If you check the resource group in azure portal, you will see a deploymentScript and/or a virtual network, an OpenShift cluster depending on if you choose to create a new ARO 4 cluster.
  2. For further administration:
    1. Login to Azure Portal
    2. Open the resource group you specified to deploy an application on the ARO 4 cluster
    3. Navigate to "Deployments > specified_deployment_name > Outputs"
    4. To visit Red Hat OpenShift Container Platform web console: copy value of property clusterConsoleUrl > browse it in your browser and sign in with cluster project manager credentials you specified in cluster configuration
    5. To visit application deployed to the ARO 4 cluster: copy value of property appEndpoint > append context root defined in the 'server.xml' of your application if it's not equal to '/' > open it in your browser

Deployment Description

The offer provisions the WebSphere Liberty Operator or Open Liberty Operator and supporting Azure resources.

  • Computing resources
    • Azure Red Hat OpenShift (ARO) cluster
      • Dynamically created ARO cluster with
        • Red Hat pull secrets.
        • Service principal client ID.
        • Service principal client secret.
      • You can also choose to deploy into a pre-existing ARO cluster.
  • Network resources
    • A virtual network and two subnets.
  • Key software components
    • A WebSphere Liberty Operator version 1.1.0 or Open Liberty Operator version 0.8.1 installed and running on the ARO cluster, per user selection.
    • An WebSphere Liberty or Open Liberty application deployed and running on the ARO cluster, per user selection:
      • User can select to deploy an application or not.
      • User can deploy own application or a sample application.
      • User need to provide additional entitlement info to deploy the application if a WebSphere Liberty Operator (IBM supported) is deployed.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published