forked from cadence-workflow/cadence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_template.yaml
182 lines (169 loc) · 5.39 KB
/
config_template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
log:
stdout: true
level: {{ default .Env.LOG_LEVEL "info" }}
persistence:
numHistoryShards: {{ default .Env.NUM_HISTORY_SHARDS "4" }}
defaultStore: default
visibilityStore: visibility
{{- $es := default .Env.ENABLE_ES "false" | lower -}}
{{- if eq $es "true" }}
advancedVisibilityStore: es-visibility
{{- end }}
datastores:
{{- $db := default .Env.DB "cassandra" | lower -}}
{{- if eq $db "cassandra" }}
default:
cassandra:
hosts: {{ default .Env.CASSANDRA_SEEDS "" }}
keyspace: {{ default .Env.KEYSPACE "cadence" }}
consistency: {{ default .Env.CASSANDRA_CONSISTENCY "One" }}
visibility:
cassandra:
hosts: {{ default .Env.CASSANDRA_SEEDS "" }}
keyspace: {{ default .Env.VISIBILITY_KEYSPACE "cadence_visibility" }}
consistency: {{ default .Env.CASSANDRA_CONSISTENCY "One" }}
{{- else if eq $db "mysql" }}
default:
sql:
driverName: "mysql"
databaseName: {{ default .Env.DBNAME "cadence" }}
connectAddr: "{{ default .Env.MYSQL_SEEDS "" }}:{{ default .Env.DB_PORT "3306" }}"
connectProtocol: "tcp"
user: {{ default .Env.MYSQL_USER "" }}
password: {{ default .Env.MYSQL_PWD "" }}
{{- if .Env.MYSQL_TX_ISOLATION_COMPAT }}
connectAttributes:
tx_isolation: 'READ-COMMITTED'
{{- end }}
visibility:
sql:
driverName: "mysql"
databaseName: {{ default .Env.VISIBILITY_DBNAME "cadence_visibility" }}
connectAddr: "{{ default .Env.MYSQL_SEEDS "" }}:{{ default .Env.DB_PORT "3306" }}"
connectProtocol: "tcp"
user: {{ default .Env.MYSQL_USER "" }}
password: {{ default .Env.MYSQL_PWD "" }}
{{- if .Env.MYSQL_TX_ISOLATION_COMPAT }}
connectAttributes:
tx_isolation: 'READ-COMMITTED'
{{- end }}
{{- end }}
{{- if eq $es "true" }}
es-visibility:
elasticsearch:
url:
scheme: "http"
host: "{{ default .Env.ES_SEEDS "" }}:9200"
indices:
visibility: cadence-visibility-dev
{{- end }}
ringpop:
name: cadence
bootstrapMode: {{ default .Env.RINGPOP_BOOTSTRAP_MODE "hosts" }}
{{- if .Env.RINGPOP_SEEDS }}
bootstrapHosts:
{{- range $seed := (split .Env.RINGPOP_SEEDS ",") }}
- {{ . }}
{{- end }}
{{- else }}
bootstrapHosts:
- {{ .Env.HOST_IP }}:7933
- {{ .Env.HOST_IP }}:7934
- {{ .Env.HOST_IP }}:7935
- {{ .Env.HOST_IP }}:7939
{{- end }}
maxJoinDuration: 30s
services:
frontend:
rpc:
port: 7933
bindOnIP: {{ default .Env.BIND_ON_IP "127.0.0.1" }}
{{- if .Env.STATSD_ENDPOINT }}
metrics:
statsd:
hostPort: {{ .Env.STATSD_ENDPOINT }}
prefix: "cadence-frontend"
{{- end }}
matching:
rpc:
port: 7935
bindOnIP: {{ default .Env.BIND_ON_IP "127.0.0.1" }}
{{- if .Env.STATSD_ENDPOINT }}
metrics:
statsd:
hostPort: {{ .Env.STATSD_ENDPOINT }}
prefix: "cadence-matching"
{{- end }}
history:
rpc:
port: 7934
bindOnIP: {{ default .Env.BIND_ON_IP "127.0.0.1" }}
{{- if .Env.STATSD_ENDPOINT }}
metrics:
statsd:
hostPort: {{ .Env.STATSD_ENDPOINT }}
prefix: "cadence-history"
{{- end }}
worker:
rpc:
port: 7939
bindOnIP: {{ default .Env.BIND_ON_IP "127.0.0.1" }}
{{- if .Env.STATSD_ENDPOINT }}
metrics:
statsd:
hostPort: {{ .Env.STATSD_ENDPOINT }}
prefix: "cadence-worker"
{{- end }}
clusterMetadata:
enableGlobalDomain: false
failoverVersionIncrement: 10
masterClusterName: "active"
currentClusterName: "active"
clusterInformation:
active:
enabled: true
initialFailoverVersion: 0
rpcName: "cadence-frontend"
rpcAddress: "127.0.0.1:7933"
dcRedirectionPolicy:
policy: "noop"
toDC: ""
archival:
history:
status: "enabled"
enableRead: true
provider:
filestore:
fileMode: "0666"
dirMode: "0766"
visibility:
status: "disabled"
enableRead: false
domainDefaults:
archival:
history:
status: "enabled"
URI: "file:///tmp/cadence_archival/development"
visibility:
status: "disabled"
kafka:
tls:
enabled: false
clusters:
test:
brokers:
- {{ default .Env.KAFKA_SEEDS "" }}:9092
topics:
cadence-visibility-dev:
cluster: test
cadence-visibility-dev-dlq:
cluster: test
applications:
visibility:
topic: cadence-visibility-dev
dlq-topic: cadence-visibility-dev-dlq
publicClient:
hostPort: {{ default .Env.BIND_ON_IP "127.0.0.1" }}:7933
dynamicConfigClient:
filepath: {{ default .Env.DYNAMIC_CONFIG_FILE_PATH "/etc/cadence/config/dynamicconfig" }}
pollInterval: "60s"