Home GitHub

Disclaimer: Mobb.ninja is not official Red Hat documentation - These guides may be experimental, proof of concept or early adoption. Officially supported documentation is available at https://docs.openshift.com.

ARO Quickstart

A Quickstart guide to deploying an Azure RedHat OpenShift cluster.

Author: Paul Czarkowski

Video Walkthrough

If you prefer a more visual medium, you can watch Paul Czarkowski walk through this quickstart on YouTube.

Prerequisites

Azure CLI

Obviously you’ll need to have an Azure account to configure the CLI against.

MacOS

See Azure Docs for alternative install options.

  1. Install Azure CLI using homebrew

     brew update && brew install azure-cli
    

Linux

See Azure Docs for alternative install options.

  1. Import the Microsoft Keys

     sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
    
  2. Add the Microsoft Yum Repository

     cat << EOF | sudo tee /etc/yum.repos.d/azure-cli.repo
     [azure-cli]
     name=Azure CLI
     baseurl=https://packages.microsoft.com/yumrepos/azure-cli
     enabled=1
     gpgcheck=1
     gpgkey=https://packages.microsoft.com/keys/microsoft.asc
     EOF
    
  3. Install Azure CLI

     sudo dnf install -y azure-cli
    

Prepare Azure Account for Azure OpenShift

  1. Log into the Azure CLI by running the following and then authorizing through your Web Browser

     az login
    
  2. Make sure you have enough Quota (change the location if you’re not using East US)

     az vm list-usage --location "East US" -o table
    

    see Addendum - Adding Quota to ARO account if you have less than 36 Quota left for Total Regional vCPUs.

  3. Register resource providers

     az provider register -n Microsoft.RedHatOpenShift --wait
     az provider register -n Microsoft.Compute --wait
     az provider register -n Microsoft.Storage --wait
     az provider register -n Microsoft.Authorization --wait
    

Get Red Hat pull secret

This step is optional, but highly recommended

  1. Log into cloud.redhat.com

  2. Browse to https://cloud.redhat.com/openshift/install/azure/aro-provisioned

  3. click the Download pull secret button and remember where you saved it, you’ll reference it later.

Deploy Azure OpenShift

Variables and Resource Group

Set some environment variables to use later, and create an Azure Resource Group.

  1. Set the following environment variables

    Change the values to suit your environment, but these defaults should work.

     AZR_RESOURCE_LOCATION=eastus
     AZR_RESOURCE_GROUP=openshift
     AZR_CLUSTER=cluster
     AZR_PULL_SECRET=~/Downloads/pull-secret.txt
    
  2. Create an Azure resource group

     az group create \
       --name $AZR_RESOURCE_GROUP \
       --location $AZR_RESOURCE_LOCATION
    

Networking

Create a virtual network with two empty subnets

  1. Create virtual network

     az network vnet create \
       --address-prefixes 10.0.0.0/22 \
       --name "$AZR_CLUSTER-aro-vnet-$AZR_RESOURCE_LOCATION" \
       --resource-group $AZR_RESOURCE_GROUP
    
  2. Create control plane subnet

     az network vnet subnet create \
       --resource-group $AZR_RESOURCE_GROUP \
       --vnet-name "$AZR_CLUSTER-aro-vnet-$AZR_RESOURCE_LOCATION" \
       --name "$AZR_CLUSTER-aro-control-subnet-$AZR_RESOURCE_LOCATION" \
       --address-prefixes 10.0.0.0/23 \
       --service-endpoints Microsoft.ContainerRegistry
    
  3. Create machine subnet

     az network vnet subnet create \
       --resource-group $AZR_RESOURCE_GROUP \
       --vnet-name "$AZR_CLUSTER-aro-vnet-$AZR_RESOURCE_LOCATION" \
       --name "$AZR_CLUSTER-aro-machine-subnet-$AZR_RESOURCE_LOCATION" \
       --address-prefixes 10.0.2.0/23 \
       --service-endpoints Microsoft.ContainerRegistry
    
  4. Disable network policies on the control plane subnet

    This is required for the service to be able to connect to and manage the cluster.

     az network vnet subnet update \
       --name "$AZR_CLUSTER-aro-control-subnet-$AZR_RESOURCE_LOCATION" \
       --resource-group $AZR_RESOURCE_GROUP \
       --vnet-name "$AZR_CLUSTER-aro-vnet-$AZR_RESOURCE_LOCATION" \
       --disable-private-link-service-network-policies true
    
  5. Create the cluster

    This will take between 30 and 45 minutes.

     az aro create \
       --resource-group $AZR_RESOURCE_GROUP \
       --name $AZR_CLUSTER \
       --vnet "$AZR_CLUSTER-aro-vnet-$AZR_RESOURCE_LOCATION" \
       --master-subnet "$AZR_CLUSTER-aro-control-subnet-$AZR_RESOURCE_LOCATION" \
       --worker-subnet "$AZR_CLUSTER-aro-machine-subnet-$AZR_RESOURCE_LOCATION" \
       --pull-secret @$AZR_PULL_SECRET
    
  6. Get OpenShift console URL

     az aro show \
       --name $AZR_CLUSTER \
       --resource-group $AZR_RESOURCE_GROUP \
       -o tsv --query consoleProfile
    
  7. Get OpenShift credentials

     az aro list-credentials \
       --name $AZR_CLUSTER \
       --resource-group $AZR_RESOURCE_GROUP \
       -o tsv
    
  8. Use the URL and the credentials provided by the output of the last two commands to log into OpenShift via a web browser.

ARO login page

  1. Deploy an application to OpenShift

    See the following video for a guide on easy application deployment on OpenShift.

Delete Cluster

Once you’re done its a good idea to delete the cluster to ensure that you don’t get a surprise bill.

  1. Delete the cluster

     az aro delete -y \
       --resource-group $AZR_RESOURCE_GROUP \
       --name $AZR_CLUSTER
    
  2. Delete the Azure resource group

    Only do this if there’s nothing else in the resource group.

     az group delete -y \
       --name $AZR_RESOURCE_GROUP
    

Adendum

Adding Quota to ARO account

aro quota support ticket request example

  1. Create an Azure Support Request

  2. Set Issue Type to “Service and subscription limits (quotas)”

  3. Set Quota Type to “Compute-VM (cores-vCPUs) subscription limit increases”

  4. Click Next Solutions »

  5. Click Enter details

  6. Set Deployment Model to “Resource Manager

  7. Set Locations to “(US) East US”

  8. Set Types to “Standard”

  9. Under Standard check “DSv3” and “DSv4”

  10. Set New vCPU Limit for each (example “60”)

  11. Click Save and continue

  12. Click Review + create »

  13. Wait until quota is increased.