Deploy Backend services on AKS
June 17, 2019 ยท View on GitHub
Note: All commands from this doc must be run from /setup folder
Deploy the services in the cluster
From Bash terminal: Run the 02-deploy-apis.sh to build backend Docker images and deploy them on cluster. Script accept following parameters:
-a <name>: ACR name to use. Defaults to the value ofACR_NAMEenvironment variable.-r <fqdn>: FQDN of the Docker registry to use. If this value is set, it overrides theACR_NAMEand-aparameter and allows deploys to non ACR registries.--aks-rg <name>: Name of the resource group to use. Defaults toAKS_RGenv variable.--aks-name <name>: Name of the AKS to use. Defaults toAKS_NAMEenv variable and it is only used to show the dashboard.--acr-no-create: If passed do not create the ACR-t: Docker tag image to push and deploy in the cluster. Defaults to current Git branch-o: Docker organization of the images. Defaults tosmarthotels.-n: Name of the SmartHotel360 application to be deployed. Defaults to theSH360_APPNAMEenv value.--user <login>: Needed if pushing to a non ACR registry (if-rused). Is the login of the Docker Registry--password <password>: Needed if pushing to a non ACR registry (if-rused). Is the password of the Docker Registry--no-clean: By default script cleans all Helm releases of the cluster. Passing this parameter avoids this cleanup.--httpRouting: pass it if the cluster is an AKS with HTTP Routing Enabled. In this case the script auto-detects the dns.--dns: Name of the dns to use in case we do not use--httpRouting
From Powershell terminal: Run the 02-deploy-apis.ps1 to build backend Docker images and deploy them on cluster. Script accept following parameters:
-acrName <name>: ACR name to use. Defaults to the value ofACR_NAMEenvironment variable.-registry <fqdn>: FQDN of the Docker registry to use. If this value is set, it overrides theACR_NAMEand-acrNameparameter and allows deploys to non ACR registries.-aksRg <name>: Name of the resource group to use. Defaults toAKS_RGenv variable.-aksName <name>: Name of the AKS to use. Defaults toAKS_NAMEenv variable and it is only used to show the dashboard.-createAcr<false>: when false, does not create a new ACR. Defaults to true (create an ACR).-imageTag: Docker tag image to push and deploy in the cluster. Defaults to current Git branch-dockerOrg: Docker organization of the images. Defaults tosmarthotels.-appName: Name of the SmartHotel360 application to be deployed. Defaults to theSH360_APPNAMEenv value.-customLogin <login>: Needed if pushing to a non ACR registry (if-registryused). Is the login of the Docker Registry-customPassword <password>: Needed if pushing to a non ACR registry (if-registryused). Is the password of the Docker Registry-clean<false>: By default script cleans all Helm releases of the cluster. Passing this parameter with false avoids this cleanup.-httpRouting<false>: pass it with true if the cluster is an AKS with HTTP Routing Enabled. In this case the script auto-detects the dns.-dns: Name of the dns to use in case we do not use--httpRouting
This scripts does the following:
- Creates the ACR (unless
-ror--acr-no-createused) - Runs the
/Source/Backend/deploy/k8s/build-push.shscript to build and push the backend services. - Runs the
/Source/Backend/deploy/k8s/deploy-secret.shscript to deploy login information in the cluster - Runs the
/Source/Backend/deploy/k8s/clean.shscript to clean the Kubernetes cluster, unless the--no-cleanis used. - Runs the
/Source/Backend/deploy/k8s/deploy.shto deploy the Backend services using Helm.