Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Deploy an Azure VM with RHEL 8.4, IBM WebSphere Application Server ND Traditional V9.0.5 & IBM JDK 8.0 pre-installed

Prerequisites

  1. Register an Azure subscription.
  2. Register an IBM id. Contact IBM to make it entitled.
  3. Install Azure CLI.
  4. Install PowerShell Core.
  5. Install Maven.
  6. 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

    1. Run git checkout cf5c927eaf1f5652556e86a6b67816fc910d1b74 to checkout the verified version of arm-ttk
  3. Checkout this repo under the same parent directory and change to directory hosting the repo project

  4. Change to sub-directory twas-nd

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

    mvn -Dgit.repo=<repo_user> -Dgit.tag=<repo_tag> -DibmUserId=<entitledIBMid> -DibmUserPwd=<entitledIBMidPwd> -DvmAdminId=<vmAdminId> -DvmAdminPwd=<vmAdminPwd> -DdnsLabelPrefix=<dnsLabelPrefix> -Dtest.args="-Test All" -Ptemplate-validation-tests -Dtemplate.validation.tests.directory=../../arm-ttk/arm-ttk clean install
  6. Change to ./target/cli directory

  7. Using deploy.azcli to deploy

    ./deploy.azcli -n <deploymentName> -i <subscriptionId> -g <resourceGroupName> -l <resourceGroupLocation>

After deployment

  1. You can capture the source VM to a custom image, which consists of RHEL 8.4, IBM WebSphere Application Server ND Traditional V9.0.5 & IBM JDK 8.0, so it can be reused to create VM instances based on it using the same subscription;
  2. Similar to creating a custom private image, you can also create a Virtual Machine offer in Azure Marketplace, which is globally public and accessible. You can see more information in the following section.

Creating Virtual Machine offer in Azure Marketplace manually

  1. Deploy an Azure VM provisioned with RHEL, WebSphere & JDK (e.g., RHEL 8.4, IBM WebSphere Application Server ND Traditional V9.0.5 & IBM JDK 8.0). Use different combinations of OS, WebSphere and JDK per your requirements. If you want to install WebSphere and JDK in a separate data disk, only provision the VM with RHEL. Manual deployment or using the tailored ARM template works.
    1. Use un-managed disks instead of managed disks for VM provision. By doing so, the VHDs attached to the VM are stored in the storage account, which can be accessed later during the certification process of publishing VM image into Azure Marketplace
    2. This repo is an example on how to create an un-managed OS disk and data disk in the storage account using ARM template;
  2. Generate VM image:
    1. SSH into the provisioned VM
      1. Delete all sensitive files that you don't want them appear in image
      2. Update applications installed on the system: sudo yum update -y
      3. Deprovision: sudo waagent -deprovision+user -force
      4. exit
    2. De-allocate VM: az vm deallocate --resource-group <resourceGroupName> --name <vmName>
    3. Generalize VM: az vm generalize --resource-group <resourceGroupName> --name <vmName>
    4. [Optional] To test if the VHD of de-allocated and generalized VM works, you can create image and use it for creating new VM instances to verify
      1. az image create --resource-group <resourceGroupName> --name <imageName> --source <vmName>
      2. az vm create --resource-group <resourceGroupName> --name <newVMInstanceName> --image <imageId> --generate-ssh-keys
  3. Create virtual machine offer on Azure Marketplace using the VM image:
    1. How to plan a virtual machine offer
    2. How to create plans for a virtual machine offer
    3. How to create a virtual machine using your own image
    4. How to generate a SAS URI for a VM image
  4. Once the VM offer created successfully in Azure Marketplace, try to deploy a virtual machine using this VM offer and export the ARM template, where you can find how to correctly reference the VM offer in the upstream ARM template.

Retrieve SAS urls of VHD files from pipeline outputs

The pipeline automates the above steps, and outputs the SAS urls of VHD blobs to an internal Teams Channel. If you are not in the channel, please following these steps to find those urls.

  1. Under the repo, go to 'Actions', and click the latest passed workflow.
  2. On the left, click the job named 'build'.
  3. Scrow down and click the step named 'Generate SAS url', the urls are printed at the last line.

Roadmap to MVP

  1. CI/CD pipeline development. gh-2-ci-cd-base-image

    1. Meet the necessary storage explorer other VM base image preconditions.

    2. Make pipeline that builds existing VM image, based on prototype.

    3. Verify that the image built from the pipeline can be used from a simple ARM template that starts the VM only.

      1. Create the simple ARM template that deploys the VM only. Use the single node WLS ARM template as a guide.
  2. Perform entitlement check and patching during cloud-init. gh-7-cloud-init

    1. Get an IBMid that has the necessary entitlements.

    2. Validate PII can be removed or redacted from deployment logs.

    3. Validate that the ability to patch is sufficient as an entitlement check.

  3. Create Azure Marketplace Azure Application entry for tWAS-ND cluster. gh-8-marketplace-entry

    1. Initial creation.

    2. Fill out marketing verbiage

    3. Upload zip.

    4. Test preview.

  4. Update the ARM template for azure.websphere-traditional.cluster. gh-9-update-arm-template

    1. Use new base image from pipeline.

    2. Make any necessary changes to Jianguo's appoach from the prototype.