System Data Setup

Overview

Before you run the DIGIT HCM product, you need to set up the basic system data such as boundaries of the geography and the master data. In this document, we will load the base data for the server.

Download Database Dump File

Download the seed_data_dump.sql file into your local system and save it in a folder/directory.

Load the Backup File into the Database

To load the file to the database:

  • Get the database pod name by executing the following command and copy the NAME from the output. Refer to the screenshot below:

kubectl get pods -n playground
Sample screenshot of database pod
  • We also need db_name, and db_username. We configured these values earlier in the forked repository infra-as-code/terraform/sample-aws/input.yaml file.

    • Navigate to infra-as-code/terraform/sample-aws.

    • Open input.yamland note down db_username, db_name, which configured earlier.

  • Get {DB_HOST} the value by executing the command below, and find and copy the "db-host" value. Refer to the screenshot below for select and copy of "db-host". This will be used in the next commands.

Sample Screenshot of command output for db_host

Load Data into the Database

Now we have all the data required to run the command below which will load the data into the database.

  • Go to the folder/directory where the dump file was downloaded and open the terminal in that folder or use the 'cd' command to change to that directory:

Example screenshot with cd command to download folder
  • Replace {PLAYGROUND_POD_NAME} , {DATABASE_HOST}, {DATABASE_USERNAME}, {DB_NAME} in the command given below and run it:

Verify the Output

After running the above command, the output should look like it is shown below:

To Enable File Store

  • Encode Aws access key and secret key to base64 encoding

  • Update the secrets in the cluster (*do not put these is the git DevOps repo files and commit)

  • If it is not editable by vi editor, we can use vs code to edit the file, run the below command, and run the above step again

Redeploy all the services at once to read from new data

  • Run the below command to delete and restart all the services

  • Run the command below to check if all pods/services are running. If not, wait for some time and check again:

Setup PGR Workflow

If the PGR Module is enabled, follow the below steps to set it -

  • Port Forward workflow v2 service using the below command

  • Run the below cURL to create a business service

Create Superuser

  • Check if the egov-user service is up and running by using the following command:

If the egov-user service is running with Ready 1/1, then connect to it by port forwarding:

  • Import the below curl in Postman or execute it in another terminal window:

  • Replace the username, password, and tenantId with proper values (keep tenantid as 'mz' if master data is loaded in DB unchanged).

Last updated

Was this helpful?