Refine Agent.sh and Docs
Issue-ID: AAF-667
Change-Id: Id4cfb8e880001d4d46f664f69449fa1713f777e7
Signed-off-by: Instrumental <jonathan.gathman@att.com>
diff --git a/auth/docker/Dockerfile.client b/auth/docker/Dockerfile.client
index e50810f..111c377 100644
--- a/auth/docker/Dockerfile.client
+++ b/auth/docker/Dockerfile.client
@@ -25,10 +25,10 @@
LABEL description="aaf_agent"
LABEL version=${AAF_VERSION}
-COPY logs /opt/app/aaf_config/logs
COPY bin/client.sh /opt/app/aaf_config/bin/agent.sh
COPY bin/aaf-auth-cmd-${AAF_VERSION}-full.jar /opt/app/aaf_config/bin/
COPY bin/aaf-cadi-servlet-sample-*-sample.jar /opt/app/aaf_config/bin/
+COPY logs /opt/app/aaf_config/logs
COPY cert/*trust*.b64 /opt/app/aaf_config/cert/
RUN if [ -n "${DUSER}" ]; then chown -R ${DUSER}:${DUSER} /opt/app/aaf_config; fi
diff --git a/auth/docker/Dockerfile.config b/auth/docker/Dockerfile.config
index 9a5fbb4..7e442b2 100644
--- a/auth/docker/Dockerfile.config
+++ b/auth/docker/Dockerfile.config
@@ -28,10 +28,10 @@
COPY data/sample.identities.dat /opt/app/aaf_config/data/
COPY etc /opt/app/aaf_config/etc
COPY local /opt/app/aaf_config/local
+COPY logs /opt/app/aaf_config/logs
COPY cert /opt/app/aaf_config/cert
COPY public /opt/app/aaf_config/public
COPY CA /opt/app/aaf_config/CA
-COPY logs /opt/app/aaf_config/logs
COPY bin/service.sh /opt/app/aaf_config/bin/agent.sh
COPY bin/pod_wait.sh /opt/app/aaf_config/bin/
COPY bin/aaf-auth-cmd-${AAF_VERSION}-full.jar /opt/app/aaf_config/bin/
diff --git a/auth/docker/agent.sh b/auth/docker/agent.sh
index a2b1183..c330b1c 100644
--- a/auth/docker/agent.sh
+++ b/auth/docker/agent.sh
@@ -36,7 +36,7 @@
case $V in
DOCKER_REPOSITORY)
PROMPT="Docker Repo"
- DEF=""
+ DEF="nexus3.onap.org:10003"
;;
HOSTNAME)
PROMPT="HOSTNAME (blank for Default)"
@@ -47,7 +47,12 @@
AAF_FQDN_IP)
# Need AAF_FQDN's IP, because not might not be available in mini-container
PROMPT="AAF FQDN IP"
- DEF=$(host $AAF_FQDN | grep "has address" | tail -1 | cut -f 4 -d ' ')
+ LOOKUP=$(host "${AAF_FQDN}" | grep "has address")
+ if [ -z ${LOOKUP} ]; then
+ DEF=
+ else
+ DEF=$(echo ${LOOKUP} | tail -1 | cut -f 4 -d ' ')
+ fi
;;
APP_FQI) PROMPT="App's FQI";;
APP_FQDN) PROMPT="App's Root FQDN";;
@@ -74,6 +79,7 @@
fi
fi
echo "$V=$VAR" >> ./aaf.props
+ declare "$V"="$VAR"
fi
done
. ./aaf.props
@@ -91,7 +97,6 @@
fi
function run_it() {
- LINKS="--link aaf-locate"
if [ -n "${DUSER}" ]; then
USER_LINE="--user ${DUSER}"
fi
@@ -99,7 +104,6 @@
${USER_LINE} \
-v "${VOLUME}:/opt/app/osaaf" \
--add-host="$AAF_FQDN:$AAF_FQDN_IP" \
- $LINKS \
--env AAF_FQDN=${AAF_FQDN} \
--env DEPLOY_FQI=${DEPLOY_FQI} \
--env DEPLOY_PASSWORD=${DEPLOY_PASSWORD} \
@@ -118,6 +122,9 @@
PARAMS="&& cd /opt/app/osaaf/local && exec bash"
run_it -it --rm
;;
+ taillog)
+ run_it -it --rm
+ ;;
*)
run_it --rm
;;