diff options
author | vempo <vitaliy.emporopulo@amdocs.com> | 2018-07-24 17:34:04 +0300 |
---|---|---|
committer | vempo <vitaliy.emporopulo@amdocs.com> | 2018-07-25 11:39:10 +0300 |
commit | a52d50e788792a63e97a9176ab319d53db7a2853 (patch) | |
tree | b1c2222cacf4b8192aea16d1e0315b1f005c5347 /workflow-designer-init/src/main/docker/start.sh | |
parent | 3c2665debb400aef7f0ed9e235698d2ff9f859db (diff) |
Replaced old implementation at root
Old project files and directories has been moved
under 'deprecated-workflow-designer'. The old project
is not built by the CI anymore, but can be still built manually.
New modules/directories have been moved up and integrated with
the CI system.
Change-Id: I1528c792bcbcce9e50bfc294a1328a20e72c91cf
Issue-ID: SDC-1559
Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'workflow-designer-init/src/main/docker/start.sh')
-rw-r--r-- | workflow-designer-init/src/main/docker/start.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/workflow-designer-init/src/main/docker/start.sh b/workflow-designer-init/src/main/docker/start.sh new file mode 100644 index 00000000..919277fd --- /dev/null +++ b/workflow-designer-init/src/main/docker/start.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +is_cs_unauthenticated=1 +FALSE=0 +if [[ -z "${CS_AUTHENTICATE}" || "${CS_AUTHENTICATE}" == "false" ]]; then + is_cs_unauthenticated=$FALSE +fi + +if [ $is_cs_unauthenticated -eq $FALSE ]; then + echo "Establishing unsecured connection to Cassandra" +fi + +if [[ $is_cs_unauthenticated -eq 1 && -z "${CS_USER}" ]]; then + echo "CS_USER environment variable must be set" + exit 1 +fi + +if [[ $is_cs_unauthenticated -eq 1 && -z "${CS_PASSWORD}" ]]; then + echo "CS_PASSWORD environment variable must be set" + exit 1 +fi + +if [[ -z "${CS_HOST}" ]]; then + echo "CS_HOST environment variable must be set" + 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 + |