aboutsummaryrefslogtreecommitdiffstats
path: root/workflow/workflow-designer-init
diff options
context:
space:
mode:
Diffstat (limited to 'workflow/workflow-designer-init')
-rw-r--r--workflow/workflow-designer-init/src/main/docker/start.sh21
1 files changed, 18 insertions, 3 deletions
diff --git a/workflow/workflow-designer-init/src/main/docker/start.sh b/workflow/workflow-designer-init/src/main/docker/start.sh
index ac89d6c0..919277fd 100644
--- a/workflow/workflow-designer-init/src/main/docker/start.sh
+++ b/workflow/workflow-designer-init/src/main/docker/start.sh
@@ -1,11 +1,21 @@
#!/bin/sh
-if [[ -z "${CS_USER}" ]]; then
+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 [[ -z "${CS_PASSWORD}" ]]; then
+if [[ $is_cs_unauthenticated -eq 1 && -z "${CS_PASSWORD}" ]]; then
echo "CS_PASSWORD environment variable must be set"
exit 1
fi
@@ -15,4 +25,9 @@ if [[ -z "${CS_HOST}" ]]; then
exit 1
fi
-cqlsh -u ${CS_USER} -p ${CS_PASSWORD} -f /create_workflow_db.cql ${CS_HOST} ${CS_PORT}
+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
+