Deployment on Kubernetes
Introduction
The guide here provides instructions to deploy OpenG2P on Kubernetes (K8s) cluster.
Prerequisites
K8s cluster is set up as given here.
The following utilities/tools must be present on the user's machine.
kubectl
,istioctl
,helm
,jq
,curl
,wget
,git
,bash
,envsubst
.
Installation
Clone the https://github.com/openg2p/openg2p-deployment repository, and continue the installation of each of the following components from the kubernetes directory.
Choose and install the components needed for your cluster from the following. If you wish to install all the components below, run this from the kubernetes directory (This doesn't include Reporting):
PostgreSQL
Navigate to kubernetes/postgresql directory.
Run:
OpenG2P
Prerequisites:
PostgreSQL [REQUIRED]
Minio [Optional]
ODK [Optional]
Packaged OpenG2P docker. Packaging Instructions. [Optional]
Navigate to kubernetes/openg2p directory.
Run: (This installs the reference package dockers)
If use already have a custom packaged docker image or tag use:
Post installation: Refer to Post Install Configuration
ODK
Prerequisites:
PostgreSQL [REQUIRED]
Navigate to kubernetes/odk-central directory.
Run the following to install ODK helm chart.
Note: The above helm chart uses the following docker images built from https://github.com/getodk/central/tree/v2023.1.0, since ODK Central doesn't provide pre-built docker images for these.
Post-installation:
Exec into the service pod, and create a user (and promote if required).
Minio
Navigate to kubernetes/minio directory.
Run:
Post-installation:
Once OpenG2P is installed, do the following:
Navigate to OpenG2P Documents (From OpenG2P Menu) -> Document Store.
Configure URL and password for this backend service (Like
http://minio.minio:9000
). Password and account-id/username can be obtained from the secrets in minio namespace.
Keycloak
Navigate to kubernetes/keycloak directory.
Run:
Kafka
Navigate to kubernetes/kafka directory.
Run:
Logging and Elasticsearch
Navigate to kubernetes/logging directory.
Run:
Reporting
Prerequisites:
Kafka [REQUIRED]
PostgreSQL [REQUIRED]
OpenG2P [REQUIRED]
Logging [REQUIRED]. (At least Elasticsearch is required)
Navigate to scripts directory inside the above reporting repo.
Run the following to install reporting
Do the following to import the dashboards present in dashboards folder:
Navigate to Kibana Stack Management -> Kibana Section -> Saved Objects.
Import all files in dashboards folder.
Last updated