Project Factory Configuration

Advanced Configurations

Overview

  • The Project Factory service is a part of the HCM (Health Campaign Management) console. Its job is to manage projects (campaigns), facilities, users, boundary data, etc.

  • It depends on other services: Kafka, Postgres, Redis. These are used for messaging, storage, and caching.

  • Configuration is done using Helm charts (used to deploy apps on Kubernetes) via a values.yaml file.

Helm Configuration

The Project Factory service depends on Kafka, Postgres, and Redis. To configure it via Helm, you need to set environment variables in the values.yaml file or Helm templates.

Project factory helm
  1. Enable auto-generation of passwords

  • ➝ System will generate random passwords for new users.

  • Set default password (if auto-generation disabled)

➝ Provides a fallback default password.

  1. User duplication check

  • Avoid creating duplicate users based on mobile number.

➝ Prevents multiple accounts with the same mobile number.

  1. Tab Naming - Readme and Sheets

  • Define tab names for different data sheets.

Defines the sheet name to be used for the ReadMe tab. Tab names for different data sheets:

  • Sets tab names for facilities, boundary data, and user lists in the HCM Console.

  1. Localisation and default locale

  • Set default locale:

Defines the default locale as "en_IN" unless overridden in the Helm values.

  • Localisation module:

Specifies the localisation module used for HCM schemas.

  1. Logging configuration

  • Set the application log level:

Determines the verbosity of logs, defaulting to 'info'.

  • Set maximum debug characters:

Limits the maximum length of debug logs to 500 characters unless overridden.

  1. User mapping

  • Enables mapping of users via a common parent:

Allows users to be linked based on a shared parent hierarchy.

  1. Automatic retry mechanism

  • Retry when specific HTTP errors occur:

Automatically retries operations if the "socket hang up" error occurs.

  1. Localisation wait time in boundary creation

Localisation wait time in boundary creation

  1. Localisation chunk size

Localisation chunk size

  1. Enable/Disable Campaign ID Validation in Template Upload (v0.3.1)

The validateCampaignIdInMetadata flag decides whether the application validates campaignId in metadata during template uploads.

  1. Service host details

  2. Update Default tenantId

Some of the Master data been fetched using this default tenant configuration

Host Name
ConfigMap Name
Key

KAFKA_BROKER_HOST

egov-config

kafka-brokers

EGOV_MDMS_HOST

egov-service-host

egov-mdms-service

EGOV_MDMS_V2_HOST

egov-service-host

mdms-service-v2

EGOV_FILESTORE_SERVICE_HOST

egov-service-host

egov-filestore

EGOV_IDGEN_HOST

egov-service-host

egov-idgen

EGOV_FACILITY_HOST

egov-service-host

facility

EGOV_BOUNDARY_HOST

egov-service-host

boundary-service

EGOV_PROJECT_HOST

egov-service-host

health-project

EGOV_USER_HOST

egov-service-host

egov-user

EGOV_PRODUCT_HOST

egov-service-host

product

EGOV_HRMS_HOST

egov-service-host

health-hrms

EGOV_LOCALIZATION_HOST

egov-service-host

egov-localization

EGOV_HEALTH_INDIVIDUAL_HOST

egov-service-host

health-individual

EGOV_AUDIT_HOST

egov-service-host

audit-service

EGOV_PLAN_SERVICE_HOST

egov-service-host

plan-service

EGOV_CENSUS_HOST

egov-service-host

census-service

  1. Service endpoints

Path Name
Value

FILE_STORE_SERVICE_END_POINT

filestore/v1/files

EGOV_MDMS_V2_SEARCH_ENDPOINT

mdms-v2/v2/_search

EGOV_MDMS_V1_SEARCH_ENDPOINT

mdms-v2/v1/_search

EGOV_IDGEN_PATH

egov-idgen/id/_generate

EGOV_MDMS_SCHEMA_PATH

mdms-v2/schema/v1/_search

EGOV_BOUNDARY_RELATIONSHIP_SEARCHPATH

boundary-service/boundary-relationships/_search

EGOV_BOUNDARY_SERVICE_SEARCHPATH

boundary-service/boundary/_search

EGOV_BOUNDARY_HIERARCHY_SEARCHPATH

boundary-service/boundary-hierarchy-definition/_search

HEALTH_PROJECT_CREATE_PATH

health-project/v1/_create

EGOV_PROJECT_STAFF_CREATE_PATH

health-project/staff/v1/_create

EGOV_PROJECT_RESOURCE_CREATE_PATH

health-project/resource/v1/_create

EGOV_PROJECT_RESOURCE_FACILITY_PATH

health-project/facility/v1/_create

EGOV_USER_SEARCH_PATH

user/_search

EGOV_FACILITY_SEARCH_PATH

facility/v1/_search

EGOV_PRODUCT_VARIANT_SEARCH_PATH

product/variant/v1/_search

EGOV_BOUNDARY_ENTITY_SEARCHPATH

boundary-service/boundary/_search

EGOV_FACILITY_BULK_CREATE

facility/v1/bulk/_create

EGOV_HEALTH_INDIVIDUAL_SEARCH

health-individual/v1/_search

EGOV_PLAN_FACILITY_SEARCH

plan-service/plan/facility/_search

EGOV_PLAN_FACILITY_CONFIG_SEARCH

plan-service/config/_search

EGOV_CENSUS_SEARCH

census-service/_search

EGOV_PLAN_SEARCH

plan-service/plan/_search

  1. Kafka topics

Topic Name
Value

KAFKA_SAVE_CAMPAIGN_DETAILS_TOPIC

save-campaign-details

KAFKA_UPDATE_CAMPAIGN_DETAILS_TOPIC

update-campaign-details

  1. Database configuration information

The configuration snippet provides the details required to set up and connect to a database, including environment-specific handling, credentials, schema information, and other related settings. Below is a structured breakdown:

Database Connection Information -

Parameter Name
Value / Source
Description

DB_URL

health-db-url or db-url from egov-config

URL for connecting to the database. Uses health-db-url in the "health" namespace, else db-url.

DB_HOST

db-host from egov-config

Hostname or IP address of the database server.

DB_PORT

"5432"

Port number for database connection (default PostgreSQL port).

DB_NAME

db-name from egov-config

Name of the database being connected to.

DB_SCHEMA

Namespace value or "public"

Specifies the schema within the database. Defaults to "public" if no namespace is provided.

DB_USER

username from db secret

Database username used for authentication.

DB_PASSWORD

password from db secret

Database password for authentication.

  1. Flyway Migration Information

Parameter Name
Value / Source
Description

FLYWAY_USER

flyway-username from db secret

User for running flyway migrations.

FLYWAY_PASSWORD

flyway-password from db secret

Password for flyway migration user.

FLYWAY_LOCATIONS

flyway-locations from egov-config

Directory or path for flyway migration scripts.

SCHEMA_TABLE

schemaTable from initContainers.dbMigration

Table name for tracking Flyway migrations.

HRMS DevOps Config Changes

Config / Env Var
Value

microplanWebsiteLink

https://unified-uat.digit.org/workbench-ui/employee/user/login (Update URL according to your environment)

microplanImplementationPartner

Console Team

BASE_SECRET Config Change

Config / Env Var
Value / Details

BASE_SECRET

Reference secret → project-factory:basesecret Secret value to create: egov-admin-console-enc

Localisation Service Config Changes

Config
Value

heap

"-Xmx2500m -Xms512m"

memory_limits

3072Mi (~3GB)

replicas

2

Notes:

  • ConfigMap and Secrets Integration: Sensitive data like DB_USER, DB_PASSWORD, and Flyway credentials are securely retrieved from Kubernetes secrets (db secret). Non-sensitive configurations like DB_HOST and DB_NAME are stored in ConfigMaps (egov-config).

  • Namespace-Specific Configuration: The DB_URL and DB_SCHEMA are tailored for specific namespaces. For example, the 'health' namespace uses a dedicated health-db-url key and the namespace value for the schema.

  • Default Settings: Where applicable, defaults are provided. For instance, the schema defaults to "public" and the port defaults to 5432.

These configurations enhance the flexibility and usability of the Project Factory Service, ensuring smoother operations and better alignment with user needs.

Last updated

Was this helpful?