1. Prepare Deployment Configuration

Steps to prepare the deployment configuration file

Topics covered:

Overview

It's important to prepare a global deployment configuration yaml file that contains all necessary user-specific custom values like URL, gateways, persistent storage ids, DB details etc.

Pre-reads

Post-Kubernetes Cluster setup, the deployment consists of 2 stages. We will be deploying HCM and show the required configurations. The deployment steps are similar for all other modules except that the prerequisites differ depending on required features like SMS Gateway, Payment Gateway, etc.

Steps To Prepare Deployment Configuration File

Navigate to the following file in your local machine from the previously cloned DevOps git repository.

Deployment Config Template
Secrets File Template

Step 1: Clone the following health-campaign-devops repo (If not already done as part of Infra setup), you may need to install git and then run git clone it to your machine.

$ git clone -b azure-install https://github.com/egovernments/health-campaign-devops

Step 2: After cloning the repo CD to the health-campaign-devops folder, type the "code ." command to open the visual editor and open all the files from the health-campaign-devops repo.

Step 3: Update the deployment config file with your details, you can use the following template egov-demo-sample.

  • Replace the following as per the applicable values -

    • Important: Add your domain name here, which you want to use for accessing DIGIT. ( Do not use the dummy domain )

    • SMS gateway to receive OTP, transaction mobile notification, etc.

    • MDMS, Config repo URL, here is where you provide master data, tenants and various user/role access details.

    • GMap key for the location service

    • Payment gateway, in case you use Payment module.

Step 4: Update your credentials and sensitive data in the secret file as per your details.

  1. credentials, secrets (You need to encrypt using sops and create a <env>-secret.yaml separately)

  2. SOPS expects an encryption key to encrypt/decrypt a specified plain text and keep the details secured. The following are the options to generate the encryption key -

  3. Once you generate your encryption key, create a .sops.yaml configuration file under the /helm directory of the cloned repo to define the keys used for specific files. Refer to the SOP doc for more details.

Note: For demo purposes, you can use the egov-demo-secrets.yaml as it is without sops configuration, but make sure you update your specific details like Git SSH, URL etc. When you decide to push these configurations into any git or public space, make sure you follow the sops configuration mentioned in this article sops to encrypt your secrets.

Step 5: Fork the following repos that contain the master data and default configs which you would customize as per your specific implementation later. Like (Master Data, ULB, Tenant details, Users, etc) to your respective GitHub organization account.

  1. ​fork both the mdms, and config repos into your GitHub organization account

  2. Once you fork the repos into your GitHub organization account, Create a github user account, generate an SSH authentication key generate new SSH key and add it to above user account.

  3. New GitHub users should be enabled to access the earlier forked repos.

  4. Add the ssh private key that you generated in the previous step to egov-demo-secrets.yaml under the git-sync section.

  5. Modify the services git-Sync repo and branch with your fork repo and branch in egov-demo.yaml.​

Step 6: Update the deployment configs for the below as per your specification:

  1. Number of replicas/scale of each service (depending on whether dev or prod load).

  2. Update the SMS Gateway, Email Gateway, and Payment Gateway details for the notification and payment gateway services, etc.

  3. Update the config, MDMS GitHub repos wherever marked

  4. Update GMap key (In case you are using Google Map services in respective services)

  5. Create one private S3 bucket for Filestore and one public bucket for logos. Add the bucket details respectively and create an IAM user with the s3 bucket access. Add IAM user details to <env-secrets.yaml>.

  6. URL/DNS on which the DIGIT will be exposed.

  7. SSL certificate for the above URL.

  8. Any specific endpoint configs (Internal/external).

Step 7: Create s3 compatible storage service:

  • AWS S3 Update IAM aws-key & aws-secret-key (the IAM credential must have write access to s3 bucket) under filestore in <env>-secret.yaml

  • Azure Blob Storage Update aws-key as storage account name & aws-secret-key as access key generated in Azure storage account.

Update the environment flags in egov-filestore/values.yaml as per the selected Cloud Provider.

Last updated

Was this helpful?