Skip to content

Commit

Permalink
Update docker script to install cassandra schema versions (#445)
Browse files Browse the repository at this point in the history
  • Loading branch information
madhuravi authored Dec 5, 2017
1 parent d77fdf2 commit f7e2ff1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docker/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@
# THE SOFTWARE.

setup_schema() {
SCHEMA_FILE=$CADENCE_HOME/schema/cadence/schema.cql
SCHEMA_DIR=$CADENCE_HOME/schema/cadence/versioned
$CADENCE_HOME/cadence-cassandra-tool --ep $CASSANDRA_SEEDS create -k $KEYSPACE --rf $RF
$CADENCE_HOME/cadence-cassandra-tool --ep $CASSANDRA_SEEDS -k $KEYSPACE setup-schema -d -f $SCHEMA_FILE
VISIBILITY_SCHEMA_FILE=$CADENCE_HOME/schema/visibility/schema.cql
$CADENCE_HOME/cadence-cassandra-tool --ep $CASSANDRA_SEEDS -k $KEYSPACE setup-schema -v 0.0
$CADENCE_HOME/cadence-cassandra-tool --ep $CASSANDRA_SEEDS -k $KEYSPACE update-schema -d $SCHEMA_DIR
VISIBILITY_SCHEMA_DIR=$CADENCE_HOME/schema/visibility/versioned
$CADENCE_HOME/cadence-cassandra-tool --ep $CASSANDRA_SEEDS create -k $VISIBILITY_KEYSPACE --rf $RF
$CADENCE_HOME/cadence-cassandra-tool --ep $CASSANDRA_SEEDS -k $VISIBILITY_KEYSPACE setup-schema -d -f $VISIBILITY_SCHEMA_FILE
$CADENCE_HOME/cadence-cassandra-tool --ep $CASSANDRA_SEEDS -k $VISIBILITY_KEYSPACE setup-schema -v 0.0
$CADENCE_HOME/cadence-cassandra-tool --ep $CASSANDRA_SEEDS -k $VISIBILITY_KEYSPACE update-schema -d $VISIBILITY_SCHEMA_DIR
}

wait_for_cassandra() {
Expand Down

0 comments on commit f7e2ff1

Please sign in to comment.