On Premise

CRS deployment steps on Rancher - State Data Center

Overview

This page walks you through the end-to-end setup and deployment of the DIGIT Citizen Complaint Resolution System (CCRS / PGR) on a Rancher-managed Kubernetes cluster using Helmfile-based deploy-as-code.

Pre-requisites

1. Provision a Rancher Cluster

Ensure a Rancher-managed Kubernetes cluster is provisioned and running. This cluster will serve as the infrastructure for deploying DIGIT CCRS services

2. Provision a PostgreSQL Server

A PostgreSQL server is required to retain data related to logins and other application-specific information shared across services.

📘 Reference Guide: Postgres Server Provisioning Guide

3. Setup PostgreSQL Replication (HA) (For production set up)

For high availability and fault tolerance, configure PostgreSQL replication.

📘 Reference Guide: PostgreSQL HA Setup Guide (Digit Core)

4. Provision an NFS Server

An NFS server is required to enable persistent volume support for services that require data persistence. 📘 Reference Guide: NFS Server Deployment on Rancher

5. Export Rancher Cluster’s Kubeconfig

To interact with the cluster, copy and configure the kubeconfig file from the Rancher management cluster. This enables CLI-based access via kubectl.

6. Install Required CLI Tools

Make sure the following command-line tools are installed on your system:

  • kubectl — Kubernetes command-line tool for interacting with the cluster.

  • Helmfile & Helm

  • sops + age (recommended), and

  • optionally jq/yq

7. Domain and Public IP Setup

  1. Ensure the domain is mapped to a public IP.

  2. Set up managed TLS certificates for secure communication (recommended for production servers).

  3. DNS: CCRS domain → LoadBalancer external IP.

  4. Network/Firewall: allow HTTPS to the LoadBalancer IP; allow egress to DB/Kafka/ES/SMTP/SMS/etc.

  5. Environment files: env.yaml (non-secrets) and env-secrets.yaml (secrets, preferably encrypted with sops/age).

Once all these prerequisites are satisfied, proceed with the deployment of the CCRS app. If any of the above are missing, fix them before proceeding. Everything below assumes these pieces are ready.


Steps

1

Clone the CRS repo

2

Prepare Environment Files (Helmfile values)

Create two files under the CCRS deploy-as-code charts’ environments folder. Paths below are typical; if your repo layout differs, mirror the structure accordingly.

env.yaml (non-secrets)

Create (or copy) devops/deploy-as-code/charts/environments/pgr-sdc-prd.yaml:

Adjust Kafka, Elasticsearch or remove them if unused in your deployment.

env-secrets.yaml (secrets)

Create devops/deploy-as-code/charts/environments/pgr-sdc-prd-secrets.yaml:

# devops/deploy-as-code/charts/environments/pgr-sdc-prd-secrets.yaml

Strongly recommended: encrypt this file with sops:

Keep the ~/.age/key.txt safe and share the public age key with other operators who need to decrypt.

3

Wire the environment into Helmfile

Most CCRS setups have a top-level Helmfile (e.g., devops/deploy-as-code/digit-helmfile.yaml) that references:

  • the environments directory for values files, and

  • the DIGIT/CCRS charts you want to deploy.

If your Helmfile uses an -e <env> switch:

  • The env name corresponds to the key used in digit-helmfile.yaml and other sub-helmfiles.

4

Deploy with Helmfile (no Go deployer)

5

Post-Deploy Validation (first-boot)

At the end of the installation, you should have a fully functional CCRS/PGR application up and running with default data & English labels. The default workflows, master data, users and labels can then be customised once you’ve verified the setup.

Pods up & healthy

Ingress & TLS

Gateway routing refresh On first bring-up, if the gateway started before all services registered, refresh it once:

Default data/seeding

Default seed data will be loaded via the data-handler service. This service can be scaled down once the deployment has been verified.

Smoke tests

UI reachability (citizen/employee)

# Open in your browser:

https://pgr.<state>.gov.in/digit-ui/citizen #CITIZEN PORTAL https://pgr.<state>.gov.in/digit-ui/employee #EMPLOYEE PORTAL

Follow the Get Started document to log in with users and experience CCRS.


SDC - Quick Checklist

  • DNS ↔ LoadBalancer: A record points to the exact loadbalancer/public IP assigned to ingress.

  • Certificates: cert-manager Issuer/ClusterIssuer exists; Certificate Ready for PGR host.

  • NFS: PVCs are bound; no CreateContainerConfigError due to missing volumes.

  • DB connectivity: db-url, db.username, db.password correct; Flyway can run; API services not crash-looping.

  • Kafka/ES (if enabled): bootstrap/hosts reachable.

  • Gateway routes: after all services become Ready, restart the gateway once.


Lifecycle / Uninstall (when iterating)

cd devops/deploy-as-code

helmfile -f digit-helmfile.yaml -e pgr-sdc-prd destroy

Manually delete leftover PVCs/secrets/certs only if you want a clean slate.

Last updated

Was this helpful?