diff options
author | avigaffa <avi.gaffa@amdocs.com> | 2019-01-03 14:18:49 +0200 |
---|---|---|
committer | Vitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com> | 2019-01-03 13:35:56 +0000 |
commit | 3bfe76a41d7c46d6b367801a0802eb8d4273dfe4 (patch) | |
tree | f7cfd3ba67d07793df4f661d87824d33bda81571 /workflow-designer-init/src/main/docker/start.sh | |
parent | c290365753ae928a3e447615d01342823d0be812 (diff) |
workflow replication factor
Change sdc-workflow-designer-init docker to support keyspace configuration
Change-Id: I5e5350b00de1702d978d3c7179692c7b0cd04e9e
Issue-ID: SDC-2033
Signed-off-by: avigaffa <avi.gaffa@amdocs.com>
Diffstat (limited to 'workflow-designer-init/src/main/docker/start.sh')
-rw-r--r-- | workflow-designer-init/src/main/docker/start.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/workflow-designer-init/src/main/docker/start.sh b/workflow-designer-init/src/main/docker/start.sh index 919277fd..8acb2cf6 100644 --- a/workflow-designer-init/src/main/docker/start.sh +++ b/workflow-designer-init/src/main/docker/start.sh @@ -25,9 +25,14 @@ if [[ -z "${CS_HOST}" ]]; then exit 1 fi -if [ $is_cs_unauthenticated -eq 1 ]; then - cqlsh -u ${CS_USER} -p ${CS_PASSWORD} -f /create_workflow_db.cql ${CS_HOST} ${CS_PORT} -else - cqlsh -f /create_workflow_db.cql ${CS_HOST} ${CS_PORT} -fi +cql_from_file() { + + if [ $is_cs_unauthenticated -eq 1 ]; then + cqlsh -u ${CS_USER} -p ${CS_PASSWORD} -f $1 ${CS_HOST} ${CS_PORT} + else + cqlsh -f $1 ${CS_HOST} ${CS_PORT} + fi +} +cql_from_file /create_keyspaces.cql +cql_from_file /create_tables.cql |