Installing DIGIT on Azure

DIGIT services deployment in azure cloud platform

Pre-requisites

  • Make sure you have your azure account with necessary credentials.

  • Install golang Use these links to install- Linux or Windows or Mac

  • ​All DIGIT services are packaged using helm charts, Install helm using the link.

  • kubectl is a CLI to connect to the Kubernetes cluster on your machine

  • Install CURL for making API calls

  • Install Visualstudio IDE Code for better code visualization/editing capabilities

  • Install Postman to run digit bootstrap scripts

  • Install Terraform to provide infrastructure on Azure

  • Install Azure CLI and git

Infra-Setup

  • Clone the DIGIT-DevOps Repo and checkout to azure branch

    git clone https://github.com/egovernments/DIGIT-DevOps.git cd DIGIT-DevOps git checkout azure-install code .
  • go to the remote state in sample-azure directory

    cd infra-as-code/terraform/sample-azure/remote-state
  • login to azure using the below command in terminal

    az login
  • In variables.tf file update the variables

  • Run the below commands to create resource-group, storage-account and container

  • Copy the storage account name and go to sample-azure directory

  • Open main.tf file and update the below placeholder details

  • To create client-id and client-secret with necessary permissions

  • Open variables.tf file and update the variables and run the below commands

Make a note of db_name and server_name

Use the below commad to get kubeconfig. It will automatically store your kubeconfig in .kube folder

Check the kubeconfig and pods by running below commands

Deployment

Go to environments directory and open egov-demo.yaml

Update the below configurations in egov-demo.yaml

Now, open egov-demo-secrets.yaml file and update db details and private key

Generate ssh key pairs (Use either method (a) or method (b)) to update private key. a. Using online website (not recommended in prod setup. To be only used for demo setups):

https://8gwifi.org/sshfunctions.jsp

b. Using openssl :

openssl genpkey -algorithm RSA -out private_key.pem openssl rsa -pubout -in private_key.pem -out public_key.pem

Add the public key to your github account (reference:https://www.youtube.com/watch?v=9C7_jBn9XJ0&ab_channel=AOSNote )

Now, go to deployer directory

To deploy nginx-ingress run the below command

After successfully deploying all the services. Check the pods