diff --git a/Deploy/helm/web/templates/configmap.yaml b/Deploy/helm/web/templates/configmap.yaml index b2700792..9c343a58 100644 --- a/Deploy/helm/web/templates/configmap.yaml +++ b/Deploy/helm/web/templates/configmap.yaml @@ -12,10 +12,16 @@ metadata: data: APPINSIGHTS_INSTRUMENTATIONKEY: {{ .Values.inf.appinsights.id }} GameManager__Url: {{ .Values.inf.apiurls.gameapiurl }} - GoogleAnalytics: {{ .Values.inf.googleanalytics.id | quote }} - Authentication__Twitter__ConsumerKey: {{ .Values.auth.twitter.key | quote }} - Authentication__Twitter__ConsumerSecret: {{ .Values.auth.twitter.secret | quote }} GameManager__Grpc__GrpcOverHttp: "true" # true: web will use http/2 prior knowledge without TLS when using gRPC +{{- if .Values.inf.googleanalytics.id }} + GoogleAnalytics: {{ .Values.inf.googleanalytics.id }} +{{- end -}} +{{- if .Values.auth.twitter.key }} + Authentication__Twitter__ConsumerKey: {{ .Values.auth.twitter.key }} +{{- end -}} +{{- if .Values.auth.twitter.secret }} + Authentication__Twitter__ConsumerSecret: {{ .Values.auth.twitter.secret }} +{{- end -}} {{- if .Values.inf.web.scale.enabled }} {{- if eq .Values.inf.web.scale.dp.provider "internal" -}} DataProtectionProvider: "redis" diff --git a/Deploy/powershell/Add-Tiller.ps1 b/Deploy/powershell/Add-Tiller.ps1 deleted file mode 100644 index 9f77de63..00000000 --- a/Deploy/powershell/Add-Tiller.ps1 +++ /dev/null @@ -1,32 +0,0 @@ -Write-Host "------------------------------------------------------------" -ForegroundColor Yellow -Write-Host "Configuring RBAC for Tiller" -ForegroundColor Yellow -Write-Host "------------------------------------------------------------" -ForegroundColor Yellow -kubectl create serviceaccount --namespace kube-system tiller -kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller -kubectl --namespace kube-system patch deploy tiller-deploy -p '{\"spec\":{\"template\":{\"spec\":{\"serviceAccount\":\"tiller\"}}}}' -Write-Host "------------------------------------------------------------" -ForegroundColor Yellow -Write-Host "Installing Helm" -ForegroundColor Yellow -Write-Host "------------------------------------------------------------" -ForegroundColor Yellow -helm list -q | Out-Null -if ($?) { - helm init -c --service-account tiller --node-selectors "kubernetes.io/os=linux" -} -else { - helm init --service-account tiller --node-selectors "kubernetes.io/os=linux" --wait -} - -helm list -q | Out-Null - -Write-Host "------------------------------------------------------------" -ForegroundColor Yellow -Write-Host "Installing Key Vault FlexVolume" -ForegroundColor Yellow -Write-Host "------------------------------------------------------------" -ForegroundColor Yellow - -$kv=$(kubectl get ns kv --no-headers --ignore-not-found) - -if (-not [String]::IsNullOrEmpty($kv)) { - Write-Host "Namespace kv found. Assuming Key Vault FlexVolume is already installed" -ForegroundColor Yellow -} -else { - kubectl create -f https://raw.githubusercontent.com/Azure/kubernetes-keyvault-flexvol/master/deployment/kv-flexvol-installer.yaml -} -exit $LastExitCode \ No newline at end of file diff --git a/Deploy/powershell/Setup-Dev-Spaces.ps1 b/Deploy/powershell/Setup-Dev-Spaces.ps1 index 10a672e7..e940b26b 100644 --- a/Deploy/powershell/Setup-Dev-Spaces.ps1 +++ b/Deploy/powershell/Setup-Dev-Spaces.ps1 @@ -1,10 +1,14 @@ Param( [parameter(Mandatory=$true)][string]$resourceGroup, [parameter(Mandatory=$true)][string]$rootSpace, - [parameter(Mandatory=$true)][string]$aksName + [parameter(Mandatory=$true)][string]$aksName, + [parameter(Mandatory=$true)][string[]]$childSpaces ) # Create Dev Spaces controller with some child spaces az aks use-dev-spaces -g $resourceGroup -n $aksName --space $rootSpace -y -az aks use-dev-spaces -g $resourceGroup -n $aksName --space $rootSpace/scott -y -az aks use-dev-spaces -g $resourceGroup -n $aksName --space $rootSpace/jessica -y \ No newline at end of file + +foreach($child in $childSpaces) +{ + az aks use-dev-spaces -g $resourceGroup -n $aksName --space $rootSpace/$child -y +} diff --git a/README.md b/README.md index ffa2c041..e0656760 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,7 @@ Pre-requisites for this deployment are to have: - The AKS and all related resources deployed in Azure - A terminal with Powershell environment - [Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) installed. +- [Azure Functions Core Tools](https://docs.microsoft.com/es-es/azure/azure-functions/functions-run-local) installed (required only to deploy Predictor). - [Kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) installed with the last version (v1.16.0 at this moment). - [Helm 3](https://helm.sh/docs/intro/install/) installed with 3.0 or superior version (v3.0.0 at this moment). - Docker installed @@ -173,6 +174,13 @@ From the terminal type: At this point if you type `kubectl config current-context` the name of your AKS cluster should be displayed. That means that `kubectl` is ready to use your AKS +### Installing FlexVolume + +The KeyVault support is implemented through [FlexVol](https://github.com/Azure/kubernetes-keyvault-flexvol). To install Flex Volume in the AKS, type the following: + +``` +.\Create-Kv-FlexVolume.ps1 +``` #### Configuring services Before deploying services using Helm, you need to setup the configuration. We refer to the configuration file with the name of _gvalues_ file. This file **contains all secrets** so beware to not commit in your repo accidentally. @@ -189,7 +197,7 @@ Generating a valid _gvalues_ file can be a bit harder, so there is a Powershell > **Note** The Generate-Config.ps1 uses the _application-insights_ CLI extension to find the application insights id. Install it with `az extension add --name application-insights` -> **Note** The configuration script requires the function key so internal aks services can call it, so before executing the Generate-Config.ps1 make sure that its already in azure. +> **Note** The configuration script requires the Azure function key so internal aks services can call it. So before executing the Generate-Config.ps1 make sure that the function is already published and the function key exists. To auto-generate your _gvalues_ file just go to `/Deploy/powershell` folder and from a Powershell window, type the following: