Skip to content

Commit

Permalink
add separate config files for cross dc (cadence-workflow#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
wxing1292 authored Feb 1, 2018
1 parent 1a9baeb commit 952e86d
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 2 deletions.
29 changes: 27 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,34 @@ clean:
rm -Rf $(BUILD)

install-schema: bins
./cadence-cassandra-tool --ep 127.0.0.1 create -k "cadence" --rf 1
./cadence-cassandra-tool --ep 127.0.0.1 create -k cadence --rf 1
./cadence-cassandra-tool -ep 127.0.0.1 -k cadence setup-schema -v 0.0
./cadence-cassandra-tool -ep 127.0.0.1 -k cadence update-schema -d ./schema/cadence/versioned
./cadence-cassandra-tool --ep 127.0.0.1 create -k "cadence_visibility" --rf 1
./cadence-cassandra-tool --ep 127.0.0.1 create -k cadence_visibility --rf 1
./cadence-cassandra-tool -ep 127.0.0.1 -k cadence_visibility setup-schema -v 0.0
./cadence-cassandra-tool -ep 127.0.0.1 -k cadence_visibility update-schema -d ./schema/visibility/versioned

start: bins
./cadence start

install-schema-cdc: bins
@echo Setting up cadence_active key space
./cadence-cassandra-tool --ep 127.0.0.1 create -k cadence_active --rf 1
./cadence-cassandra-tool -ep 127.0.0.1 -k cadence_active setup-schema -v 0.0
./cadence-cassandra-tool -ep 127.0.0.1 -k cadence_active update-schema -d ./schema/cadence/versioned
./cadence-cassandra-tool --ep 127.0.0.1 create -k cadence_visibility_active --rf 1
./cadence-cassandra-tool -ep 127.0.0.1 -k cadence_visibility_active setup-schema -v 0.0
./cadence-cassandra-tool -ep 127.0.0.1 -k cadence_visibility_active update-schema -d ./schema/visibility/versioned
@echo Setting up cadence_standby key space
./cadence-cassandra-tool --ep 127.0.0.1 create -k cadence_standby --rf 1
./cadence-cassandra-tool -ep 127.0.0.1 -k cadence_standby setup-schema -v 0.0
./cadence-cassandra-tool -ep 127.0.0.1 -k cadence_standby update-schema -d ./schema/cadence/versioned
./cadence-cassandra-tool --ep 127.0.0.1 create -k cadence_visibility_standby --rf 1
./cadence-cassandra-tool -ep 127.0.0.1 -k cadence_visibility_standby setup-schema -v 0.0
./cadence-cassandra-tool -ep 127.0.0.1 -k cadence_visibility_standby update-schema -d ./schema/visibility/versioned

start-cdc-active: bins
./cadence --zone active start

start-cdc-standby: bins
./cadence --zone standby start
54 changes: 54 additions & 0 deletions config/development_active.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
cassandra:
hosts: "127.0.0.1"
keyspace: "cadence_active"
visibilityKeyspace: "cadence_visibility_active"
consistency: "One"
numHistoryShards: 4

ringpop:
name: cadence_active
bootstrapMode: hosts
bootstrapHosts: ["127.0.0.1:7933", "127.0.0.1:7934", "127.0.0.1:7935"]
maxJoinDuration: 30s

services:
frontend:
rpc:
port: 7933
bindOnLocalHost: true
metrics:
statsd:
hostPort: "127.0.0.1:8125"
prefix: "cadence_active"
pprof:
port: 7936

matching:
rpc:
port: 7935
bindOnLocalHost: true
metrics:
statsd:
hostPort: "127.0.0.1:8125"
prefix: "cadence_active"
pprof:
port: 7938

history:
rpc:
port: 7934
bindOnLocalHost: true
metrics:
statsd:
hostPort: "127.0.0.1:8125"
prefix: "cadence_active"
pprof:
port: 7937

clustersInfo:
initialFailoverVersion: 0
failoverVersionIncrement: 10
currentClusterName: "active"
clusterNames:
- "active"
- "standby"
54 changes: 54 additions & 0 deletions config/development_standby.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
cassandra:
hosts: "127.0.0.1"
keyspace: "cadence_standby"
visibilityKeyspace: "cadence_visibility_standby"
consistency: "One"
numHistoryShards: 4

ringpop:
name: cadence_standby
bootstrapMode: hosts
bootstrapHosts: ["127.0.0.1:8933", "127.0.0.1:8934", "127.0.0.1:8935"]
maxJoinDuration: 30s

services:
frontend:
rpc:
port: 8933
bindOnLocalHost: true
metrics:
statsd:
hostPort: "127.0.0.1:8125"
prefix: "cadence"
pprof:
port: 8936

matching:
rpc:
port: 8935
bindOnLocalHost: true
metrics:
statsd:
hostPort: "127.0.0.1:8125"
prefix: "cadence"
pprof:
port: 8938

history:
rpc:
port: 8934
bindOnLocalHost: true
metrics:
statsd:
hostPort: "127.0.0.1:8125"
prefix: "cadence"
pprof:
port: 8937

clustersInfo:
initialFailoverVersion: 1
failoverVersionIncrement: 10
currentClusterName: "standby"
clusterNames:
- "active"
- "standby"

0 comments on commit 952e86d

Please sign in to comment.