Prepare your Azure account for Azure OpenShift

Procedure

  1. Issue this command to log in to the Azure CLI:
    az login

    The output should be similar to:

    To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code ASFEGVB4R to authenticate.
  2. Open https://microsoft.com/devicelogin in a browser and enter the code that you receive in the above message - and then select a login method (for example, login via IBM)

    After you log in, the output should be similar to:

    Microsoft
    Microsoft Azure Cross-platform Command Line Interface
    You have signed in to the Microsoft Azure Cross-platform Command Line Interface application on your device. You may now close this window.
  3. The CLI should display a message similar to this:
    [
      {
        "cloudName": "AzureCloud",
        "homeTenantId": "fcf67057-50c9-4ad4-98f3-ffca64add9e9",
        "id": "0d7348f2-27a0-4fd2-8a5e-d9b7df304533",
        "isDefault": true,
        "managedByTenants": [],
        "name": "Microsoft Azure Enterprise",
        "state": "Enabled",
        "tenantId": "fcf67057-50c9-4ad4-98f3-ffca64add9e9",
        "user": {
          "name": "spourali@ibm.com",
          "type": "user"
        }
      },
      {
        "cloudName": "AzureCloud",
        "homeTenantId": "32bfacf3-8eb1-498d-b7d9-6f567cf065cd",
        "id": "297d75cf-ac86-4cb7-81f3-e4e400469453",
        "isDefault": false,
        "managedByTenants": [],
        "name": "Project-IBMSecurity-IS-POC-EA-DEV-Test",
        "state": "Enabled",
        "tenantId": "32bfacf3-8eb1-498d-b7d9-6f567cf065cd",
        "user": {
          "name": "spourali@ibm.com",
          "type": "user"
        }
      }
    ]
  4. You can now view your active account details and confirm that the tenant ID matches the subscription that you want to use. Issue this command:
    az account show

    The output should be similar to:

    [root@shahram-bastion1 ~]# az account list --refresh
    [
      {
        "cloudName": "AzureCloud",
        "homeTenantId": "fcf67057-50c9-4ad4-98f3-ffca64add9e9",
        "id": "0d7348f2-27a0-4fd2-8a5e-d9b7df304533",
        "isDefault": true,
        "managedByTenants": [],
        "name": "Microsoft Azure Enterprise",
        "state": "Enabled",
        "tenantId": "fcf67057-50c9-4ad4-98f3-ffca64add9e9",
        "user": {
          "name": "spourali@ibm.com",
          "type": "user"
        }
      },
      {
        "cloudName": "AzureCloud",
        "homeTenantId": "32bfacf3-8eb1-498d-b7d9-6f567cf065cd",
        "id": "297d75cf-ac86-4cb7-81f3-e4e400469453",
        "isDefault": false,
        "managedByTenants": [],
        "name": "Project-IBMSecurity-IS-POC-EA-DEV-Test",
        "state": "Enabled",
        "tenantId": "32bfacf3-8eb1-498d-b7d9-6f567cf065cd",
        "user": {
          "name": "spourali@ibm.com",
          "type": "user"
        }
      }
    ]
  5. View the list of available accounts and record the tenant ID for the subscription that you want to use for your cluster. Issue this command:
    az account list --refresh

    The output should be similar to:

    [root@shahram-bastion1 ~]# az account list --refresh
    [
      {
        "cloudName": "AzureCloud",
        "homeTenantId": "fcf67057-50c9-4ad4-98f3-ffca64add9e9",
        "id": "0d7348f2-27a0-4fd2-8a5e-d9b7df304533",
        "isDefault": true,
        "managedByTenants": [],
        "name": "Microsoft Azure Enterprise",
        "state": "Enabled",
        "tenantId": "fcf67057-50c9-4ad4-98f3-ffca64add9e9",
        "user": {
          "name": "spourali@ibm.com",
          "type": "user"
        }
      },
      {
        "cloudName": "AzureCloud",
        "homeTenantId": "32bfacf3-8eb1-498d-b7d9-6f567cf065cd",
        "id": "297d75cf-ac86-4cb7-81f3-e4e400469453",
        "isDefault": false,
        "managedByTenants": [],
        "name": "Project-IBMSecurity-IS-POC-EA-DEV-Test",
        "state": "Enabled",
        "tenantId": "32bfacf3-8eb1-498d-b7d9-6f567cf065cd",
        "user": {
          "name": "spourali@ibm.com",
          "type": "user"
        }
      }
    ]
  6. To set the default resource subscription, issue this command:
    az account set -s <subscription_id>
  7. View your active account details by issuing this command:
    az account show

    The output should be similar to:

    [root@shahram-bastion1 ~]# az account show
    {
      "environmentName": "AzureCloud",
      "homeTenantId": "32bfacf3-8eb1-498d-b7d9-6f567cf065cd",
      "id": "297d75cf-ac86-4cb7-81f3-e4e400469453",
      "isDefault": true,
      "managedByTenants": [],
      "name": "Project-IBMSecurity-IS-POC-EA-DEV-Test",
      "state": "Enabled",
      "tenantId": "32bfacf3-8eb1-498d-b7d9-6f567cf065cd",
      "user": {
        "name": "spourali@ibm.com",
        "type": "user"
      }
    }
  8. Ensure that you have the appropriate Azure quota or subscription limit Azure Red Hat® OpenShift requires a minimum of 40 cores to create and run an OpenShift cluster. To ensure that your Azure quota meets these minimum requirements, issue this command:
    az vm list-usage --location "East US" -o table

    For example, to check the current subscription quota of the smallest supported virtual machine family SKU Standard DSv3, issue this command:

    LOCATION=eastus
    az vm list-usage -l $LOCATION \ 
    --query "[?contains(name.value, 'standardDSv3Family')]"  -o table
  9. To register the resource providers, issue these commands:
    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