Move AAF Poms to 2.1.16
[aaf/authz.git] / auth / docker / agent.sh
index 7e7d08c..575e21f 100644 (file)
@@ -28,7 +28,7 @@ fi
 . ./aaf.props
 
 DOCKER=${DOCKER:=docker}
-CADI_VERSION=${CADI_VERSION:=2.1.10-SNAPSHOT}
+CADI_VERSION=${CADI_VERSION:=2.1.16}
 
 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
@@ -120,6 +120,8 @@ function run_it() {
     --env LATITUDE=${LATITUDE} \
     --env LONGITUDE=${LONGITUDE} \
     --env aaf_locator_container_ns=${CONTAINER_NS} \
+    --env aaf_locator_container=docker \
+    --link aaf-service --link aaf-locate --link aaf-oauth --link aaf-cm \
     --name aaf-agent-$USER \
     "$PREFIX"onap/aaf/aaf_agent:$VERSION \
     bash -c "bash /opt/app/aaf_config/bin/agent.sh $PARAMS"
@@ -127,13 +129,13 @@ function run_it() {
 
 function sso {
   if [ -n "$2" ]; then
-    echo "$1=$2" >> ~/.aaf/sso.props
+    echo "$1=$2" >> $HOME/.aaf/sso.props
   fi
 }
 
 function reset_sso {
     mkdir -p ~/.aaf
-    > ~/.aaf/sso.props
+    > $HOME/.aaf/sso.props
     sso aaf_locate_url "https://$AAF_FQDN:8095"
     sso cadi_latitude "$LATITUDE"
     sso cadi_longitude "$LONGITUDE"
@@ -159,10 +161,10 @@ case "$1" in
   aafcli) 
     shift
     reset_sso
-    if [ -f aaf-auth-cmd-$VERSION*-full.jar ]; then
-      java -Dcadi_prop_files="~\/.aaf\/sso.props" -jar aaf-auth-cmd-$VERSION*-full.jar $@
+    if [ -f aaf-cadi-aaf-$VERSION-full.jar ]; then
+      java -Dcadi_prop_files="$HOME/.aaf/sso.props" -jar aaf-cadi-aaf-$VERSION-full.jar $@
     else 
-      echo "For local use, you need to have 'aaf-cadi-aaf-$VERSION*-full.jar' (or newer)"
+      echo "For local use, you need to have 'aaf-cadi-aaf-$VERSION-full.jar' (or newer)"
     fi
     ;;
   local) 
@@ -185,11 +187,10 @@ case "$1" in
     reset_sso
     sso aaf_id "$DEPLOY_FQI"
     sso aaf_password "$DEPLOY_PASSWORD"
-    if [ -f aaf-auth-cmd-$VERSION*-full.jar ]; then
-      mkdir -p $APP_FQDN
-      java -Dcadi_prop_files="~\/.aaf\/sso.props" -cp aaf-auth-cmd-$VERSION*-full.jar org.onap.aaf.cadi.configure.Agent $CMD 
+    if [ -f aaf-cadi-aaf-$VERSION-full.jar ]; then
+      java -Dcadi_prop_files="$HOME/.aaf/sso.props" -cp aaf-cadi-aaf-$VERSION-full.jar org.onap.aaf.cadi.configure.Agent $CMD 
     else 
-      echo "For local use, you need to have 'aaf-cadi-aaf-$VERSION*-full.jar' (or newer)"
+      echo "For local use, you need to have 'aaf-cadi-aaf-$VERSION-full.jar' (or newer)"
     fi
     ;;
   *)