@@ -603,7 +603,7 @@ The template parameters below have default values. They can be specified, but th
603
603
| ` apiServerVisibility ` | The visibility of the API server (` Public ` or ` Private ` ). | | Public
604
604
| ` ingressVisibility ` | The ingress (entrance) visibility (` Public ` or ` Private ` ). | | Public
605
605
606
- # [ PowerShell ] ( #tab/powershell )
606
+ The following sections provide instructions using Powershell or Azure CLI.
607
607
608
608
### Before you begin - PowerShell
609
609
@@ -616,7 +616,7 @@ Before running the commands in this quickstart, you might need to run `Connect-A
616
616
$rhosPullSecret= Get-Content .\pull-secret.txt -Raw # the pull secret text that was obtained from the Red Hat OpenShift Cluster Manager website
617
617
```
618
618
619
- ### Define the following parameters as environment variables
619
+ ### Define the following parameters as environment variables - Powershell
620
620
621
621
``` powershell
622
622
$resourceGroup="aro-rg" # the new resource group for the cluster
@@ -642,7 +642,7 @@ Register-AzResourceProvider -ProviderNamespace Microsoft.Authorization
642
642
New-AzResourceGroup -Name $resourceGroup -Location $location
643
643
```
644
644
645
- ### Create a new service principal and assign roles
645
+ ### Create a new service principal and assign roles - Powershell
646
646
647
647
``` powershell
648
648
$suffix=Get-Random # random suffix for the Service Principal
@@ -653,20 +653,20 @@ New-AzRoleAssignment -ObjectId $azureADAppSp.Id -RoleDefinitionName 'User Access
653
653
New-AzRoleAssignment -ObJectId $azureADAppSp.Id -RoleDefinitionName 'Contributor' -ResourceGroupName $resourceGroup -ObjectType 'ServicePrincipal'
654
654
```
655
655
656
- ### Get the Service Principal password
656
+ ### Get the Service Principal password - Powershell
657
657
658
658
``` powershell
659
659
$aadClientSecretDigest = ConvertTo-SecureString -String $azureADAppSp.PasswordCredentials.SecretText -AsPlainText -Force
660
660
$aadClientSecretDigest = ConvertTo-SecureString -String $azureADAppSp.PasswordCredentials.SecretText -AsPlainText -Force
661
661
```
662
662
663
- ### Get the service principal for the OpenShift resource provider
663
+ ### Get the service principal for the OpenShift resource provider - Powershell
664
664
665
665
``` powershell
666
666
$rpOpenShift = Get-AzADServicePrincipal -DisplayName 'Azure Red Hat OpenShift RP' | Select-Object -ExpandProperty Id -Property Id -First 1
667
667
```
668
668
669
- ### Check the parameters before deploying the cluster
669
+ ### Check the parameters before deploying the cluster - Powershell
670
670
671
671
``` powershell
672
672
# setup the parameters for the deployment
@@ -684,7 +684,7 @@ $templateParams = @{
684
684
Write-Verbose (ConvertTo-Json $templateParams) -Verbose
685
685
```
686
686
687
- ### Deploy the Azure Red Hat OpenShift cluster using the ARM template
687
+ ### Deploy the Azure Red Hat OpenShift cluster using the ARM template - Powershell
688
688
689
689
``` powershell
690
690
New-AzResourceGroupDeployment -ResourceGroupName $resourceGroup @templateParams `
@@ -704,7 +704,6 @@ Once you're done, run the following command to delete your resource group and al
704
704
``` powershell
705
705
Remove-AzResourceGroup -Name $resourceGroup -Force
706
706
```
707
- # [ Azure CLI] ( #tab/azure-cli )
708
707
709
708
### Before you begin - Azure CLI
710
709
@@ -718,7 +717,7 @@ You might need to run `az login` before running the commands in this quickstart.
718
717
PULL_SECRET=$(cat pull-secret.txt) # the pull secret text
719
718
```
720
719
721
- ### Define the following parameters as environment variables with azure-cli
720
+ ### Define the following parameters as environment variables - Azure CLI
722
721
723
722
``` azurecli-interactive
724
723
RESOURCEGROUP=aro-rg # the new resource group for the cluster
@@ -744,7 +743,8 @@ az provider register --namespace 'Microsoft.Authorization' --wait
744
743
az group create --name $RESOURCEGROUP --location $LOCATION
745
744
```
746
745
747
- ### Create a service principal for the new Azure AD application
746
+ ### Create a service principal for the new Azure AD application
747
+ - Azure CLI
748
748
749
749
``` azurecli-interactive
750
750
az ad sp create-for-rbac --name "sp-$RG_NAME-${RANDOM}" --role Contributor > app-service-principal.json
@@ -804,8 +804,6 @@ Once you're done, run the following command to delete your resource group and al
804
804
az aro delete --resource-group $RESOURCEGROUP --name $ARO_CLUSTER_NAME
805
805
```
806
806
807
- ---
808
-
809
807
> [ !TIP]
810
808
> Having issues? Let us know on GitHub by opening an issue in the [ Azure Container Apps repo] ( https://github.com/microsoft/azure-container-apps ) .
811
809
0 commit comments