The workers on demand chart
This chart deploys a configuration for DBOS master, this configuration contains the list of on demand workers and their tasks and some execution contexts. Execution contexts are essentially Kubernetes job templates, they allow to choose the resource limits for each task independently or any custom Kubernetes job configuration you need.
Read the 'on demand' workers section for more details. Here is an example of a 'values.yml' file you could use in the command below :
global:
image:
imageRegistry: product-dbos-prod-docker-group.decisionbrain.cloud/dbos
imagePullSecrets:
- product-dbos-prod-docker-group.decisionbrain.cloud
labels:
project: dbos
businessUnit: my-business-unit
global:
image:
tag: "{{ .Chart.AppVersion }}"
image:
imageRegistry: product-dbos-cplex-dev-docker-group.decisionbrain.cloud/dbos
imagePullSecrets:
- product-dbos-cplex-prod-docker-group.decisionbrain.cloud-secret
- product-dbos-cplex-dev-docker-group.decisionbrain.cloud-secret
registration:
failures:
backoffLimit: 10
activeDeadlineSeconds: 1800
hosts:
masterUrl: http://dbos-master:8080
rabbitmqHost: rabbitmq
defaultEnv:
OPTIMSERVER_URL:
value: "http://dbos-master.{{ .Release.Namespace }}.svc.cluster.local:8080/"
SPRING_RABBITMQ_HOST:
value: "rabbitmq.{{ .Release.Namespace }}.svc.cluster.local"
workers:
cplexcpo:
image: "product-dbos-cplex-dev-docker-group.decisionbrain.cloud/dbos/dbos-cplex-cpo-worker:{{ tpl .Values.global.image.tag $ }}"
defaultExecutionContext: small
tasks:
- id: "CplexTask"
executionContexts:
- cplexcpoopl
defaultExecutionContext: cplexcpoopl
- id: "CpoTask"
executionContexts:
- cplexcpoopl
defaultExecutionContext: cplexcpoopl
opl:
image: "product-dbos-cplex-dev-docker-group.decisionbrain.cloud/dbos/dbos-opl-worker:{{ tpl .Values.global.image.tag $ }}"
defaultExecutionContext: small
tasks:
- id: "OplTask"
executionContexts:
- cplexcpoopl
defaultExecutionContext: cplexcpoopl
executionContexts:
templates:
cplexcpoopl:
enabled: true
config:
name: cplex-cpo-opl
namespace: "cplex-wods"
imagePullPolicy: Always
activeDeadlineSeconds: 3600
restartPolicy:
node:
tolerations:
- effect: NoExecute
key: k8s.scaleway.com/dedicated
operator: Equal
value: jobs
resources:
limits:
cpu: 4000m
memory: 8500Mi
requests:
cpu: 4000m
memory: 8500Mi
env:
JAVA_TOOL_OPTIONS:
value: -XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -XX:GCTimeRatio=4
-XX:AdaptiveSizePolicyWeight=90 -Xmx1g
SPRING_RABBITMQ_USERNAME:
valueFrom:
secretKeyRef:
key: rabbitmq-root-username
name: "rabbitmq-{{ $.Release.Namespace }}"
SPRING_RABBITMQ_PASSWORD:
valueFrom:
secretKeyRef:
key: rabbitmq-root-password
name: "rabbitmq-{{ $.Release.Namespace }}"
OPTIMSERVER_JWT_JWTKEY:
valueFrom:
secretKeyRef:
key: master-secret-jwtkey
name: "dbos-master-{{ $.Release.Namespace }}"
This creates a ConfigMap with the name
'wod-register-request-(namespace)'
with the worker :
product-dbos-cplex-prod-docker-group.decisionbrain.cloud/dbos/dbos-cplex-cpo-worker:4.4.0
and the execution contexts:
small
medium
Then the chart forces the DBOS master to load the ConfigMap. The chart assumes the DBOS master host is 'dbos-master' and listens at port 8080. If you want to change these default values, you can override them with the values.yaml file:
global:
...
urlRefresh: http://<my-other-host>:<my-other-port>
master:
config:
name: <my-other-host>Deployment
First installation
Use the command:
helm install dbos-workers-on-demand ./dbos-workers-on-demand -f values.yamlOr
helm install dbos-workers-on-demand decisionbrain/dbos-workers-on-demand --version 4.4.0 -f values.yamlIf you added the DecisionBrain Helm registry
Update
Use the command:
helm upgrade dbos-workers-on-demand ./dbos-workers-on-demand -f values.yamlOr
helm upgrade dbos-workers-on-demand decisionbrain/dbos-workers-on-demand --version 4.4.0 -f values.yamlIf you added the DecisionBrain Helm registry