Skip to content

Commit

Permalink
Fix typo in docker config template which cause docker image corruption (
Browse files Browse the repository at this point in the history
  • Loading branch information
longquanzheng authored Jul 10, 2021
1 parent 572582c commit a1b9679
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ docker run -e CASSANDRA_SEEDS=10.x.x.x -- csv of cassandra serv
-e KEYSPACE=<keyspace> -- Cassandra keyspace
-e VISIBILITY_KEYSPACE=<visibility_keyspace> -- Cassandra visibility keyspace, if using basic visibility
-e KAFKA_SEEDS=10.x.x.x -- Kafka broker seed, if using ElasticSearch + Kafka for advanced visibility feature
-e CASSANDRA_PROTOCOL_VERSION=<protocol_version> -- Cassandra protocol version
-e CASSANDRA_PROTO_VERSION=<protocol_version> -- Cassandra protocol version
-e ES_SEEDS=10.x.x.x -- ElasticSearch seed , if using ElasticSearch + Kafka for advanced visibility feature
-e RINGPOP_SEEDS=10.x.x.x,10.x.x.x -- csv of ipaddrs for gossip bootstrap
-e STATSD_ENDPOINT=10.x.x.x:8125 -- statsd server endpoint
Expand Down
4 changes: 2 additions & 2 deletions docker/config_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ persistence:
keyspace: {{ default .Env.KEYSPACE "cadence" }}
user: {{ default .Env.CASSANDRA_USER "" }}
password: {{ default .Env.CASSANDRA_PASSWORD "" }}
protocolVersion: {{ default .Env.CASSANDRA_PROTOCOL_VERSION "4" }}
protoVersion: {{ default .Env.CASSANDRA_PROTO_VERSION "4" }}
visibility:
nosql:
pluginName: "cassandra"
hosts: {{ default .Env.CASSANDRA_SEEDS "" }}
keyspace: {{ default .Env.VISIBILITY_KEYSPACE "cadence_visibility" }}
user: {{ default .Env.CASSANDRA_USER "" }}
password: {{ default .Env.CASSANDRA_PASSWORD "" }}
protocolVersion: {{ default .Env.CASSANDRA_PROTOCOL_VERSION "4" }}
protoVersion: {{ default .Env.CASSANDRA_PROTO_VERSION "4" }}
{{- else if eq $db "mysql" }}
default:
sql:
Expand Down
6 changes: 3 additions & 3 deletions docker/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export CASSANDRA_USER="${CASSANDRA_USER:-cassandra}"
export CASSANDRA_PASSWORD="${CASSANDRA_PASSWORD:-cassandra}"
export KEYSPACE="${KEYSPACE:-cadence}"
export VISIBILITY_KEYSPACE="${VISIBILITY_KEYSPACE:-cadence_visibility}"
export CASSANDRA_PROTOCOL_VERSION="${CASSANDRA_PROTOCOL_VERSION:-4}"
export CASSANDRA_PROTO_VERSION="${CASSANDRA_PROTO_VERSION:-4}"

# mysql env
export DBNAME="${DBNAME:-cadence}"
Expand Down Expand Up @@ -85,7 +85,7 @@ setup_schema() {

wait_for_cassandra() {
server=`echo $CASSANDRA_SEEDS | awk -F ',' '{print $1}'`
until cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASSWORD --cqlversion=3.4.4 --protocol-version=$CASSANDRA_PROTOCOL_VERSION $server < /dev/null; do
until cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASSWORD --cqlversion=3.4.4 --protocol-version=$CASSANDRA_PROTO_VERSION $server < /dev/null; do
echo 'waiting for cassandra to start up'
sleep 1
done
Expand All @@ -94,7 +94,7 @@ wait_for_cassandra() {

wait_for_scylla() {
server=`echo $CASSANDRA_SEEDS | awk -F ',' '{print $1}'`
until cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASSWORD --cqlversion=3.3.1 --protocol-version=$CASSANDRA_PROTOCOL_VERSION $server < /dev/null; do
until cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASSWORD --cqlversion=3.3.1 --protocol-version=$CASSANDRA_PROTO_VERSION $server < /dev/null; do
echo 'waiting for scylla to start up'
sleep 1
done
Expand Down
2 changes: 1 addition & 1 deletion environment/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const (
// CassandraDefaultPort Cassandra default port
CassandraDefaultPort = "9042"
// CassandraProtoVersion env
CassandraProtoVersion = "CASSANDRA_PROTOCOL_VERSION"
CassandraProtoVersion = "CASSANDRA_PROTO_VERSION"
// CassandraDefaultProtoVersion Cassandra default protocol version
CassandraDefaultProtoVersion = "4"
// CassandraDefaultProtoVersionInteger Cassandra default protocol version int version
Expand Down
2 changes: 1 addition & 1 deletion tools/cassandra/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func BuildCLIOptions() *cli.App {
cli.IntFlag{
Name: schema.CLIFlagProtoVersion,
Usage: "Protocol Version to connect to cassandra host",
EnvVar: "CASSANDRA_PROTOCOL_VERSION",
EnvVar: "CASSANDRA_PROTO_VERSION",
},

cli.BoolFlag{
Expand Down

0 comments on commit a1b9679

Please sign in to comment.