blob: 9e2c489cb087d914b7e9500fa87f5eedd3d0a6d9 [file] [log] [blame]
Avi Zivc175a0d2018-03-15 13:21:44 +02001#!/bin/bash
2
3cd /root
4
5CS_PORT=""
6CS_HOST=127.0.0.1
7
8if [ ! -z "${CS_HOST_IP}" ]; then
9 CS_HOST=$CS_HOST_IP
10fi
11
12if [ ! -z "${CS_HOST_PORT}" ]; then
13 CS_PORT=$CS_HOST_PORT
14fi
15
16echo "[Info] Going to initialize sdc onboard cassandra: user=$SDC_USER; host=$CS_HOST; port=$CS_PORT"
17echo "[Info] Initializing onboard keyspaces"
18cqlsh -u $SDC_USER -p $SDC_PASSWORD -f init_keyspaces.cql $CS_HOST $CS_PORT
19
20echo "[Info] Initializing onboard schemas"
21cqlsh -u $SDC_USER -p $SDC_PASSWORD -f init_schemas.cql $CS_HOST $CS_PORT
22
23rc=$?
24if [[ $rc != 0 ]]; then exit $rc; fi