Join us
@sormita ・ Apr 14,2022 ・ 2 min read ・ 1750 views
Enabling Infrastructure as Code for Azure Redhat Openshift.
There are various ways to provision ARO on Azure. Following are some of them:
Both the above options give very little options to actually customize your ARO cluster, for example if you want more number of worker nodes or specific sizes of the worker nodes or one or more machine sets in the cluster having machines of different specifications.
Provisioning via ARM template gives all the flexibilities and more. It also gives an option to run one or more pre or post deployment scripts to further automate the Azure landing zone setup. The ARM template in the below Github link is a working version of the template to provision ARO on an existing Azure landing zone having all the network components available:
https://github.com/sormita/AROARM
Prerequisites
Complete the following prerequisites before executing the ARO ARM template:
az ad sp create-for-rbac --name sp-arm-aro --role Contributor
Following is a sample output:
{
"appId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"displayName": "sp-arm-aro",
"name": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"password": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"tenant": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
az provider register -n Microsoft.RedHatOpenShift --wait
For the parameter, 'rpObjectId' in the ARM template, please execute the following commands in
Azure CLI:
#az ad sp list --filter "displayname eq 'Azure Red Hat OpenShift RP'" --query "[?
appDisplayName=='Azure Red Hat OpenShift RP'].{name: appDisplayName, objectId: objectId}" -o
table
az network vnet create \
--resource-group $RESOURCEGROUP \
--name aro-vnet \
--address-prefixes 10.0.0.0/22
az network vnet subnet create \
--resource-group $RESOURCEGROUP \
--vnet-name aro-vnet \
--name master-subnet \
--address-prefixes 10.0.0.0/23 \
--service-endpoints Microsoft.ContainerRegistry
az network vnet subnet create \
--resource-group $RESOURCEGROUP \
--vnet-name aro-vnet \
--name worker-subnet \
--address-prefixes 10.0.2.0/23 \
--service-endpoints Microsoft.ContainerRegistry
az network vnet subnet update \
--name master-subnet \
--resource-group $RESOURCEGROUP \
--vnet-name aro-vnet \
--disable-private-link-service-network-policies true
Running the template
Run the template from IaC pipeline or from Azure CLI using the following command:
az deployment group create \
--name ARODeployment \
--resource-group <resourceGroupName> \
--template-uri "https://<sample-github-repo-link/aro_template_arm.json" \
--parameters “
https://<sample-github-repo-link/aro_parameter_arm.json” \
--pull-secret @/path/to/my/pull-secret.txt
Join other developers and claim your FAUN account now!
Influence
Total Hits
Posts
Only registered users can post comments. Please, login or signup.