BharatSahAIyak / devops

0 stars 0 forks source link

Scope: docker-bhasai to devops and migrate stateful services to k8s #38

Open singhalkarun opened 3 months ago

singhalkarun commented 3 months ago

Move all the services which are not moved to K8S to use this repository (update volume names as needed), this should be done with minimum downtime. Plan the process and risks.

https://docs.google.com/spreadsheets/d/1Ojpea-LoP0055R9mzikwUuiF9r0ey2URYm7ONj5gxMc/edit?gid=0#gid=0

Srijan-SS02 commented 3 months ago

Process of Migrating services

Downtime

Srijan-SS02 commented 3 months ago

Process of Migrating the services

db

POSTGRES_USER= POSTGRES_PASSWORD=

vault

VAULT_USERNAME= VAULT_PASSWORD=

redis

minio

MINIO_ROOT_USER= MINIO_ROOT_PASSWORD= MINIO_ACCESS_KEY= MINIO_SECRET_KEY=

telemetry

POSTGRES_USER=

POSTGRES_PASSWORD=

CLICKHOUSE_DB= CLICKHOUSE_USER= CLICKHOUSE_PASSWORD=

clickhouse

superset

SUPERSET_DATABASE_PASSWORD= SUPERSET_ENV= SUPERSET_SECRET_KEY= SUPERSET_ADMIN_PASSWORD= SUPERSET_TALISMAN_ENABLED= SUPERSET_EMBEDDING_DOMAIN= SUPERSET_ENABLE_CORS= SUPERSET_ENABLE_TEMPLATE_PROCESSING= SUPERSET_DASHBOARD_FILTERS_EXPOSE= SUPERSET_ENABLE_RBAC_ACCESS=

status(depricated)


- Stop the service on the host machine before migration of volume
      - `docker stop <container_id>`
- Run the script to migrate the volume, keep the name same(as per the project name **-p bhasai**)
     - ` make migrate-volume `
- deploy the service on the new machine after its volume is migrated
      - `make deploy [services=<service_name>]`
- Update the URL from the lb machine ( Karun)
- Update the IP and minio URL in valut wherever required

exmaple:
![image](https://github.com/user-attachments/assets/68a5da1e-1d3b-4665-ba87-5c4e47de231b)

### List of volumes
- bhasai_db
- bhasai_redis
- bhasai_redis_conf
- bhasai_minio
- bhasai_vault
- bhasai_clickhouse 
- fusionauth_es
- fusionauth_db

# Downtime
- Migrating at time of low usage
- Incremental backup