Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Manage Deployment

DIGIT uses Helm as its primary packaging and deployment tool, with all environment configuration stored declaratively in the DIGIT-DevOps Git repository. This GitOps approach means every deployment is version-controlled, reproducible, and auditable. Services are deployed via either Jenkins automation pipelines or direct Helm/Helmfile commands.

Deployment Approach

LAYER
TOOL / APPROACH

Packaging

Helm charts. Every DIGIT service is packaged as a Helm chart. Charts consist of templates (YAML manifests) and a values.yaml file containing configurable defaults.

Environment config

Environment-specific values are stored in deploy-as-code/helm/environments/<env>.yaml inside DIGIT-DevOps. Secrets are encrypted with SOPS before committing.

Orchestration

Helmfile. Manages multiple Helm releases declaratively. Supports diff, apply, sync, and destroy commands. Uses helm-diff and helm-secrets plugins.

CI/CD

Jenkins (self-hosted) or managed DevOps (AWS CodeDeploy, Azure DevOps, NIC DevOps). Jenkins pipelines trigger deployments from the DIGIT-DevOps repo.

Source of truth

Git (DIGIT-DevOps repository). No live environment changes without a corresponding Git commit. Drift is prevented by re-applying the Git state.

Helmfile Deployment Workflow

Clone the DIGIT-DevOps repository and switch to the LTS branch before running any deploy commands:

git clone https://github.com/egovernments/DIGIT-DevOps.git
cd DIGIT-DevOps
git checkout DIGIT-2.9LTS(Helmfile)
cd deploy-as-code/charts/monitoring

Install the required Helm plugins before the first deployment:

# Package manager for Kubernetes
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

# Declarative Helm release manager
wget https://github.com/helmfile/helmfile/releases/latest/download/helmfile_linux_amd64 \
  -O /usr/local/bin/helmfile && chmod +x /usr/local/bin/helmfile

# Shows diff between current and proposed state
helm plugin install https://github.com/databus23/helm-diff

# Decrypts SOPS-encrypted secrets automatically during deploy
helm plugin install https://github.com/jkroepke/helm-secrets

# Verify plugins
helm plugin list

Standard deployment sequence for any environment:

STEP
COMMAND
PURPOSE

1. Preview

helmfile -e <env> -f helmfile.yaml template

Renders Kubernetes manifests without applying. Review before committing.

2. Diff

helmfile -e <env> -f helmfile.yaml diff

Shows exactly what will change in the cluster vs current state.

3. Apply

helmfile -e <env> -f helmfile.yaml apply

Applies changes. Prompts for confirmation when using --interactive flag.

4. Sync

helmfile -e <env> -f helmfile.yaml sync

Forces full sync. Use when diff reports drift between Git state and cluster.

5. Destroy

helmfile --interactive destroy

Removes all releases defined in the helmfile. Requests confirmation before deleting.

Jenkins CI/CD Pipeline

Jenkins provides a GUI-driven deployment pipeline as an alternative to direct Helmfile commands. It is suited for teams that require approval gates, audit logs, and role-based deployment access.

COMPONENT
DETAIL

Jenkins Master VM

4 vCore, 8 GB RAM. Manages job scheduling, user authentication, and build history.

Jenkins Slave VM

4 vCore, 8 GB RAM. Executes deployment jobs. Communicates with the Kubernetes cluster via kubeconfig.

Deployment jobs

Environment-specific jobs (e.g. deploy-to-dev, deploy-to-uat, deploy-to-prod) defined in seed-deployment-jobs in jenkins/values.yaml.

Build trigger

Paste a Docker image ID into the build job and click Build. Jenkins runs the Helm deployer against the target environment.

Service deployment

go run main.go deploy -e <env> -c '<service-list>' — Golang deployer script used to deploy one or more named services to a specific environment.

To deploy specific services using the Go deployer (alternative to full Helmfile sync):

Rollback & Version Management

Helm maintains a revision history for every release. If a deployment introduces a regression, roll back to the previous stable revision without redeploying from scratch.

ROLLBACK NOTE: Helmfile's improved rollback capability is one of the primary reasons DIGIT recommends Helmfile over standalone Helm for production deployments. Always run helmfile diff before applying to confirm the scope of changes.

Pre & Post Deployment Checklist

WHEN
CHECK

Pre-deploy

Confirm environment config (env.yaml) is committed and SOPS secrets are encrypted

Pre-deploy

Run helmfile diff and review all changes — no surprises in apply

Pre-deploy

Verify all pods in the target namespace are Running or Completed (no pending/crash-loop pods)

Pre-deploy

Confirm database backup has been taken before any schema-changing deployment

Pre-deploy

Notify stakeholders of planned maintenance window for Prod deployments

Post-deploy

Verify citizen portal is available at <hostname>/digit-ui/citizen

Post-deploy

Verify employee portal is available at <hostname>/digit-ui/employee

Post-deploy

Check pod status: kubectl get pods -n egov — all should be Running

Post-deploy

Run a smoke test API call against the API gateway to confirm routing

Post-deploy

Check Grafana dashboards for any spike in error rates or latency following deployment

Post-deploy

Confirm Alertmanager has not fired any critical alerts within 10 minutes of deployment

GitOps & Environment Configuration

All environment configuration lives in DIGIT-DevOps as code. Configuration changes follow the same Git workflow as application changes: branch, commit, review, merge, deploy.

CONFIG FILE
PURPOSE

environments/<env>.yaml

Environment-specific service values: db-host, ingress domain, service toggles, replica counts, resource limits.

environments/<env>-secrets.yaml

Encrypted secrets: DB passwords, Alertmanager credentials, Git private key, payment gateway keys. Encrypted with SOPS before commit.

charts/monitoring/monitoring-helmfile.yaml

Declares all monitoring stack releases (Prometheus, Grafana, Loki, Alertmanager) and their value overrides.

charts/backbone-services/

Kafka, ZooKeeper, PostgreSQL, ElasticSearch, Redis Helm charts and their values.

To update Loki to use S3 storage on AWS, modify the environment YAML and reapply:

Last updated

Was this helpful?