|
@ -1,7 +1,7 @@ |
|
|
Param( |
|
|
Param( |
|
|
[parameter(Mandatory=$true)][string]$resourceGroupName, |
|
|
[parameter(Mandatory=$true)][string]$resourceGroupName, |
|
|
[parameter(Mandatory=$true)][string]$location, |
|
|
[parameter(Mandatory=$true)][string]$location, |
|
|
[parameter(Mandatory=$true)][string]$registryName, |
|
|
|
|
|
|
|
|
[parameter(Mandatory=$false)][string]$registryName, |
|
|
[parameter(Mandatory=$true)][string]$orchestratorName, |
|
|
[parameter(Mandatory=$true)][string]$orchestratorName, |
|
|
[parameter(Mandatory=$true)][string]$dnsName, |
|
|
[parameter(Mandatory=$true)][string]$dnsName, |
|
|
[parameter(Mandatory=$true)][string]$createAcr=$true |
|
|
[parameter(Mandatory=$true)][string]$createAcr=$true |
|
@ -11,7 +11,7 @@ |
|
|
Write-Host "Creating resource group..." -ForegroundColor Yellow |
|
|
Write-Host "Creating resource group..." -ForegroundColor Yellow |
|
|
az group create --name=$resourceGroupName --location=$location |
|
|
az group create --name=$resourceGroupName --location=$location |
|
|
|
|
|
|
|
|
if ($createAcr) { |
|
|
|
|
|
|
|
|
if ($createAcr -eq $true) { |
|
|
# Create Azure Container Registry |
|
|
# Create Azure Container Registry |
|
|
Write-Host "Creating Azure Container Registry..." -ForegroundColor Yellow |
|
|
Write-Host "Creating Azure Container Registry..." -ForegroundColor Yellow |
|
|
az acr create -n $registryName -g $resourceGroupName -l $location --admin-enabled true --sku Basic |
|
|
az acr create -n $registryName -g $resourceGroupName -l $location --admin-enabled true --sku Basic |
|
@ -24,5 +24,7 @@ az acs create --orchestrator-type=kubernetes --resource-group $resourceGroupName |
|
|
# Retrieve kubernetes cluster configuration and save it under ~/.kube/config |
|
|
# Retrieve kubernetes cluster configuration and save it under ~/.kube/config |
|
|
az acs kubernetes get-credentials --resource-group=$resourceGroupName --name=$orchestratorName |
|
|
az acs kubernetes get-credentials --resource-group=$resourceGroupName --name=$orchestratorName |
|
|
|
|
|
|
|
|
# Show ACR credentials |
|
|
|
|
|
az acr credential show -n $registryName |
|
|
|
|
|
|
|
|
if ($createAcr -eq $true) { |
|
|
|
|
|
# Show ACR credentials |
|
|
|
|
|
az acr credential show -n $registryName |
|
|
|
|
|
} |