From 0e9e9d8b5101ab291d61f63a29cedc76cf7075af Mon Sep 17 00:00:00 2001 From: Jianyu Feng Date: Sat, 1 Aug 2020 01:05:36 -0400 Subject: [PATCH 1/2] enable archival in the chart --- cadence/Chart.yaml | 2 +- cadence/README.md | 119 ++++++++++++------------ cadence/templates/server-configmap.yaml | 36 ++++++- cadence/values.yaml | 5 + 4 files changed, 102 insertions(+), 60 deletions(-) diff --git a/cadence/Chart.yaml b/cadence/Chart.yaml index 07a04eb4..ea76742a 100644 --- a/cadence/Chart.yaml +++ b/cadence/Chart.yaml @@ -1,5 +1,5 @@ name: cadence -version: 0.10.0 +version: 0.10.1 appVersion: 0.13.0 description: Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way. icon: https://raw.githubusercontent.com/uber/cadence-web/master/client/assets/logo.svg diff --git a/cadence/README.md b/cadence/README.md index ff3bd8c5..303887b0 100644 --- a/cadence/README.md +++ b/cadence/README.md @@ -226,64 +226,67 @@ docker run --rm ubercadence/cli:master --address host.docker.internal:7933 --dom The following table lists the configurable parameters of the chart and their default values. Global options overridable per service are marked with an asterisk. -| Parameter | Description | Default | -|---------------------------------------------------|-------------------------------------------------------|-----------------------| -| `nameOverride` | Override name of the application | `` | -| `fullnameOverride` | Override full name of the application | `` | -| `server.image.repository` | Server image repository | `ubercadence/server` | -| `server.image.tag` | Server image tag | `0.7.1` | -| `server.image.pullPolicy` | Server image pull policy | `IfNotPresent` | -| `server.replicaCount`* | Server replica count | `1` | -| `server.metrics.annotations.enabled`* | Annotate pods with Prometheus annotations | `false` | -| `server.metrics.serviceMonitor.enabled`* | Enable Prometheus ServiceMonitor | `false` | -| `server.metrics.prometheus.timerType`* | Prometheus timer type | `histogram` | -| `server.metrics.statsd.hostPort`* | Statsd daemon host and port | `` | -| `server.podAnnotations`* | Server pod annotations | `{}` | -| `server.resources`* | Server CPU/Memory resource requests/limits | `{}` | -| `server.nodeSelector`* | Node labels for pod assignment | `{}` | -| `server.tolerations`* | Toleration labels for pod assignment | `[]` | -| `server.affinity`* | Affinity settings for pod assignment | `{}` | -| `server.config.logLevel` | Server log level | `debug,info` | -| `server.config.numHistoryShards` | Number of history shards | `1000` | -| `server.config.persistence.[store].driver` | Connection driver | `cassandra` | -| `server.config.persistence.[store].cassandra` | Cassandra connection details (see `values.yaml`) | `{}` | -| `server.config.persistence.[store].sql` | SQL connection details (see `values.yaml`) | `{}` | -| `server.[service].service.type` | `[service]` service type | `ClusterIP` | -| `server.[service].service.port` | `[service]` service port | `7933/7934/7935/7939` | -| `server.[service].metrics.annotations.enabled` | Annotate `[service]` pods with Prometheus annotations | `` | -| `server.[service].metrics.serviceMonitor.enabled` | Enable Prometheus ServiceMonitor for `[service]` | `` | -| `server.[service].metrics.prometheus.timerType` | `[service]` Prometheus timer type | `` | -| `server.[service].metrics.statsd.hostPort` | `[service]` Statsd daemon host and port | `` | -| `server.[service].podAnnotations` | `[service]` pod annotations | `{}` | -| `server.[service].resources` | `[service]` CPU/Memory resource requests/limits | `{}` | -| `server.[service].nodeSelector` | `[service]` Node labels for pod assignment | `{}` | -| `server.[service].tolerations` | `[service]` Toleration labels for pod assignment | `[]` | -| `server.[service].affinity` | `[service]` Affinity settings for pod assignment | `{}` | -| `server.frontend.service.nodePort` | frontend service nodePort, if service type is NodePort| `` | -| `web.enabled` | Enable WebUI service | `true` | -| `web.replicaCount` | Number of WebUI service Replicas | `1` | -| `web.image.repository` | WebUI image repository | `ubercadence/web` | -| `web.image.tag` | WebUI image tag | `3.3.2` | -| `web.image.pullPolicy` | WebUI image pull policy | `IfNotPresent` | -| `web.service.annotations` | WebUI service annotations | `{}` | -| `web.service.type` | WebUI service type | `ClusterIP` | -| `web.service.port` | WebUI service port | `80` | -| `web.service.nodePort` | WebUI service nodePort, if service type is NodePort | `` | -| `web.ingress.enabled` | Enable WebUI Ingress | `false` | -| `web.ingress.annotations` | WebUI Ingress annotations | `{}` | -| `web.ingress.hosts` | WebUI Ingress hosts | `/` | -| `web.ingress.tls` | WebUI Ingress tls config | `[]` | -| `web.resources` | WebUI CPU/Memory resource requests/limits | `{}` | -| `web.nodeSelector` | Node labels for pod assignment | `{}` | -| `web.tolerations` | Toleration labels for pod assignment | `[]` | -| `web.affinity` | Affinity settings for pod assignment | `{}` | -| `schema.setup.enabled` | Create database or keyspace | `true` | -| `schema.setup.backoffLimit` | Create database job back off limit | `100` | -| `schema.update.enabled` | Update schema | `true` | -| `schema.update.backoffLimit` | Update schema job back off limit | `100` | -| `cassandra.enabled` | Install Cassandra cluster | `true` | -| `cassandra.config.cluster_size` | Cassandra cluster node number | `1` | -| `mysql.enabled` | Install MySQL | `false` | +| Parameter | Description | Default | +|---------------------------------------------------|-------------------------------------------------------|---------------------------------------------------| +| `nameOverride` | Override name of the application | `` | +| `fullnameOverride` | Override full name of the application | `` | +| `server.image.repository` | Server image repository | `ubercadence/server` | +| `server.image.tag` | Server image tag | `0.7.1` | +| `server.image.pullPolicy` | Server image pull policy | `IfNotPresent` | +| `server.replicaCount`* | Server replica count | `1` | +| `server.metrics.annotations.enabled`* | Annotate pods with Prometheus annotations | `false` | +| `server.metrics.serviceMonitor.enabled`* | Enable Prometheus ServiceMonitor | `false` | +| `server.metrics.prometheus.timerType`* | Prometheus timer type | `histogram` | +| `server.metrics.statsd.hostPort`* | Statsd daemon host and port | `` | +| `server.podAnnotations`* | Server pod annotations | `{}` | +| `server.resources`* | Server CPU/Memory resource requests/limits | `{}` | +| `server.nodeSelector`* | Node labels for pod assignment | `{}` | +| `server.tolerations`* | Toleration labels for pod assignment | `[]` | +| `server.affinity`* | Affinity settings for pod assignment | `{}` | +| `server.config.logLevel` | Server log level | `debug,info` | +| `server.config.numHistoryShards` | Number of history shards | `1000` | +| `server.config.persistence.[store].driver` | Connection driver | `cassandra` | +| `server.config.persistence.[store].cassandra` | Cassandra connection details (see `values.yaml`) | `{}` | +| `server.config.persistence.[store].sql` | SQL connection details (see `values.yaml`) | `{}` | +| `server.[service].service.type` | `[service]` service type | `ClusterIP` | +| `server.[service].service.port` | `[service]` service port | `7933/7934/7935/7939` | +| `server.[service].metrics.annotations.enabled` | Annotate `[service]` pods with Prometheus annotations | `` | +| `server.[service].metrics.serviceMonitor.enabled` | Enable Prometheus ServiceMonitor for `[service]` | `` | +| `server.[service].metrics.prometheus.timerType` | `[service]` Prometheus timer type | `` | +| `server.[service].metrics.statsd.hostPort` | `[service]` Statsd daemon host and port | `` | +| `server.[service].podAnnotations` | `[service]` pod annotations | `{}` | +| `server.[service].resources` | `[service]` CPU/Memory resource requests/limits | `{}` | +| `server.[service].nodeSelector` | `[service]` Node labels for pod assignment | `{}` | +| `server.[service].tolerations` | `[service]` Toleration labels for pod assignment | `[]` | +| `server.[service].affinity` | `[service]` Affinity settings for pod assignment | `{}` | +| `server.frontend.service.nodePort` | frontend service nodePort, if service type is NodePort| `` | +| `web.enabled` | Enable WebUI service | `true` | +| `web.replicaCount` | Number of WebUI service Replicas | `1` | +| `web.image.repository` | WebUI image repository | `ubercadence/web` | +| `web.image.tag` | WebUI image tag | `3.3.2` | +| `web.image.pullPolicy` | WebUI image pull policy | `IfNotPresent` | +| `web.service.annotations` | WebUI service annotations | `{}` | +| `web.service.type` | WebUI service type | `ClusterIP` | +| `web.service.port` | WebUI service port | `80` | +| `web.service.nodePort` | WebUI service nodePort, if service type is NodePort | `` | +| `web.ingress.enabled` | Enable WebUI Ingress | `false` | +| `web.ingress.annotations` | WebUI Ingress annotations | `{}` | +| `web.ingress.hosts` | WebUI Ingress hosts | `/` | +| `web.ingress.tls` | WebUI Ingress tls config | `[]` | +| `web.resources` | WebUI CPU/Memory resource requests/limits | `{}` | +| `web.nodeSelector` | Node labels for pod assignment | `{}` | +| `web.tolerations` | Toleration labels for pod assignment | `[]` | +| `web.affinity` | Affinity settings for pod assignment | `{}` | +| `schema.setup.enabled` | Create database or keyspace | `true` | +| `schema.setup.backoffLimit` | Create database job back off limit | `100` | +| `schema.update.enabled` | Update schema | `true` | +| `schema.update.backoffLimit` | Update schema job back off limit | `100` | +| `cassandra.enabled` | Install Cassandra cluster | `true` | +| `cassandra.config.cluster_size` | Cassandra cluster node number | `1` | +| `mysql.enabled` | Install MySQL | `false` | +| `archival.provider` | Archival provider | `filestore` | +| `archival.historyURI` | History workflow archival URI | `file:///tmp/cadence_archival/development` | +| `archival.visibilityURI` | Visibility workflow archival URI | `file:///tmp/cadence_vis_archival/development` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example: diff --git a/cadence/templates/server-configmap.yaml b/cadence/templates/server-configmap.yaml index 2218957b..42c5b96d 100644 --- a/cadence/templates/server-configmap.yaml +++ b/cadence/templates/server-configmap.yaml @@ -157,7 +157,41 @@ data: toDC: "" archival: - status: "disabled" + history: + status: "enabled" + enableRead: true + provider: + {{- if eq .Values.archival.provider "filestore" }} + filestore: + fileMode: "0666" + dirMode: "0766" + {{- end }} + {{- if eq .Values.archival.provider "s3store" }} + s3store: + region: {{ .Values.archival.region | default "ap-south-1" | quote }} + {{- end }} + visibility: + status: "enabled" + enableRead: true + provider: + {{- if eq .Values.archival.provider "filestore" }} + filestore: + fileMode: "0666" + dirMode: "0766" + {{- end }} + {{- if eq .Values.archival.provider "s3store" }} + s3store: + region: {{ .Values.archival.region | default "ap-south-1" | quote }} + {{- end }} + + domainDefaults: + archival: + history: + status: "disabled" + URI: {{ .Values.archival.historyURI | quote }} + visibility: + status: "disabled" + URI: {{ .Values.archival.visibilityURI | quote }} publicClient: hostPort: "{{ include "cadence.componentname" (list . "frontend") }}:{{ .Values.server.frontend.service.port }}" diff --git a/cadence/values.yaml b/cadence/values.yaml index 3b3b087d..6be2f70c 100644 --- a/cadence/values.yaml +++ b/cadence/values.yaml @@ -269,3 +269,8 @@ mysql: initializationFiles: user.sql: |- GRANT ALL PRIVILEGES ON *.* TO 'cadence'@'%'; + +archival: + provider: filestore + historyURI: "file:///tmp/cadence_archival/development" + visibilityURI: "file:///tmp/cadence_vis_archival/development" \ No newline at end of file From 2d75f153ac15325ce828f6d95df7d628959ca44b Mon Sep 17 00:00:00 2001 From: Jianyu Feng Date: Tue, 4 Aug 2020 11:49:47 -0400 Subject: [PATCH 2/2] fix schema config issue in prod sample values --- cadence/values.prod.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cadence/values.prod.yaml b/cadence/values.prod.yaml index 4895ad92..ae07901d 100644 --- a/cadence/values.prod.yaml +++ b/cadence/values.prod.yaml @@ -44,8 +44,10 @@ server: password: "" schema: - setup: false - update: false + setup: + enabled: false + update: + enabled: false cassandra: enabled: false