summaryrefslogtreecommitdiffstats
path: root/auth/docker
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2019-02-21 07:18:51 -0600
committerInstrumental <jonathan.gathman@att.com>2019-02-21 07:18:58 -0600
commitce76c7dc637edba5f606c1657b056bb3ef4addd9 (patch)
tree2fddc20ad941b623dba0dd7b4bf28e34a60aa1d4 /auth/docker
parentdd097a4b411cd78ced737548a43e019b1f3172f1 (diff)
CSIT and non-container Agent
Issue-ID: AAF-767 Change-Id: I8bf40dc33bc4b855c556ca5cb264e24917e0d9dd Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/docker')
-rw-r--r--auth/docker/.gitignore3
-rw-r--r--auth/docker/agent.sh58
2 files changed, 61 insertions, 0 deletions
diff --git a/auth/docker/.gitignore b/auth/docker/.gitignore
index ad950a43..30b97d74 100644
--- a/auth/docker/.gitignore
+++ b/auth/docker/.gitignore
@@ -9,3 +9,6 @@
/.curl_auth
/test.sh
/*.tgz
+/*.jar
+/*.jks
+/sdnc
diff --git a/auth/docker/agent.sh b/auth/docker/agent.sh
index 7340d30d..7e7d08c0 100644
--- a/auth/docker/agent.sh
+++ b/auth/docker/agent.sh
@@ -125,6 +125,28 @@ function run_it() {
bash -c "bash /opt/app/aaf_config/bin/agent.sh $PARAMS"
}
+function sso {
+ if [ -n "$2" ]; then
+ echo "$1=$2" >> ~/.aaf/sso.props
+ fi
+}
+
+function reset_sso {
+ mkdir -p ~/.aaf
+ > ~/.aaf/sso.props
+ sso aaf_locate_url "https://$AAF_FQDN:8095"
+ sso cadi_latitude "$LATITUDE"
+ sso cadi_longitude "$LONGITUDE"
+ sso cadi_loglevel "DEBUG"
+ TRUSTSTORE="$(ls truststore*.jks | tail -1)"
+ if [ -z "$TRUSTSTORE" ]; then
+ echo "Place a truststore*.jar which has YOUR CA in it here"
+ exit
+ fi
+ sso cadi_truststore "${PWD}/${TRUSTSTORE}"
+ sso cadi_truststore_password changeit
+}
+
PARAMS=$@
case "$1" in
bash)
@@ -134,6 +156,42 @@ case "$1" in
taillog)
run_it -it --rm
;;
+ 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 $@
+ else
+ echo "For local use, you need to have 'aaf-cadi-aaf-$VERSION*-full.jar' (or newer)"
+ fi
+ ;;
+ local)
+ shift
+ CMD="$1"
+ if [ -z "$2" ]; then
+ CMD="$CMD $APP_FQI $APP_FQDN"
+ else
+ if [ "-" = "$2" ]; then
+ CMD="$CMD $APP_FQI"
+ else
+ CMD="$CMD $2"
+ fi
+ if [ "-" = "$3" ]; then
+ CMD="$CMD $APP_FQDN"
+ else
+ CMD="$CMD $3"
+ fi
+ fi
+ 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
+ else
+ echo "For local use, you need to have 'aaf-cadi-aaf-$VERSION*-full.jar' (or newer)"
+ fi
+ ;;
*)
run_it --rm
;;