- Postgres v12 or higher
- Temporal SQL Tool
- Helm v3
- Kubernetes Cluster
- kubectl
-
Create
temporalandtemporal_visibilitydatabases in Postgres. -
Clone the Temporal repository here
-
Run
make temporal-sql-toolin the cloned repository's directory to build the Temporal SQL Tool. -
Export the following Environment Variables using the commands:
export SQL_PLUGIN=postgres export SQL_HOST=postgresql_host export SQL_PORT=5432 export SQL_USER=postgresql_user export SQL_PASSWORD=postgresql_password
-
Run the following command to create the schema in the database:
./temporal-sql-tool create-database -database temporal
SQL_DATABASE=temporal ./temporal-sql-tool setup-schema -v 0.0
SQL_DATABASE=temporal ./temporal-sql-tool update -schema-dir schema/postgresql/v96/temporal/versioned
-
Run the following command to create the visibility schema in the database:
./temporal-sql-tool create-database -database temporal_visibility
SQL_DATABASE=temporal_visibility ./temporal-sql-tool setup-schema -v 0.0
SQL_DATABASE=temporal_visibility ./temporal-sql-tool update -schema-dir schema/postgresql/v96/visibility/versioned
-
Switch to the
helm-chartsdirectory:cd helm-charts -
Update Helm dependencies:
helm dependency update
-
Update the
values.postgresql.yamlfile with database connection details, credentials and other metadata:vim values/values.postgresql.yaml
Update the following values for the temporal database:
host: xxx.xxx.xxx.xxx port: 5432 database: temporal user: xxxxx password: xxxxxxx
Update the following values for the temporal_visibility database:
host: xxx.xxx.xxx.xxx port: 5432 database: temporal user: xxxxx password: xxxxxxx
-
Deploy Temporal Cluster:
helm upgrade --install -f values/values.postgresql.yaml --set server.replicaCount=1 --set cassandra.enabled=false --set prometheus.enabled=false --set grafana.enabled=false --set elasticsearch.enabled=false temporal . --timeout 15m -
Check the status of the pods:
kubectl get pods
NAME READY STATUS RESTARTS AGE temporal-admintools-5c8f8f9f5f-4q9q8 1/1 Running 0 2m temporal-frontend-5f8f9f5f-4q9q8 1/1 Running 0 2m temporal-history-5f8f9f5f-4q9q8 1/1 Running 0 2m temporal-matching-5f8f9f5f-4q9q8 1/1 Running 0 2m temporal-server-5f8f9f5f-4q9q8 1/1 Running 0 2m temporal-web-5f8f9f5f-4q9q8 1/1 Running 0 2m temporal-worker-5f8f9f5f-4q9q8 1/1 Running 0 2m
Congratulations! You have successfully deployed Temporal Cluster.
The KloudOne Team