X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fdocker%2Fdrun.sh;h=c62adfc29e48f7fd83ec7f5ea8fbd1695aa24f5e;hb=4ad4763d8c9191998cc671a884d1af5da6ba8bb9;hp=2b5f709a86989c030dbcab989909d69c05512883;hpb=f482ea06ac55e56025c64916592f07db2c1fddd7;p=aaf%2Fauthz.git diff --git a/auth/docker/drun.sh b/auth/docker/drun.sh index 2b5f709a..c62adfc2 100644 --- a/auth/docker/drun.sh +++ b/auth/docker/drun.sh @@ -1,52 +1,52 @@ -#!/bin/bash drun.sh +#!/bin/bash +# Pull in Variables from d.props . ./d.props - if [ "$1" == "" ]; then - AAF_COMPONENTS=`ls -r ../aaf_${VERSION}/bin | grep -v '\.'` + AAF_COMPONENTS=$(ls -r ../aaf_${VERSION}/bin | grep -v '\.') else - AAF_COMPONENTS=$1 + AAF_COMPONENTS="$@" fi - -for AAF_COMPONENT in ${AAF_COMPONENTS}; do - case "$AAF_COMPONENT" in - "service") - PORTMAP="8100:8100" - LINKS="--link aaf_cass:cassandra --add-host=$CASS_HOST" - ;; - "locate") - PORTMAP="8095:8095" - LINKS="--link aaf_cass:cassandra --add-host=$CASS_HOST" - ;; - "oauth") - PORTMAP="8140:8140" - LINKS="--link aaf_cass:cassandra --add-host=$CASS_HOST" - ;; - "gui") - PORTMAP="8200:8200" - ;; - "cm") - PORTMAP="8150:8150" - LINKS="--link aaf_cass:cassandra --add-host=$CASS_HOST" - ;; - "hello") - PORTMAP="8130:8130" - ;; - "fs") - PORTMAP="80:8096" - ;; - esac - - echo Starting aaf_$AAF_COMPONENT... - docker run \ - -d \ - --name aaf_$AAF_COMPONENT \ - --hostname="${AAF_COMPONENT}.aaf.osaaf.org" \ - --add-host="$HOSTNAME:$HOST_IP" \ - --add-host="aaf.osaaf.org:$HOST_IP" \ - ${LINKS} \ - --publish $PORTMAP \ - --mount type=bind,source=$CONF_ROOT_DIR,target=/opt/app/osaaf \ - ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} +for AAF_COMPONENT in ${AAF_COMPONENTS}; do + case "$AAF_COMPONENT" in + "service") + PORTMAP="8100:8100" + LINKS="--link aaf_cass:cassandra --add-host=$CASS_HOST" + ;; + "locate") + PORTMAP="8095:8095" + LINKS="--link aaf_cass:cassandra --add-host=$CASS_HOST" + ;; + "oauth") + PORTMAP="8140:8140" + LINKS="--link aaf_cass:cassandra --add-host=$CASS_HOST" + ;; + "gui") + PORTMAP="8200:8200" + ;; + "cm") + PORTMAP="8150:8150" + LINKS="--link aaf_cass:cassandra --add-host=$CASS_HOST" + ;; + "hello") + PORTMAP="8130:8130" + ;; + "fs") + PORTMAP="80:8096" + ;; + esac + + echo Starting aaf_$AAF_COMPONENT... + + docker run \ + -d \ + --name aaf_$AAF_COMPONENT \ + --hostname="${AAF_COMPONENT}.aaf.osaaf.org" \ + --add-host="$HOSTNAME:$HOST_IP" \ + --add-host="aaf.osaaf.org:$HOST_IP" \ + ${LINKS} \ + --publish $PORTMAP \ + --mount 'type=volume,src=aaf_config,dst='$CONF_ROOT_DIR',volume-driver=local' \ + ${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} done