This commit is contained in:
OriolBonjoch 2019-11-20 18:59:22 +01:00
Родитель 2a8f3fb256
Коммит 14e0946206
8 изменённых файлов: 21 добавлений и 13 удалений

Просмотреть файл

@ -4,6 +4,7 @@ Param(
[parameter(Mandatory=$false)][string]$subscription="",
[parameter(Mandatory=$true)][string]$clientId,
[parameter(Mandatory=$true)][string]$password,
[parameter(Mandatory=$false)][string]$spObjectId,
[parameter(Mandatory=$false)][string]$tag="latest",
[parameter(Mandatory=$false)][bool]$deployGlobalSecret=$false
)
@ -24,7 +25,11 @@ if (-not [String]::IsNullOrEmpty($subscription)) {
Push-Location powershell
## Deploy ARM
& ./Deploy-Arm-Azure.ps1 -resourceGroup $resourceGroup -location $location -clientId $clientId -password $password
if ($spObjectId) {
& ./Deploy-Arm-Azure.ps1 -resourceGroup $resourceGroup -location $location -clientId $clientId -password $password -objectId $spObjectId
} else {
& ./Deploy-Arm-Azure.ps1 -resourceGroup $resourceGroup -location $location -clientId $clientId -password $password
}
if (-not $?) { Pop-Location; Pop-Location; exit 1 }
Write-Host "Retrieving Aks Name" -ForegroundColor Yellow
@ -32,7 +37,7 @@ $aksName = $(az aks list -g $resourceGroup -o json | ConvertFrom-Json).name
Write-Host "The name of your AKS: $aksName" -ForegroundColor Yellow
Write-Host "Retrieving credentials" -ForegroundColor Yellow
az aks get-credentials -n $aksName -g $resourceGroup
az aks get-credentials -n $aksName -g $resourceGroup --overwrite-existing
# Create KeyVault FlexVolume
& ./Create-Kv-FlexVolume.ps1
@ -49,10 +54,13 @@ Write-Host "Setting up Azure Dev Spaces for AKS: $aksName"
& ./Setup-Dev-Spaces.ps1 -resourceGroup $resourceGroup -aksName $aksName -rootSpace default
# Deploy Azure function in order to have its key on helm values.
$azFunctionLocation=$(./Join-Path-Recursively.ps1 "..","..","Source","Functions","RPSLS.Python.Api")
Push-Location $azFunctionLocation
func azure functionapp publish rpslsfuncappjlnjrxnd5nrz2 --no-build
Pop-Location
$funcapp=$(az functionapp list -g $resourceGroup --query "[0]" -o json | ConvertFrom-Json)
if ($funcapp) {
$azFunctionLocation=$(./Join-Path-Recursively.ps1 "..","..","Source","Functions","RPSLS.Python.Api")
Push-Location $azFunctionLocation
func azure functionapp publish $($funcapp.name) --no-build
Pop-Location
}
# Generate Config
$gValuesLocation=$(./Join-Path-Recursively.ps1 "..","helm","__values",$gValuesFile)

Просмотреть файл

@ -1,7 +1,7 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
http{{ if $.Values.ingress.tlsEnabled }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "rpsls-dotnet.fullname" . }})

Просмотреть файл

@ -1,7 +1,7 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
http{{ if $.Values.ingress.tlsEnabled }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "rpsls-game.fullname" . }})

Просмотреть файл

@ -1,7 +1,7 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
http{{ if $.Values.ingress.tlsEnabled }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "rpsls-java.fullname" . }})

Просмотреть файл

@ -1,7 +1,7 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
http{{ if $.Values.ingress.tlsEnabled }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "rpsls-node.fullname" . }})

Просмотреть файл

@ -1,7 +1,7 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
http{{ if $.Values.ingress.tlsEnabled }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "rpsls-php.fullname" . }})

Просмотреть файл

@ -1,7 +1,7 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
http{{ if $.Values.ingress.tlsEnabled }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "rpsls-python.fullname" . }})

Просмотреть файл

@ -1,7 +1,7 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
http{{ if $.Values.ingress.tlsEnabled }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "rpsls-web.fullname" . }})