On Azure

The Azure Kubernetes Service (AKS) is one of the Azure services used for deploying, managing, and scaling any distributed and containerized workloads. Here we can provision the AKS cluster on Azure from the ground up and using an automated way (infra-as-code) using terraformarrow-up-right and then deploy the DIGIT-iFIX Services config-as-code using Helmarrow-up-right.

This quickstart assumes a basic understanding of Kubernetes concepts. For more information, see Kubernetes core concepts for Azure Kubernetes Service (AKS)arrow-up-right.

If you don't have an Azure subscriptionarrow-up-right, create a free accountarrow-up-right before you begin.

Pre-requisites

Note: Run the commands as administrator if you plan to run the commands in this quickstart locally instead of in Azure Cloud Shell.

AKS Architecture

Before we provision the cloud resources, we need to understand and be sure about what resources need to be provisioned by terraform to deploy DIGIT. The following picture shows the various key components. (AKS, Worker Nodes, Postgres DB, Volumes, Load Balancer)

AKS Architecture For iFIX Setup

Considering the above deployment architecture, the following is the resource graph that we are going to provision using terraform in a standard way so that every time and for every env, it'll have the same infra.

  • AKS Azure (Kubernetes Service Master)

  • Work node group (VMs with the estimated number of vCPUs, Memory

  • Volumes (persistent volumes)

  • PostGres Database

  • Virtual Network

  • Users to access, deploy and read-only

Understand the Resource Graph In Terraform Script

  • Ideally, one would write the terraform script from the scratch using this docarrow-up-right.

  • Here we have already written the terraform script that provisions the production-grade DIGIT Infra and can be customized with the specified configuration.

  • Let's clone the iFix-DevOpsarrow-up-right GitHub repo where the terraform script to provision the AKS cluster is available and below is the structure of the files.

The following main.tf contains the detailed resource definitions that need to be provisioned, please have a look at it.

Dir: iFix-DevOps/Infra-as-code/terraform/aks-ifix-dev

main.tfarrow-up-right

Custom Variables/Configurations

You can define your configurations in variables.tf and provide the environment-specific cloud requirements so that using the same terraform template you can customize the configurations.

Following are the values that you need to mention in the following files, the blank ones will be prompted for inputs while execution.

variables.tfarrow-up-right

​Run Terraform

Now that we know what the terraform script does, the resources graph that it provisions and what custom values should be given with respect to your env.

Let's begin to run the terraform scripts to provision infra required to Deploy DIGIT on AZ.

  1. First CD into the following directory and run the following command 1-by-1 and watch the output closely.

Upon Successful execution following resources gets created which can be verified by the command "terraform output"

  • Network: Virtual Network.

  • AKS cluster: with nodepool(s), master(s) & worker node(s).

  • Storage(s): for es-master, es-data-v1, es-master-infra, es-data-infra-v1, zookeeper, kafka, kafka-infra.

Connect To The Cluster

To manage a Kubernetes cluster, use the Kubernetes command-line client, kubectlarrow-up-right. kubectl is already installed if you use Azure Cloud Shell.

  1. Install kubectl locally using the az aks install-cliarrow-up-right command:

  2. Configure kubectl to connect to your Kubernetes cluster using the az aks get-credentialsarrow-up-right command. The following command:

    • Downloads credentials and configures the Kubernetes CLI to use them.

    • Uses ~/.kube/config, the default location for the Kubernetes configuration filearrow-up-right. Specify a different location for your Kubernetes configuration file using --file.

3. Finally, Verify that you are able to connect to the cluster by running the following command

Whola! All set and now you can go with Deploy Product.

Creative Commons Licensearrow-up-rightAll content on this page by eGov Foundationarrow-up-right is licensed under a Creative Commons Attribution 4.0 International Licensearrow-up-right.

Last updated

Was this helpful?