Deploy an Azure VM with RHEL 8.4, IBM WebSphere Application Server ND Traditional V9.0.5 & IBM JDK 8.0 pre-installed
- Register an Azure subscription.
- Register an IBM id. Contact IBM to make it entitled.
- Install Azure CLI.
- Install PowerShell Core.
- Install Maven.
- Install
jq
.
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:
-
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.
-
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>
-
Checkout azure-javaee-iaas
- Change to directory hosting the repo project & run
mvn clean install
- Change to directory hosting the repo project & run
-
Checkout arm-ttk under the specified parent directory
- Run
git checkout cf5c927eaf1f5652556e86a6b67816fc910d1b74
to checkout the verified version ofarm-ttk
- Run
-
Checkout this repo under the same parent directory and change to directory hosting the repo project
-
Change to sub-directory
twas-nd
-
Build the project by replacing all placeholder
${<place_holder>}
with valid valuesmvn -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
-
Change to
./target/cli
directory -
Using
deploy.azcli
to deploy./deploy.azcli -n <deploymentName> -i <subscriptionId> -g <resourceGroupName> -l <resourceGroupLocation>
- 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;
- 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.
- 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.
- 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
- This repo is an example on how to create an un-managed OS disk and data disk in the storage account using ARM template;
- Generate VM image:
- SSH into the provisioned VM
- Delete all sensitive files that you don't want them appear in image
- Update applications installed on the system:
sudo yum update -y
- Deprovision:
sudo waagent -deprovision+user -force
- exit
- De-allocate VM:
az vm deallocate --resource-group <resourceGroupName> --name <vmName>
- Generalize VM:
az vm generalize --resource-group <resourceGroupName> --name <vmName>
- [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
az image create --resource-group <resourceGroupName> --name <imageName> --source <vmName>
az vm create --resource-group <resourceGroupName> --name <newVMInstanceName> --image <imageId> --generate-ssh-keys
- SSH into the provisioned VM
- Create virtual machine offer on Azure Marketplace using the VM image:
- 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.
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.
- Under the repo, go to 'Actions', and click the latest passed workflow.
- On the left, click the job named 'build'.
- Scrow down and click the step named 'Generate SAS url', the urls are printed at the last line.
-
CI/CD pipeline development. gh-2-ci-cd-base-image
-
Meet the necessary storage explorer other VM base image preconditions.
-
Make pipeline that builds existing VM image, based on prototype.
-
Verify that the image built from the pipeline can be used from a simple ARM template that starts the VM only.
- Create the simple ARM template that deploys the VM only. Use the single node WLS ARM template as a guide.
-
-
Perform entitlement check and patching during cloud-init. gh-7-cloud-init
-
Get an IBMid that has the necessary entitlements.
-
Validate PII can be removed or redacted from deployment logs.
-
Validate that the ability to patch is sufficient as an entitlement check.
-
-
Create Azure Marketplace Azure Application entry for tWAS-ND cluster. gh-8-marketplace-entry
-
Initial creation.
-
Fill out marketing verbiage
-
Upload zip.
-
Test preview.
-
-
Update the ARM template for azure.websphere-traditional.cluster. gh-9-update-arm-template
-
Use new base image from pipeline.
-
Make any necessary changes to Jianguo's appoach from the prototype.
-