> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/platform/accelerators/concepts/deployment-key-concepts/deployment-architecture.md).

# Deployment Architecture

On this page:

* [Sample Kubernetes architecture](#sample-kubernetes-architecture)
* [DIGIT deployment architecture](#digit-deployment-architecture)
* [CI/CD flow](#ci-cd-flow)
* [Deployment scripts](#deployment-scripts)

## Overview

This section contains architectural details about DIGIT deployment. It discusses the various activities in a sequence of steps to provision required infra and deploy DIGIT.

## Sample Kubernetes Architecture

<div align="left"><figure><img src="/files/o450fBOpf3NYuhJUo9pQ" alt=""><figcaption></figcaption></figure></div>

## DIGIT Deployment Architecture

<figure><img src="/files/2bYsnagNxxK4IVTCDiJD" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/sk4TG3sqVVlIiMMM7rAY" alt=""><figcaption></figcaption></figure>

## CI/CD Flow

* Every code commit is well-reviewed and squash merge to branches through Pull Requests.
* Trigger the CI Pipeline that ensures code quality, vulnerability assessments, and CI tests before building the artefacts.
* Artefact is version controlled based on Semantic versioning based on the nature of the change.
* After successful CI, Jenkins bakes the Docker Images with the versioned artefacts and pushes the baked Docker image to Docker Registry.
* Deployment Pipeline pulls the built Image and pushes it to the corresponding environment.

## Deployment Scripts

* As all the DIGIT services are containerized and deployed on Kubernetes, we need to prepare deployment manifests. The same can be found [here](https://github.com/egovernments/Train-InfraOps).
* DIGIT has built helm charts using the standard helm approach to ease managing the service-specific configs, customisations, switch/toggle, secrets, etc.
* Golang base Deployment script that reads the values from the helm charts template and deploys into the cluster.
* Each env will have one master yaml template that will have the definition of all the services to be deployed, and their dependencies like Config, Env, Secrets, DB Credentials, Persistent Volumes, Manifest, Routing Rules, etc.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digit.org/platform/accelerators/concepts/deployment-key-concepts/deployment-architecture.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
