From cfde46ae9626dbed51aee9270712d7efce2490d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Tom=C3=A0s?= Date: Tue, 10 Jul 2018 11:23:42 +0200 Subject: [PATCH] Created 10.1 Deploying to AKS using Helm Charts (markdown) --- 10.1-Deploying-to-AKS-using-Helm-Charts.md | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 10.1-Deploying-to-AKS-using-Helm-Charts.md diff --git a/10.1-Deploying-to-AKS-using-Helm-Charts.md b/10.1-Deploying-to-AKS-using-Helm-Charts.md new file mode 100644 index 0000000..7db0401 --- /dev/null +++ b/10.1-Deploying-to-AKS-using-Helm-Charts.md @@ -0,0 +1,73 @@ +# Using Helm Charts to deploy eShopOnContainers to AKS + +It is possible to deploy eShopOnContainers on a AKS using [Helm](https://helm.sh/) instead of custom scripts (that will be deprecated soon). + +## Pre-requisites + +Despite an AKS created and kubectl and Azure CLI installed and configured to use your subscription, there are also following pre-requisites: + +### Installing helm + +You need to have helm installed on your machine, and Tiller must be installed on the AKS. Follow [these instructions](https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/aks/kubernetes-helm.md) to setup Helm and Tiller for AKS + +### AKS created with _http routing_ enabled (optional but recommended) + +If creating AKS using CLI be sure to use `--enable-addons http_application_routing` in `az aks create` command. If using Azure Portal just be sure to check the checkbox "Http application routing" on "Networking" settings. For more info, read the [documentation](https://docs.microsoft.com/en-us/azure/aks/http-application-routing) + +## Install eShopOnContainers using Helm + +All steps need to be performed on `/k8s/helm` folder. The easiest way is to use the `deploy-all.ps1` script from a Powershell window: + +``` +.\deploy-all.ps1 -externalDns aks -aksName eshoptest -aksRg eshoptest -imageTag dev +``` + +This will install all the [eShopOnContainers public images](https://hub.docker.com/u/eshop/) with tag `dev` on the AKS named `eshoptest` in the resource group `eshoptest`. By default all infrastructure (sql, mongo, rabbit and redis) is installed also in the cluster. + +Once the script is run, you should see following output when using `kubectl get deployment`: + +``` +NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE +eshop-apigwmm 1 1 1 1 4d +eshop-apigwms 1 1 1 1 4d +eshop-apigwwm 1 1 1 1 4d +eshop-apigwws 1 1 1 1 4d +eshop-basket-api 1 1 1 1 4d +eshop-basket-data 1 1 1 1 4d +eshop-catalog-api 1 1 1 1 4d +eshop-identity-api 1 1 1 1 4d +eshop-keystore-data 1 1 1 1 4d +eshop-locations-api 1 1 1 1 4d +eshop-marketing-api 1 1 1 1 4d +eshop-mobileshoppingagg 1 1 1 1 4d +eshop-nosql-data 1 1 1 1 4d +eshop-ordering-api 1 1 1 1 4d +eshop-ordering-backgroundtasks 1 1 1 1 4d +eshop-ordering-signalrhub 1 1 1 1 4d +eshop-payment-api 1 1 1 1 4d +eshop-rabbitmq 1 1 1 1 4d +eshop-sql-data 1 1 1 1 4d +eshop-webmvc 1 1 1 1 4d +eshop-webshoppingagg 1 1 1 1 4d +eshop-webspa 1 1 1 1 4d +eshop-webstatus 1 1 1 1 4d +``` + +Every public service is exposed through its own ingress resource, as you can see if using `kubectl get ing`: + +``` +eshop-apigwmm eshop...aksapp.io 80 4d +eshop-apigwms eshop...aksapp.io 80 4d +eshop-apigwwm eshop...aksapp.io 80 4d +eshop-apigwws eshop...aksapp.io 80 4d +eshop-identity-api eshop...aksapp.io 80 4d +eshop-webmvc eshop...aksapp.io 80 4d +eshop-webspa eshop...aksapp.io 80 4d +eshop-webstatus eshop...aksapp.io 80 4d +``` + +Ingresses are automatically configured to use the public DNS of the AKS provided by the "https routing" addon. + +You can view the MVC client at http:///webmvc and the SPA at the http:/// + +