Preparing a cluster to use Azure Red Hat OpenShift (ARO)
Prepare your cluster on ARO so you can install IBM Cloud Pak® for Integration.
Requirements
To set up an ARO cluster, you need:
Access to the Azure portal (requires email invitation)
Access to a Red Hat account (requires email invitation)
The Azure CLI. For the installer download and instructions, see: How to install the Azure CLI
Creating your cluster
The following steps are based on the Microsoft tutorial for creating an ARO cluster: Tutorial: Create an Azure Red Hat OpenShift 4 cluster
Prerequisites: Azure Red Hat OpenShift requires a minimum of 40 cores to create and run an OpenShift cluster. You will need to adjust for this, as the default Azure resource quota for a new Azure subscription does not meet this requirement.
In the Azure CLI, run the following command:
az login
On the browser page that opens, log in.
On the tutorial page, follow the steps under “Get a Red Hat pull secret”.
Set environment variables to be used by
az
commands. You can replace the values with your own names. For example:LOCATION=eastus # location of your cluster RESOURCEGROUP=aro-rg # resource group where to create cluster CLUSTER=<cluster_name> # name of your cluster
Create a resource group:
az group create \ --name $RESOURCEGROUP \ --location $LOCATION
Create a virtual network in the resource group. OpenShift 4 requires two empty subnets, one for master nodes and one for worker nodes:
az network vnet create \ --resource-group $RESOURCEGROUP \ --name aro-vnet \ --address-prefixes 10.0.0.0/22
Add an empty subnet for the master nodes:
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
Add an empty subnet for the worker nodes:
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
Disable subnet private endpoint policies on the master subnet. This is required for connecting to the cluster and managing it:
az network vnet subnet update \ --name master-subnet \ --resource-group $RESOURCEGROUP \ --vnet-name aro-vnet \ --disable-private-link-service-network-policies true
Create the cluster.
For OpenShift Data Foundation in a production environment, the optimal minimum deployment is 4 storage nodes, with 3 Object Storage Daemons (OSDs) on each node. This provides much greater data resiliency in the event of any OSD failures.
To create the cluster, run the following command, replacing the placeholder values with values applicable to your installation:
az aro create \ --resource-group $RESOURCEGROUP \ --name $CLUSTER \ --vnet <vnet_name> \ --master-subnet <master_subnet_name> \ --worker-subnet <worker_subnet_name> \ --worker-vm-size <worker_vm_size> \ --pull-secret @/<file_path>/<pull_secret_file>
Note that the value for
pull-secret
is the path to the file containing the pull secret you obtained in step 3 (the Red Hat tutorial).For example:
az aro create \ --resource-group $RESOURCEGROUP \ --name $CLUSTER \ --vnet aro-vnet \ --master-subnet master-subnet \ --worker-subnet worker-subnet \ --worker-vm-size Standard_D16s_v3 \ --pull-secret @/path/pull_secret.txt
When the command has finished running, your cluster is ready to use.
Connecting to your cluster
After the cluster is created, follow the instructions in the next Microsoft tutorial to connect to your cluster: Tutorial: Connect to an Azure Red Hat OpenShift 4 cluster
Get login information:
az aro list-credentials \ --name $CLUSTER \ --resource-group $RESOURCEGROUP
Get the web console URL:
az aro show \ --name $CLUSTER \ --resource-group $RESOURCEGROUP \ --query "consoleProfile.url" -o tsv
From here you can download the OpenShift CLI from the web console using the
?
button at the top right of the page.Log in to the OpenShift CLI
apiServer=$(az aro show -g $RESOURCEGROUP -n $CLUSTER --query apiserverProfile.url -o tsv) oc login $apiServer -u kubeadmin -p kubeadmin_passwd
Deleting a cluster
If you need to delete a cluster, see the following Microsoft tutorial. Tutorial: Delete an Azure Red Hat OpenShift 4 cluster
az aro delete --resource-group $RESOURCEGGROUP --name $CLUSTER
Installing Cloud Pak for Integration
At this point, you can follow the procedures for installing Cloud Pak for Integration on your Red Hat OpenShift cluster. See Overview – Installation for an overview of the process.