From dff5b41cf16990ec3f271f65af8d315f8f1e0ecf Mon Sep 17 00:00:00 2001 From: Wenquan Xing Date: Fri, 26 Jan 2018 11:04:56 -0800 Subject: [PATCH] add separate config files for cross dc --- Makefile | 29 ++++++++++++++++-- config/development_active.yaml | 54 +++++++++++++++++++++++++++++++++ config/development_standby.yaml | 54 +++++++++++++++++++++++++++++++++ 3 files changed, 135 insertions(+), 2 deletions(-) create mode 100644 config/development_active.yaml create mode 100644 config/development_standby.yaml diff --git a/Makefile b/Makefile index 6a2917a84f5..4a32eb4e81a 100644 --- a/Makefile +++ b/Makefile @@ -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 \ No newline at end of file diff --git a/config/development_active.yaml b/config/development_active.yaml new file mode 100644 index 00000000000..fdf116cdc7f --- /dev/null +++ b/config/development_active.yaml @@ -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" \ No newline at end of file diff --git a/config/development_standby.yaml b/config/development_standby.yaml new file mode 100644 index 00000000000..a2060e80584 --- /dev/null +++ b/config/development_standby.yaml @@ -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" \ No newline at end of file