Setup Project Data

Overview

This step involves the execution of the Postman collection for the minimum setup data required to run a campaign from the field worker app.

Steps

1

Restart Spring Cloud Gateway

  • Execute the below command to restart the Spring Cloud Gateway.

  • Check if all the services are up and running by using the following command:

kubectl get pods -n egov
  • If all the services are running with Ready 1/1, restart the Spring Cloud Gateway service using the command given below:

    kubectl delete pods {gateway-pod-name} -n egov
2

Load project data

All file examples in this document refer to the default branches in the health campaign DevOps and configuration repositories for example purposes. Once you have forked or cloned these repositories, refer to the forked or cloned repositories.

Create an environment variable file and add the following variables in Postman:

  • Click on New > Environment and add the following variables:

  • URL - domain_name provided in infra-as-code/terraform/sample-aws/input.yaml

    • Example: https://{domain_name}

  • tenantId - mz

  • apiUserName and apiPassword - newly created superuser credentials

  • startDate and endDate in epoch format - epoch converter

  • boundaryCode - use the default value (VFTw0jbRf1y) if Master data is unchanged

  • Import the seed data script

3

Seed data in the Postman script

  • This collection includes all the scripts to create users, projects, staff, and product variants.

  • Import the HCM setup script in Postman - import guide

  • Choose the new environment created in the environment tab.

  • Click on the imported HCM setup collection, and click run.

4

Load localisation

Localisation is required to load and show data in different available languages. You can add localisation for English, French, and Portuguese languages by following the instructions given below. If only one specific language is required, download that language-specific collection and run it.

  • Prepare to set up

    • Create a port forward to the localisation pod by executing the following command:

    kubectl port-forward svc/egov-localization -n egov 8080:8080
    • Replace the URL variable in the Postman Environment with http://localhost:8080

    All Languages (English, French, Portuguese)

    • Define locale code for localeEnglish, localeFrench, and localePortuguese in the environment file.

      • localeEnglish - en_MZ

      • localeFrench - fr_MZ

      • localePortuguese - pt_MZ

  • Download the file below for all localisations - English, French, and Portuguese. Data has to be loaded at once:

  • Import the downloaded file into Postman, select all language localisation collections, and click on run. See the screenshot below for reference:

Instructions for the installation of HCM in English

  • To add localisations specific to the English language only, download the file given below:

Import the downloaded file into Postman, select the English collection, and click on run. See the screenshot below for reference:

Last updated

Was this helpful?