diff options
Diffstat (limited to 'auth/docker')
-rw-r--r-- | auth/docker/Dockerfile.base | 1 | ||||
-rw-r--r-- | auth/docker/agent.sh | 5 | ||||
-rw-r--r-- | auth/docker/d.props.init | 3 | ||||
-rw-r--r-- | auth/docker/drun.sh | 5 | ||||
-rw-r--r-- | auth/docker/dstop.sh | 4 |
5 files changed, 13 insertions, 5 deletions
diff --git a/auth/docker/Dockerfile.base b/auth/docker/Dockerfile.base index f76a3555..af29b951 100644 --- a/auth/docker/Dockerfile.base +++ b/auth/docker/Dockerfile.base @@ -23,5 +23,6 @@ MAINTAINER AAF Team, AT&T 2018 LABEL description="aaf_base" RUN apk add --no-cache bash RUN apk add --no-cache openssl +RUN apk add --no-cache curl RUN if [ -n "${DUSER}" ]; then addgroup ${DUSER} && adduser ${DUSER} -G ${DUSER} -D -s /bin/bash; fi diff --git a/auth/docker/agent.sh b/auth/docker/agent.sh index d319de4d..7340d30d 100644 --- a/auth/docker/agent.sh +++ b/auth/docker/agent.sh @@ -30,7 +30,7 @@ fi DOCKER=${DOCKER:=docker} CADI_VERSION=${CADI_VERSION:=2.1.10-SNAPSHOT} -for V in VERSION DOCKER_REPOSITORY HOSTNAME AAF_FQDN AAF_FQDN_IP DEPLOY_FQI APP_FQDN APP_FQI VOLUME DRIVER LATITUDE LONGITUDE; do +for V in VERSION DOCKER_REPOSITORY HOSTNAME CONTAINER_NS AAF_FQDN AAF_FQDN_IP DEPLOY_FQI APP_FQDN APP_FQI VOLUME DRIVER LATITUDE LONGITUDE; do if [ "$(grep $V ./aaf.props)" = "" ]; then unset DEF case $V in @@ -64,6 +64,8 @@ for V in VERSION DOCKER_REPOSITORY HOSTNAME AAF_FQDN AAF_FQDN_IP DEPLOY_FQI APP_ fi ;; DRIVER) PROMPT=$V;DEF=local;; + CONTAINER_NS) + PROMPT=$V;DEF=onap;; VERSION) PROMPT="CADI Version";DEF=$CADI_VERSION;; LATITUDE|LONGITUDE) PROMPT="$V of Node";; *) PROMPT=$V;; @@ -117,6 +119,7 @@ function run_it() { --env APP_FQDN=${APP_FQDN} \ --env LATITUDE=${LATITUDE} \ --env LONGITUDE=${LONGITUDE} \ + --env aaf_locator_container_ns=${CONTAINER_NS} \ --name aaf-agent-$USER \ "$PREFIX"onap/aaf/aaf_agent:$VERSION \ bash -c "bash /opt/app/aaf_config/bin/agent.sh $PARAMS" diff --git a/auth/docker/d.props.init b/auth/docker/d.props.init index 3aaea001..bc5d3583 100644 --- a/auth/docker/d.props.init +++ b/auth/docker/d.props.init @@ -26,7 +26,7 @@ CONF_ROOT_DIR=/opt/app/osaaf # For local builds, set PREFIX= PREFIX="$DOCKER_REPOSITORY/" NAMESPACE=onap -USER=aaf +DUSER=aaf # HOSTNAME=aaf.osaaf.org @@ -39,7 +39,6 @@ LONGITUDE= CADI_X509_ISSUERS="CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_7, OU=OSAAF, O=ONAP, C=US" AAF_INITIAL_X509_P12= AAF_INITIAL_X509_PASSWORD= -CADI_X509_ISSUERS= # CA info (leave blank unless functioning as CA) CM_CA_LOCAL= diff --git a/auth/docker/drun.sh b/auth/docker/drun.sh index d7d43d65..994bb556 100644 --- a/auth/docker/drun.sh +++ b/auth/docker/drun.sh @@ -93,9 +93,12 @@ for AAF_COMPONENT in ${AAF_COMPONENTS}; do #--hostname="${AAF_COMPONENT}.${NAMESPACE}" \ # --env aaf_locate_url=https://aaf-locate:8095 \ # $ADD_HOST \ + if [ -n "${DUSER}" ]; then + THE_USER="--user $DUSER" + fi $DOCKER run \ -d \ - --user aaf \ + ${THE_USER} \ --name aaf-$AAF_COMPONENT \ ${LINKS} \ --env AAF_ENV=${AAF_ENV} \ diff --git a/auth/docker/dstop.sh b/auth/docker/dstop.sh index 256385d5..fce79226 100644 --- a/auth/docker/dstop.sh +++ b/auth/docker/dstop.sh @@ -23,7 +23,9 @@ DOCKER=${DOCKER:=docker} if [ "$1" == "" ]; then - AAF_COMPONENTS=$(tail -r components) + for C in $(cat components); do + AAF_COMPONENTS="$C $AAF_COMPONENTS" + done else AAF_COMPONENTS="$@" fi |