Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Commit

Permalink
Update installation process (#19)
Browse files Browse the repository at this point in the history
* Fix ConfigMap template for the web for the cases where Twitter and Google analytincs configuration is empty. Helm couldn't process it.

* Change script to create the dev spaces to accepts the children dev spaces names instead of having them hardcoded.

* Update readme and remove Add-Tiller.ps1 script, which is not useful anymore because now it is used Helm 3.0

* Fix typo.
  • Loading branch information
dsrodenas authored and olgamarti committed Dec 11, 2019
1 parent 791a0c1 commit 864594e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 39 deletions.
12 changes: 9 additions & 3 deletions Deploy/helm/web/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
32 changes: 0 additions & 32 deletions Deploy/powershell/Add-Tiller.ps1

This file was deleted.

10 changes: 7 additions & 3 deletions Deploy/powershell/Setup-Dev-Spaces.ps1
Original file line number Diff line number Diff line change
@@ -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

foreach($child in $childSpaces)
{
az aks use-dev-spaces -g $resourceGroup -n $aksName --space $rootSpace/$child -y
}
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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:

Expand Down

0 comments on commit 864594e

Please sign in to comment.