6. Deploy DIGIT

Topics covered:

Overview

This page details the steps to deploy the core platform services and reference applications.

The steps here can be used to deploy:

  • DIGIT core platform services

  • Public Grievance & Redressal module

  • Trade Licence module

  • Property Tax module

  • Water & Sewerage module etc.

Pre-requisites

  1. DIGIT uses golang (required v1.13.3) automated scripts to deploy the builds onto Kubernetes - Linux or Windows or Mac

  2. kubectl is a CLI to connect to the Kubernetes cluster from your machine

  3. Install CURL for making API calls

  4. Install VisualStudio IDE Code for better code/configuration editing capabilities

  5. Install Postman to run digit bootstrap scripts

Run Deployer

Once all the deployments configs are ready, run the command given below. Input the necessary details as prompted on the screen and the interactive installer will take care of the rest.

Run the egov-deployer golang script from the DIGIT-Devops repo.

root@ip:# cd DIGIT-DevOps/deploy-as-code/deployer

root@ip:# go run standalone_installer.go

#Be prepared for the following questions
1. Do you have the Kubernetes Setup?
2. Provide the path of the intented env kubeconfig file
3. Which version of the DIGIT that you want to install
4. What DIGIT Modules that you choose to install (Choose PGR)
5. All, done, Now do you want to preview the deployment manifests 
6. Are you good to proceed with the DIGIT Installation

All Done.

All done, wait and watch for 10 min. The DIGIT setup is complete, and the application will run on the URL.

Note:

  • If you do not have your domain yet, you can edit the host file entries and map the nginx-ingress-service load balancer id like below

    • When you find it, add the following lines to the host file, save and close it.

    • aws-load-balancer-id digit.try.com

  • If you have a GoDaddy account or similar and a DNS records edit access you can map the load balancer id to desired DNS. Create a cname record with the load balancer ID and domain.

You can now test the DIGIT application status in the command prompt/terminal using the command below.

curl -Is http://digit.try.com/employee/login |  head -n 1

OutPut:
HTTP/2 200

Note: Initially pgr-services would be in crashloopbackoff state, but after performing the post-deployment steps the pgr-services will start running.

Adding Security Group ID

After deploying your environment config into the EC2 cluster, we have to add the security group ID of the instance to RDS.

Follow the steps below:

  1. Go to the AWS console and search for EC2.

  2. Click on Instances and select the Instance ID which you created.

  3. Scroll down and go to Security and copy the Security Group ID. It starts with sg-xxxxxxxxxxxxxxxxx.

  4. In the search bar, search for RDS and then go to Databases. Choose the db you had created.

  5. Scroll down for Security Group rules and click any one sg. It redirects to another tab.

  6. Scroll down and click on Edit inbound rules. Click on Add rule.

  7. Change the Type to Postgresql and paste the copied sg-xxxxxxxxxxxxxxxxx beside the custom and click on save rules.

Last updated

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.