Azure redhat openshift

Amir Shirazi 1 Reputation point
2021-10-15T12:34:15.597+00:00

Hello ,

I am trying to deploy openshift redhat on Azure but I am getting error.
I have done following steps:

az login
az account set --subscription TODO
az feature register --namespace Microsoft.ContainerService -n AROGA
az provider register -n Microsoft.ContainerService
az provider register -n Microsoft.Storage --wait
az provider register -n Microsoft.Compute --wait
az provider register -n Microsoft.Solutions --wait
az provider register -n Microsoft.Network --wait
az provider register -n Microsoft.KeyVault --wait
az provider register -n Microsoft.ContainerService --wait

set CLUSTER_NAME=TODO13
set LOCATION=eastus
set APPID=redacted
set GROUPID=redacted
set SECRET=redacted
set TENANT=redacted

az group create --name %CLUSTER_NAME% --location %LOCATION%

az openshift create --resource-group %CLUSTER_NAME% --name %CLUSTER_NAME% -l %LOCATION% --aad-client-app-id %APPID% --aad-client-app-secret %SECRET% --aad-tenant-id %TENANT% --customer-admin-group-id %GROUPID%


When I ran az group create --name %CLUSTER_NAME% --location %LOCATION% I am getting error below :

Parameter 'resource_group_name' must conform to the following pattern: '^[-\w\._\(\)]+$'.

I am getting same error for this command as well.

az openshift create --resource-group %CLUSTER_NAME% --name %CLUSTER_NAME% -l %LOCATION% --aad-client-app-id %APPID% --aad-client-app-secret %SECRET% --aad-tenant-id %TENANT% --customer-admin-group-id %GROUPID%

Can you please help me how to fix it ?

Thanks

Azure Red Hat OpenShift
Azure Red Hat OpenShift
An Azure service that provides a flexible, self-service deployment of fully managed OpenShift clusters.
70 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. SRIJIT-BOSE-MSFT 4,326 Reputation points Microsoft Employee
    2021-10-18T05:22:53.073+00:00

    @Amir Shirazi , thank you for the question.

    If you are using Windows Powershell then modify the commands you are running, as:

    ...  
    set -Name CLUSTER_NAME -Value TODO13        #alternatively, $CLUSTER_NAME=TODO13  
    set -Name LOCATION -Value eastus            #alternatively, $LOCATION=eastus  
    set -Name APPID -Value <app-id-value>       #alternatively, $APPID=<app-id-value>  
    set -Name GROUPID -Value <group-id-value>   #alternatively, $GROUPID=<group-id-value>  
    set -Name SECRET -Value <secret-value>      #alternatively, $SECRET=<secret-value>  
    set -Name TENANT -Value <tenant-id-value>   #alternatively, $TENANT=<tenant-id-value>  
      
    az group create --name $CLUSTER_NAME --location $LOCATION  
    az openshift create --resource-group $CLUSTER_NAME --name $CLUSTER_NAME -l $LOCATION --aad-client-app-id $APPID --aad-client-app-secret $SECRET --aad-tenant-id $TENANT --customer-admin-group-id $GROUPID  
    

    Else, if you are using bash or sh then modify the commands you are running, as:

    ...  
    export CLUSTER_NAME=TODO13        #alternatively, CLUSTER_NAME=TODO13  
    export LOCATION=eastus            #alternatively, LOCATION=eastus  
    export APPID=<app-id-value>       #alternatively, APPID=<app-id-value>  
    export GROUPID=<group-id-value>   #alternatively, GROUPID=<group-id-value>  
    export SECRET=<secret-value>      #alternatively, SECRET=<secret-value>  
    export TENANT=<tenant-id-value>   #alternatively, TENANT=<tenant-id-value>  
      
    az group create --name $CLUSTER_NAME --location $LOCATION  
    az openshift create --resource-group $CLUSTER_NAME --name $CLUSTER_NAME -l $LOCATION --aad-client-app-id $APPID --aad-client-app-secret $SECRET --aad-tenant-id $TENANT --customer-admin-group-id $GROUPID  
    

    ----------

    Hope this helps.

    Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.
    0 comments No comments

  2. Amir Shirazi 1 Reputation point
    2021-10-19T03:32:46.447+00:00

    @SRIJIT-BOSE-MSFT

    Thank you so much for the support!
    Actually when I ran line 10 :az openshift create --resource-group $CLUSTER_NAME --name $CLUSTER_NAME -l $LOCATION --aad-client-app-id $APPID --aad-client-app-secret $SECRET --aad-tenant-id $TENANT --customer-admin-group-id $GROUPID

    I have following error
    https://aka.ms/cli_ref
    Read more about the command in reference docs
    PS C:\WINDOWS\system32> az openshift create --resource-group $CLUSTER_NAME --name $CLUSTER_NAME -l $LOCATION --aad-client-app-id $APPID --aad-client-app-secret $SECRET --aad-tenant-id $TENANT --customer-admin-group-id $GROUPID
    argument --aad-client-app-id: expected one argument

    TRY THIS:
    az openshift create -g MyResourceGroup -n MyManagedCluster --aad-client-app-id {APP_ID} --aad-client-app-secret {APP_SECRET} --aad-tenant-id {TENANT_ID} --compute-count 5
    Create an OpenShift cluster with 5 compute nodes and a custom AAD Client.

    az openshift create -g MyResourceGroup -n MyManagedCluster --customer-admin-group-id {GROUP_ID}
    Create an OpenShift cluster and auto create an AAD Client and setup cluster admin group

    az openshift create -g MyResourceGroup -n MyManagedCluster
    Create an OpenShift cluster and auto create an AAD Client

    https://aka.ms/cli_ref
    Read more about the command in reference docs

    Thank you so much in advance.