forked from cadence-workflow/cadence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_template.yaml
240 lines (226 loc) · 7.71 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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
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" }}
visibility:
cassandra:
hosts: {{ default .Env.CASSANDRA_SEEDS "" }}
keyspace: {{ default .Env.VISIBILITY_KEYSPACE "cadence_visibility" }}
{{- else if eq $db "mysql" }}
default:
sql:
pluginName: "mysql"
encodingType: "thriftrw"
decodingTypes: ["thriftrw"]
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:
pluginName: "mysql"
encodingType: "thriftrw"
decodingTypes: ["thriftrw"]
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 }}
{{- else if eq $db "postgres" }}
default:
sql:
pluginName: "postgres"
encodingType: "thriftrw"
decodingTypes: ["thriftrw"]
databaseName: {{ default .Env.DBNAME "cadence" }}
connectAddr: "{{ default .Env.POSTGRES_SEEDS "" }}:{{ default .Env.DB_PORT "5432" }}"
connectProtocol: "tcp"
user: {{ default .Env.POSTGRES_USER "" }}
password: {{ default .Env.POSTGRES_PWD "" }}
maxConns: 20
maxIdleConns: 20
maxConnLifetime: "1h"
visibility:
sql:
pluginName: "postgres"
encodingType: "thriftrw"
decodingTypes: ["thriftrw"]
databaseName: {{ default .Env.VISIBILITY_DBNAME "cadence_visibility" }}
connectAddr: "{{ default .Env.POSTGRES_SEEDS "" }}:{{ default .Env.DB_PORT "5432" }}"
connectProtocol: "tcp"
user: {{ default .Env.POSTGRES_USER "" }}
password: {{ default .Env.POSTGRES_PWD "" }}
maxConns: 20
maxIdleConns: 20
maxConnLifetime: "1h"
{{- 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"
{{- else if .Env.PROMETHEUS_ENDPOINT }}
metrics:
prometheus:
timerType: {{ default .Env.PROMETHEUS_TIMER_TYPE "histogram" }}
listenAddress: {{ .Env.PROMETHEUS_ENDPOINT }}
{{- 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"
{{- else if .Env.PROMETHEUS_ENDPOINT }}
metrics:
prometheus:
timerType: {{ default .Env.PROMETHEUS_TIMER_TYPE "histogram" }}
listenAddress: {{ .Env.PROMETHEUS_ENDPOINT }}
{{- 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"
{{- else if .Env.PROMETHEUS_ENDPOINT }}
metrics:
prometheus:
timerType: {{ default .Env.PROMETHEUS_TIMER_TYPE "histogram" }}
listenAddress: {{ .Env.PROMETHEUS_ENDPOINT }}
{{- 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"
{{- else if .Env.PROMETHEUS_ENDPOINT }}
metrics:
prometheus:
timerType: {{ default .Env.PROMETHEUS_TIMER_TYPE "histogram" }}
listenAddress: {{ .Env.PROMETHEUS_ENDPOINT }}
{{- 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: "enabled"
enableRead: true
provider:
filestore:
fileMode: "0666"
dirMode: "0766"
domainDefaults:
archival:
history:
status: "enabled"
URI: "file:///tmp/cadence_archival/development"
visibility:
status: "enabled"
URI: "file:///tmp/cadence_vis_archival/development"
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"
blobstore:
filestore:
outputDirectory: "/tmp/blobstore"