diff options
author | priyanshu <pagarwal@amdocs.com> | 2018-05-28 15:29:26 +0300 |
---|---|---|
committer | Vitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com> | 2018-05-29 08:59:17 +0000 |
commit | daf0dfe8308a259d168734d3fe98212cadad1a9e (patch) | |
tree | 921c28edbda67f876fd88935f0a50fec6eb98e11 /services/activity-spec/activity-spec-init | |
parent | 80a35922da9c0244e736a87fea3007de92822967 (diff) |
Activity Spec docker enhancements
Activity Spec Changes for docker in Kubernetes
Change-Id: I987fe097792ccd5d41a0ad811602dad72259d45f
Issue-ID: SDC-1048
Signed-off-by: priyanshu <pagarwal@amdocs.com>
Diffstat (limited to 'services/activity-spec/activity-spec-init')
-rw-r--r-- | services/activity-spec/activity-spec-init/Dockerfile | 2 | ||||
-rw-r--r-- | services/activity-spec/activity-spec-init/start.sh | 16 |
2 files changed, 13 insertions, 5 deletions
diff --git a/services/activity-spec/activity-spec-init/Dockerfile b/services/activity-spec/activity-spec-init/Dockerfile index 09361461dd..a940b20c5f 100644 --- a/services/activity-spec/activity-spec-init/Dockerfile +++ b/services/activity-spec/activity-spec-init/Dockerfile @@ -2,8 +2,6 @@ FROM alpine:3.7 RUN apk add --no-cache 'python<3' py-pip && pip install cqlsh==4.0.1 -ENV CASSANDRA_PORT=9160 - COPY create_activityspec_db.cql . COPY start.sh . diff --git a/services/activity-spec/activity-spec-init/start.sh b/services/activity-spec/activity-spec-init/start.sh index defc8efedf..582f0bde0a 100644 --- a/services/activity-spec/activity-spec-init/start.sh +++ b/services/activity-spec/activity-spec-init/start.sh @@ -1,8 +1,18 @@ #!/bin/sh -if [[ -z "${CASSANDRA_HOST}" ]]; then - echo "CASSANDRA_HOST environment variable must be set" +if [[ -z "${CS_USER}" ]]; then + echo "CS_USER environment variable must be set" exit 1 fi -cqlsh -f /create_activityspec_db.cql $CASSANDRA_HOST $CASSANDRA_PORT
\ No newline at end of file +if [[ -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 + +cqlsh -u $CS_USER -p $CS_PASSWORD -f /create_activityspec_db.cql $CS_HOST $CS_PORT |