Deploy an Azure VM with RHEL 8_3, 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
.
-
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
-
Checkout this repo under the same parent directory and change to directory hosting the repo project
-
Build the project by replacing all placeholder
${<place_holder>}
with valid valuesmvn -Dgit.repo=<repo_user> -Dgit.tag=<repo_tag> -DibmUserId=<ibmUserId> -DibmUserPwd=<ibmUserPwd> -DvmAdminId=<vmAdminId> -DvmAdminPwd=<vmAdminPwd> -DdnsLabelPrefix=<dnsLabelPrefix> -Dtest.args="-Test All" -Ptemplate-validation-tests clean install
-
Change to
./target/arm
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_3, 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_3, 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
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.