The below scripts will help the adopters to deploy SunbirdRC services in kubernetes environment.
- Kubernetes Cluster with minimum 3 nodes
- Helm
- kubectl
- Ingress
- Postgres DB (create database for
keycloak
andregistry
) - ElasticSearch (Optional)
- Kafka (Optional)
- Redis (Optional)
- Minio (Optional)
- Domain URL (domain url mapped to kubernetes cluster)
The above optional services are not mandatory for SunbirdRC services. It can be installed based on the requirement on the project. For more details https://docs.sunbirdrc.dev/learn/readme-1/high-level-architecture
git clone https://github.com/Sunbird-RC/sunbird-rc-core.git
cd infra
Make sure from the current directory you're able to run the below commands
kubectl cluster-info
kubectl get nodes
kubectl get ns
helm version
kubectl create ns demo-registry
Feel free to use a different name for the namespace. Use the same name in the reset of the commands.
Convert all the passwords/secrets into base64 format and update these values in values.yaml
file
Secrets
- DB_PASSWORD: Postgres database password
DB_PASSWORD is mandotry secret to be set. Other secrets can be set to empty
Configuration values like database address, elastic search address etc should be modified in values.yaml file.
All schema files should be placed in the schemas directory located at sunbird-rc-core/infra/helm_charts/charts/registry/schemas
.
helm upgrade --install --namespace=demo-registry demo-registry helm_charts --create-namespace
Output
Release "demo-registry" does not exist. Installing it now.
NAME: demo-registry
LAST DEPLOYED: Thu May 4 17:02:08 2023
NAMESPACE: demo-registry
STATUS: deployed
REVISION: 1
Check if all the pods are running
kubectl get pods -n demo-registry
- Check the pods status
kubectl get pods -n demo-registry
Open the below url in browser and check if you're able to get the swagger json
<host>/registry/api/docs/swagger.json