summaryrefslogtreecommitdiffstats
path: root/auth/docker/drun.sh
diff options
context:
space:
mode:
Diffstat (limited to 'auth/docker/drun.sh')
-rw-r--r--auth/docker/drun.sh19
1 files changed, 17 insertions, 2 deletions
diff --git a/auth/docker/drun.sh b/auth/docker/drun.sh
index 2eb025ea..96405f24 100644
--- a/auth/docker/drun.sh
+++ b/auth/docker/drun.sh
@@ -20,6 +20,8 @@ fi
. ./cass.props
+bash aaf.sh onap
+
if [ "$1" == "" ]; then
AAF_COMPONENTS=$(cat components)
else
@@ -57,13 +59,26 @@ for AAF_COMPONENT in ${AAF_COMPONENTS}; do
echo Starting aaf_$AAF_COMPONENT...
+ if [ -n "$AAF_REGISTER_AS" ] && [ "$HOSTNAME" != "$AAF_REGISTER_AS" ]; then
+ AH_ROOT="$HOSTNAME $AAF_REGISTER_AS"
+ else
+ AH_ROOT="$HOSTNAME"
+ fi
+
+ for A in aaf.osaaf.org $AH_ROOT; do
+ ADD_HOST="$ADD_HOST --add-host=$A:$HOST_IP"
+ done
+
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" \
+ $ADD_HOST \
${LINKS} \
+ --env AAF_ENV=${AAF_ENV} \
+ --env AAF_REGISTER_AS=${AAF_REGISTER_AS} \
+ --env LATITUDE=${LATITUDE} \
+ --env LONGITUDE=${LONGITUDE} \
--publish $PORTMAP \
--mount 'type=volume,src=aaf_config,dst='$CONF_ROOT_DIR',volume-driver=local' \
${PREFIX}${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION}