aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be
diff options
context:
space:
mode:
authorOfir Sonsino <os0695@intl.att.com>2019-06-23 16:20:50 +0300
committerOren Kleks <orenkle@amdocs.com>2019-06-27 12:57:29 +0000
commitf4dcec3859d8ab1a0ac1559d5c5e27e059d06e4f (patch)
treeb27a996edf67a36ba8fe99ec074a94d33f6026f1 /openecomp-be
parentd761b7ce6d662e2d23410ef7f2dec3350eac05b5 (diff)
Fix for Cassandra init
Change-Id: If266342c3c126d79e5d99a70f4ed3908e4e7a166 Issue-ID: SDC-2371 Signed-off-by: Ofir Sonsino <os0695@intl.att.com>
Diffstat (limited to 'openecomp-be')
-rw-r--r--openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/startup.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/startup.sh b/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/startup.sh
index 9e2c489cb0..c8061021ec 100644
--- a/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/startup.sh
+++ b/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/startup.sh
@@ -14,11 +14,25 @@ if [ ! -z "${CS_HOST_PORT}" ]; then
fi
echo "[Info] Going to initialize sdc onboard cassandra: user=$SDC_USER; host=$CS_HOST; port=$CS_PORT"
+
echo "[Info] Initializing onboard keyspaces"
+date;
cqlsh -u $SDC_USER -p $SDC_PASSWORD -f init_keyspaces.cql $CS_HOST $CS_PORT
+date;
+
+rc=$?
+if [[ $rc != 0 ]]; then
+ echo "[Error] Failed to initialize onboard keyspaces";
+ exit $rc;
+fi
echo "[Info] Initializing onboard schemas"
+date;
cqlsh -u $SDC_USER -p $SDC_PASSWORD -f init_schemas.cql $CS_HOST $CS_PORT
+date;
rc=$?
-if [[ $rc != 0 ]]; then exit $rc; fi \ No newline at end of file
+if [[ $rc != 0 ]]; then
+ echo "[Error] Failed to initialize onboard schemas";
+ exit $rc;
+fi \ No newline at end of file