Aller au contenu principal

Install

Hardware Requirements

vCPU >= 1 Memory >= 128 MB

Software Requirements

  • Kubernetes 1.20+
  • Helm 3.0+
  • Python 3.8+
  • PostgreSQL 12+
  • Temporal 1.10+
  • Nats JetStream 2.8+
  • Minio 2023+

Variables

In the following description, kosmos may be replaced by any namespace name which fits your purpose. You may tweak the configuration files in the kflow folder to match your needs. And in fact you should tweak them in a production environment, for instance to seal secrets and ensure that the database used by Temporal satisfies your RPO and RTO requirements.

Install postgresql if not already on your platform

helm repo add cnpg https://cloudnative-pg.github.io/charts
kubectl create namespace kosmos
helm upgrade --install cnpg -n kosmos cnpg/cloudnative-pg
kubectl apply -f test/postgresql.yaml -n kosmos

Install temporal server

helm repo add elastic https://helm.elastic.co
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
helm repo add incubator https://charts.helm.sh/incubator
cd helm_charts/temporal
helm dependency build
helm upgrade --install -n kosmos -f ../../test/temporal.yaml temporal .

Create a default namespace (from temporal admin pods)

kubectl exec -n kosmos `kubectl get -n kosmos pod -l  app.kubernetes.io/component=admintools,app.kubernetes.io/instance=temporal -o name` -- tctl namespace register default

Install Nats JetStream

helm repo add nats https://nats-io.github.io/k8s/helm/charts/
helm repo update
helm upgrade --install -f test/natsjs.yaml natsjs nats/nats

Nota : éditer le fichier natsjs.yaml pour mettre en route le monitoring :

  monitor:
enabled: true
port: 8222
tls:
# config.nats.tls must be enabled also
# when enabled, monitoring port will use HTTPS with the options from config.nats.tls
enabled: false

Installer nats-top pour monitorer nats

go install github.com/nats-io/nats-top@latest

Install minio

helm install -n kosmos -f test/minio.yaml minio oci://registry-1.docker.io/bitnamicharts/minio

Configure KFlow

KFlow is configured with object config in file kflow.yaml. Here is the sample configuration used with provided test files. IP addresses should be replaced with the ones of your platform.

image:
repository: kflow
pullPolicy: Never

service:
type: NodePort
nodePort: 30707

securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000

config:
worflowEngine:
addr: temporal-frontend.kosmos:7233
# for event streaming exchange
event:
addr: natsjs.default.svc.cluster.local:4222
# for blob exchange
store:
addr: minio.kosmos.svc.cluster.local:9000
user: minioadmin
password: minioadmin

Install kflow

The image loading should be changed according to your environment.

minikube image load images/kflow.tar
cd helm_charts/kflow
helm install -n kosmos -f ../../test/kflow.yaml kflow .

Verify the installation

Use minikube dashboard to launch the dashboard and check that all pods are running in kosmos namespace.

minikube dashboard

Launch temporal dashboard and then navigate to http://localhost:8080

kubectl port-forward -n kosmos svc/temporal-web 8080:8080

Launch minio dashboard and then navigate to http://localhost:9000. Login minioadmin, Password minioadmin

kubectl port-forward -n kosmos svc/minio 9001:9001