Health
PlatformDomainAcademyDesign SystemFeedback
v1.4
v1.4
  • 👋Introducing DIGIT Health
    • Release Notes
      • HCM v1.4 Release Notes
        • Migration from v1.3 to v1.4
        • Service Build Updates
        • Release Checklist
      • v1.3 Release Notes
      • v1.3 Tech Release Summary
        • Master Data Management Service (MDMS) & Configuration Updates
        • Test Cases
        • Service Build Updates
      • v1.2 Release Notes
      • v1.0 Release Notes
  • Product Roadmap
  • 💙HEALTH CAMPAIGN MANAGEMENT
    • Understanding DIGIT Health Campaign Management (HCM)
    • Value Proposition
  • 🎯HCM PRODUCT SUITE
    • Functional Specifications
      • Campaign Type Setup
      • Campaign Setup
      • Inventory
      • Boundary Hierarchy
      • Beneficiary
      • Boundary Data Specs
      • Draft System User Setup
      • Role Action Mapping
    • Building Blocks & Services
    • HCM Modules
      • DIGIT HCM App
        • User Manual
          • Single Round Campaigns
            • Registration & Delivery
          • Multi-Round Campaigns
            • Registration & Delivery
            • Download Beneficiary Data
          • Common Functions
            • User Management
            • 2D Voucher Scanning
            • Proximity-Based Search
            • Voucher-Based Registration and Distribution
            • Tracking Beneficiary Referrals
            • Tracking Side-Effects for Beneficiaries
            • Tracking Adverse Events
            • Health Facility Referral
            • Raising Complaints
            • Resolving Complaints
            • Inventory Management
              • User Manual
                • Stock Management
                • Stock Reconciliation
                • View Reports
                • Bale Scanning
            • Attendance Management
          • Support Functions
            • Language Selection
            • Login
            • Forgot Password
            • Project Selection
            • Hamburger Menu
            • Help
            • Sync
            • Checklist
      • Campaign Management Dashboard
        • User Manual
      • Microplanning
      • HCM Console
  • 🚀REFERENCE IMPLEMENTATIONs
    • Mozambique
      • LLIN Overview
      • Customisation
      • Rollout
  • 🧰TECHNOLOGY
    • Architecture
      • High Level Design
        • Health Campaign System High Level Design
        • Design Decision Log
      • Low Level Design
        • Registries
          • Individual
          • Household
          • Product
          • Facility
          • Attendance
        • Services
          • Project
          • Stock
          • Referral
      • Field App Architecture
        • UI Packages
          • Registration & Delivery Package
          • Referral Reconciliation Package
          • Inventory Management Package
          • Attendance Management Package
          • DIGIT Scanner Package
          • Digit Showcase Package
          • Digit Data Model Package
    • Standards
    • Security
    • Interoperability
  • 🪝SETUP
    • Planning an HCM Implementation
    • Establish Project & Team
    • Gathering Requirements
    • Installation
      • Install Using GitHub Actions in AWS
      • System Data Setup
      • Project Data Setup
      • Setup Mobile App
      • Setup Kibana Dashboard
        • Create or Edit Existing Dashboards
      • Server Cleanup
    • Configuration
      • Configuring HCM to Campaign and Country Needs
      • Service Configuration
        • Individual Registry
        • Household Registry
        • Product Registry
        • Facility Registry
        • Stock & Inventory
        • Project Services
        • Referral Management
        • Attendance
        • Complaints
          • QA Sign-Off
            • Test Cases
        • User Management
          • QA Sign-Off
      • UI Configuration
        • Stock Management
        • Language Selection
        • Login
        • Forgot Password
        • Project Selection
        • Dashboard Configuration
          • Dashboard UI Enhancements
          • HCM Dashboard Master Promotion Guide
        • Attendance Management
          • Attendance Package Extraction and Interaction with HCM Application
    • Quality Assurance Testing
      • Regression Test cases
  • 🔵COMMUNITY
    • Source Code
    • Committee
      • Digital Product Advisory Committee Charter
      • Idea Management Process
      • Sessions
        • November 2023 session
        • August 2024 session
          • Minutes of the Meeting
Powered by GitBook

https://creativecommons.org/licenses/by/4.0/

On this page
  • Overview
  • Download Database Dump File
  • Load the Backup File into the Database
  • Load Data into the Database
  • Verify the Output
  • Redeploy all the services at once to read from new data
  • Create Superuser

Was this helpful?

Export as PDF
  1. SETUP
  2. Installation

System Data Setup

PreviousInstall Using GitHub Actions in AWSNextProject Data Setup

Last updated 9 months ago

Was this helpful?

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
  • 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.

kubectl describe cm -n egov egov-config

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:

  • Replace {DATABASE_POD_NAME} , {DB_HOST}, {DB_USERNAME}, {DB_NAME} in command given below and run it:

kubectl cp seed_data_dump.sql playground/{DATABASE_POD_NAME}:/home/seed_data_dump.sql && kubectl exec -n playground {DATABASE_POD_NAME} -- sh -c "PGPASSWORD=demo123456 psql -h {DATABASE_HOST} -p 5432 -U {DATABASE_USERNAME} -d {DATABASE_NAME} -f /home/seed_data_dump.sql"

Verify the Output

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

Redeploy all the services at once to read from new data

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

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

kubectl get pods -n egov

Create Superuser

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

kubectl get pods -n egov | grep egov-user

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

kubectl port-forward svc/egov-user -n egov 8080:8080
  • Import the below curl in Postman or execute it in another terminal window:

curl --location 'http://localhost:8080/user/users/_createnovalidate' \
--header 'Content-Type: application/json' \
--data-raw '{
    "requestInfo": {
        "apiId": "Rainmaker",
        "ver": ".01",
        "ts": null,
        "action": "_update",
        "did": "1",
        "key": "",
        "msgId": "20170310130900|en_IN",
        "authToken": "51e00caf-3218-4f15-ba70-a45f7d40abc1"
    },
    "user": {
        "userName": "{{username}}",
        "name": "Admin User",
        "gender": null,
        "mobileNumber": "9898989898",
        "type": "EMPLOYEE",
        "active": true,
        "password": "{{password}}",
        "roles": [
            {
                "name": "Super User",
                "code": "SUPERUSER",
                "tenantId": "mz"
            },
             {
                "name": "CAMPAIGN_MANAGER",
                "code": "CAMPAIGN_MANAGER",
                "tenantId": "mz"
            }
        ],
        "emailId": "xyz@gmail.com",
        "tenantId": "mz"
    }
}'
  • Replace the username, password, and tenantId with proper values (keep tenantid as 'mz' if master data is loaded in DB unchanged).

🪝
13MB
seed_data_dump.sql
Sample screenshot of database pod
Sample Screenshot of command output for db_host
Example screenshot with cd command to download folder