Merge "Add junits to batch & cass modules"
authorJonathan Gathman <jonathan.gathman@att.com>
Tue, 6 Aug 2019 23:11:02 +0000 (23:11 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 6 Aug 2019 23:11:02 +0000 (23:11 +0000)
41 files changed:
auth-client/pom.xml
auth/auth-batch/pom.xml
auth/auth-cass/pom.xml
auth/auth-certman/pom.xml
auth/auth-cmd/pom.xml
auth/auth-core/pom.xml
auth/auth-deforg/pom.xml
auth/auth-fs/pom.xml
auth/auth-gui/pom.xml
auth/auth-hello/pom.xml
auth/auth-locate/pom.xml
auth/auth-oauth/pom.xml
auth/auth-service/pom.xml
auth/docker/Dockerfile.agent
auth/docker/Dockerfile.config
auth/docker/Dockerfile.ms [deleted file]
auth/docker/agent.sh
auth/docker/dbuild.sh [changed mode: 0755->0644]
auth/docker/dstage.sh [new file with mode: 0644]
auth/docker/pom.xml
auth/helm/aaf-hello/agent.sh [new file with mode: 0644]
auth/helm/aaf-hello/templates/aaf-hello.yaml
auth/helm/aaf-hello/values.yaml
auth/helm/aaf/Chart.yaml
auth/helm/aaf/values.yaml
auth/pom.xml
auth/sample/bin/client.sh
cadi/aaf/pom.xml
cadi/client/pom.xml
cadi/core/pom.xml
cadi/oauth-enduser/pom.xml
cadi/pom.xml
cadi/servlet-sample/pom.xml
misc/env/pom.xml
misc/log4j/pom.xml
misc/pom.xml
misc/rosetta/pom.xml
misc/xgen/pom.xml
pom.xml
releases/2.1.15.yaml
version.properties

index 49f8d8d..c404ab1 100644 (file)
@@ -26,7 +26,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>parent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
     </parent>
 
     <artifactId>aaf-auth-client</artifactId>
index 6ba73e6..802538a 100644 (file)
@@ -25,7 +25,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>authparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
index 628d739..d8e25cc 100644 (file)
@@ -17,7 +17,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>authparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
index a84a76c..69465b7 100644 (file)
@@ -20,7 +20,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>authparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
index 1a771ec..6de09de 100644 (file)
@@ -18,7 +18,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>authparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
index d471bf9..9151783 100644 (file)
@@ -25,7 +25,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>authparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
index 45feae1..353d4b9 100644 (file)
@@ -26,7 +26,7 @@
         <artifactId>authparent</artifactId>
         <relativePath>../pom.xml</relativePath>
         <groupId>org.onap.aaf.authz</groupId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
     </parent>
 
     <artifactId>aaf-auth-deforg</artifactId>
index 48a19ef..7b87126 100644 (file)
@@ -17,7 +17,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>authparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
index 3796116..6b00305 100644 (file)
@@ -17,7 +17,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>authparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
index 31f26a3..2cb8f57 100644 (file)
@@ -17,7 +17,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>authparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
index 7d47bcc..3ea432b 100644 (file)
@@ -17,7 +17,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>authparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
index 725d8f1..5e0c56f 100644 (file)
@@ -17,7 +17,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>authparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
index ceae3e5..63585f9 100644 (file)
@@ -17,7 +17,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>authparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
index 20406a4..ec5f24e 100644 (file)
@@ -26,7 +26,7 @@ LABEL version=${AAF_VERSION}
 
 COPY bin/client.sh /opt/app/aaf_config/bin/agent.sh
 COPY bin/pod_wait.sh /opt/app/aaf_config/bin/pod_wait.sh
-COPY bin/aaf-cadi-aaf-${AAF_VERSION}-full.jar /opt/app/aaf_config/bin/
+COPY bin/aaf-cadi-aaf-${JAR_VERSION}-full.jar /opt/app/aaf_config/bin/
 COPY bin/aaf-cadi-servlet-sample-*-sample.jar /opt/app/aaf_config/bin/
 COPY cert/*trust*.b64 /opt/app/aaf_config/cert/
 RUN chmod 755 /opt/app/aaf_config/bin/* &&\
index 7b159d7..4bb7a94 100644 (file)
@@ -33,8 +33,8 @@ COPY public /opt/app/aaf_config/public
 COPY CA /opt/app/aaf_config/CA
 COPY bin/service.sh /opt/app/aaf_config/bin/agent.sh
 COPY bin/pod_wait.sh /opt/app/aaf_config/bin/pod_wait.sh
-COPY bin/aaf-auth-cmd-${AAF_VERSION}-full.jar /opt/app/aaf_config/bin/
-COPY bin/aaf-auth-batch-${AAF_VERSION}-full.jar /opt/app/aaf_config/bin/
+COPY bin/aaf-auth-cmd-${JAR_VERSION}-full.jar /opt/app/aaf_config/bin/
+COPY bin/aaf-auth-batch-${JAR_VERSION}-full.jar /opt/app/aaf_config/bin/
 
 RUN mkdir -p /opt/app/osaaf &&\
     chmod 755 /opt/app/aaf_config/bin/*.sh &&\
diff --git a/auth/docker/Dockerfile.ms b/auth/docker/Dockerfile.ms
deleted file mode 100644 (file)
index 351c379..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#########
-#  ============LICENSE_START====================================================
-#  org.onap.aaf
-#  ===========================================================================
-#  Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
-#  ===========================================================================
-#  Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-#  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-#  ============LICENSE_END====================================================
-#
-FROM ${DOCKER_REPOSITORY}/onap/aaf/aaf_core:${AAF_VERSION}
-MAINTAINER AAF Team, AT&T 2018
-ENV VERSION=${AAF_VERSION}
-
-LABEL description="aaf_${AAF_COMPONENT}"
-LABEL version=${AAF_VERSION}
-COPY bin/pod_wait.sh /opt/app/aaf/bin/
-RUN mkdir -p /opt/app/osaaf &&\
-    mkdir -p /opt/app/aaf/status &&\
-    chmod 755 /opt/app/aaf/bin/* &&\
-    if [ -n "${DUSER}" ]; then  chown ${DUSER}:${DUSER} /opt/app/aaf/status \
-    && chown ${DUSER}:${DUSER} /opt/app/osaaf \
-    && chown -R ${DUSER}:${DUSER} /opt/app/aaf; fi
-
-#CMD ["bash","-c","cd /opt/app/aaf;bin/${AAF_COMPONENT}"]
-CMD []
-
-# For Debugging installation
-# CMD ["/bin/bash","-c","pwd;cd /opt/app/osaaf;find /opt/app/osaaf -depth;df -k; cat /opt/app/aaf/${AAF_COMPONENT}/bin/${AAF_COMPONENT};cat /etc/hosts;/opt/app/aaf/${AAF_COMPONENT}/bin/${AAF_COMPONENT}"]
-# Java Debugging VM Args
-#     "-Xdebug",\
-#     "-Xnoagent",\
-#     "-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000",\
-
-# TLS Debugging VM Args
-#     "-Djavax.net.debug","ssl", \
-     
index 3291087..575e21f 100644 (file)
@@ -28,7 +28,7 @@ fi
 . ./aaf.props
 
 DOCKER=${DOCKER:=docker}
-CADI_VERSION=${CADI_VERSION:=2.1.15-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
old mode 100755 (executable)
new mode 100644 (file)
index 703abc5..0a81646
@@ -1,4 +1,4 @@
-#!/bin/bash
+
 #########
 #  ============LICENSE_START====================================================
 #  org.onap.aaf
@@ -28,6 +28,9 @@ fi
 
 . ./d.props
 
+# Remove "SNAPSHOT" from AAF Jars in Containers
+JAR_VERSION=${VERSION/-SNAPSHOT/}
+
 # process input. originally, an optional positional parameter is used to designate a component.
 # A flagged parameter has been added to optionally indicate docker pull registry. Ideally, options
 # would be flagged but we're avoiding ripple effect of changing original usage
@@ -53,6 +56,7 @@ DOCKER=${DOCKER:=docker}
 
 echo "Building Containers for aaf components, version $VERSION"
 # AAF_cass now needs a version...
+echo "### Build Cass"
 cd ../auth-cass/docker
 pwd
 bash ./dbuild.sh $DOCKER_PULL_REGISTRY
@@ -60,7 +64,9 @@ cd -
 
 ########
 # First, build a AAF Base version - set the core image, etc
+echo "### Build Base"
 sed -e 's/${AAF_VERSION}/'${VERSION}'/g' \
+    -e 's/${JAR_VERSION}/'${JAR_VERSION}'/g' \
     -e 's/${DUSER}/'${DUSER}'/g' \
     -e 's/${REGISTRY}/'${DOCKER_PULL_REGISTRY}'/g' \
     Dockerfile.base > Dockerfile
@@ -69,18 +75,33 @@ $DOCKER tag ${ORG}/${PROJECT}/aaf_base:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${
 $DOCKER tag ${ORG}/${PROJECT}/aaf_base:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_base:latest
 rm Dockerfile
 
+function SCP() {
+  SANS=${1/-SNAPSHOT/}
+  echo $1 = $SANS
+  if [ -e $SANS ]; then
+    cp $SANS $2
+  else 
+
+    ln $1 $SANS
+    cp $SANS $2
+    rm $SANS
+  fi
+}
+
 ########
 # Second, Create the AAF Config (Security) Images
 cd ..
 # Note: only 2 jars each in Agent/Config
-cp auth-cmd/target/aaf-auth-cmd-$VERSION-full.jar sample/bin
-cp auth-batch/target/aaf-auth-batch-$VERSION-full.jar sample/bin
-cp ../cadi/aaf/target/aaf-cadi-aaf-${VERSION}-full.jar sample/bin
-cp ../cadi/servlet-sample/target/aaf-cadi-servlet-sample-${VERSION}-sample.jar sample/bin
+SCP auth-cmd/target/aaf-auth-cmd-$VERSION-full.jar sample/bin
+SCP auth-batch/target/aaf-auth-batch-$VERSION-full.jar sample/bin
+SCP ../cadi/aaf/target/aaf-cadi-aaf-${VERSION}-full.jar sample/bin
+SCP ../cadi/servlet-sample/target/aaf-cadi-servlet-sample-${VERSION}-sample.jar sample/bin
 cp -Rf ../conf/CA sample
 
 # AAF Config image (for AAF itself)
+echo "### Build Config"
 sed -e 's/${AAF_VERSION}/'${VERSION}'/g' \
+    -e 's/${JAR_VERSION}/'${JAR_VERSION}'/g' \
     -e 's/${AAF_COMPONENT}/'${AAF_COMPONENT}'/g' \
     -e 's/${DOCKER_REPOSITORY}/'${DOCKER_REPOSITORY}'/g' \
     -e 's/${DUSER}/'${DUSER}'/g' \
@@ -91,7 +112,9 @@ $DOCKER tag ${ORG}/${PROJECT}/aaf_config:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/
 
 
 # AAF Agent Image (for Clients)
+echo "### Build Agent"
 sed -e 's/${AAF_VERSION}/'${VERSION}'/g' \
+    -e 's/${JAR_VERSION}/'${JAR_VERSION}'/g' \
     -e 's/${AAF_COMPONENT}/'${AAF_COMPONENT}'/g' \
     -e 's/${DOCKER_REPOSITORY}/'${DOCKER_REPOSITORY}'/g' \
     -e 's/${DUSER}/'${DUSER}'/g' \
@@ -101,49 +124,84 @@ $DOCKER tag ${ORG}/${PROJECT}/aaf_agent:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/$
 $DOCKER tag ${ORG}/${PROJECT}/aaf_agent:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_agent:latest
 
 # Clean up 
-rm sample/Dockerfile sample/bin/aaf-*-${VERSION}*.jar 
+rm sample/Dockerfile sample/bin/aaf-*-*.jar 
 rm -Rf sample/CA
 cd -
 
+
+########
+# Third Copy AAF Executables to a BUILD Directory, for easy Cleanup
+echo "### Copy to aaf_DBUILD"
+if [ -e "../aaf_$VERSION" ]; then
+  cp -Rf ../aaf_$VERSION ../aaf_DBUILD
+elif [ -e "../aaf_$JAR_VERSION" ]; then
+  cp -Rf ../aaf_$JAR_VERSION ../aaf_DBUILD
+else
+  echo "ERROR: No AAF Built.  use Maven"
+  exit
+fi
+if [ ! "$VERSION" = "$JAR_VERSION" ]; then 
+  START_DIR=$(pwd)
+  # Convert SNAPSHOT issues
+  cp -Rf ../aaf_$VERSION ../aaf_DBUILD
+  cd ../aaf_DBUILD/lib
+  # If Built Jars are "SNAPSHOT", convert to NON SNAPSHOT
+  for J in $(ls *-SNAPSHOT*); do mv $J ${J/-SNAPSHOT/}; done
+  cd ../bin
+  rm *.bat
+  for S in $(ls); do
+     sed -e "/$VERSION/s/$VERSION/$JAR_VERSION/g" $S > tmp
+     mv tmp $S
+  done
+  cd ${START_DIR}
+fi
+
 ########
 # Third, build a core Docker Image to be used for all AAF Components
-echo Building aaf_$AAF_COMPONENT...
-cp ../sample/bin/pod_wait.sh  ../aaf_${VERSION}/bin
+cp ../sample/bin/pod_wait.sh  ../aaf_DBUILD/bin
 # Apply currrent Properties to Docker file, and put in place.
 sed -e 's/${AAF_VERSION}/'${VERSION}'/g' \
+    -e 's/${JAR_VERSION}/'${JAR_VERSION}'/g' \
     -e 's/${AAF_COMPONENT}/'${AAF_COMPONENT}'/g' \
     -e 's/${DOCKER_REPOSITORY}/'${DOCKER_REPOSITORY}'/g' \
     -e 's/${DUSER}/'${DUSER}'/g' \
-    Dockerfile.core >../aaf_${VERSION}/Dockerfile
+    Dockerfile.core >../aaf_DBUILD/Dockerfile
 cd ..
-echo "#######"
-pwd
-echo "#######"
-$DOCKER build -t ${ORG}/${PROJECT}/aaf_core:${VERSION} aaf_${VERSION}
+
+echo "### Building Core"
+# Don't need "Hello" App in core
+mv aaf_DBUILD/lib/aaf-auth-hello-${JAR_VERSION}* /tmp
+
+$DOCKER build -t ${ORG}/${PROJECT}/aaf_core:${VERSION} aaf_DBUILD
 $DOCKER tag ${ORG}/${PROJECT}/aaf_core:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_core:${VERSION}
 $DOCKER tag ${ORG}/${PROJECT}/aaf_core:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_core:latest
-rm aaf_${VERSION}/Dockerfile
+rm aaf_DBUILD/Dockerfile
+mv /tmp/aaf-auth-hello-${JAR_VERSION}* aaf_DBUILD/lib
 
 ########
 # Fourth, do Hello
 # Apply currrent Properties to Docker file, and put in place.
+echo "### Building Hello"
 cd -
 sed -e 's/${AAF_VERSION}/'${VERSION}'/g' \
+    -e 's/${JAR_VERSION}/'${JAR_VERSION}'/g' \
     -e 's/${DOCKER_REPOSITORY}/'${DOCKER_REPOSITORY}'/g' \
     -e 's/${DUSER}/'${DUSER}'/g' \
-    Dockerfile.hello >../aaf_${VERSION}/Dockerfile
+    Dockerfile.hello >../aaf_DBUILD/Dockerfile
 cd ..
-echo "#######"
-pwd
-echo "#######"
-cp -Rf sample/etc aaf_${VERSION}
-cp -Rf sample/logs aaf_${VERSION}
-$DOCKER build -t ${ORG}/${PROJECT}/aaf_hello:${VERSION} aaf_${VERSION}
+
+cp -Rf sample/etc aaf_DBUILD
+cp -Rf sample/logs aaf_DBUILD
+
+for C in cass certman cmd deforg fs gui locate oauth service; do
+   rm aaf_DBUILD/lib/aaf-auth-$C-*
+done
+
+$DOCKER build -t ${ORG}/${PROJECT}/aaf_hello:${VERSION} aaf_DBUILD
 $DOCKER tag ${ORG}/${PROJECT}/aaf_hello:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_hello:${VERSION}
 $DOCKER tag ${ORG}/${PROJECT}/aaf_hello:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_hello:latest
-rm -Rf aaf_${VERSION}/Dockerfile aaf_${VERSION}/etc
 
 # Final cleanup
-rm aaf_${VERSION}/bin/pod_wait.sh
+rm -Rf aaf_DBUILD
 
 cd -
diff --git a/auth/docker/dstage.sh b/auth/docker/dstage.sh
new file mode 100644 (file)
index 0000000..b57a2ce
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/bash
+#########
+#  ============LICENSE_START====================================================
+#  org.onap.aaf
+#  ===========================================================================
+#  Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+#  ===========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END====================================================
+#
+# Docker push Script.  Reads all the components generated by install, on per-version basis
+#
+# Pull in Variables from d.props
+. ./d.props
+DOCKER=${DOCKER:=docker}
+
+AAF_COMPONENTS="config agent base core cass hello "
+
+for AAF_COMPONENT in ${AAF_COMPONENTS}; do
+        $DOCKER push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION}
+done
index add4e96..b4d3545 100644 (file)
@@ -25,7 +25,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>authparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -53,7 +53,7 @@
                         <configuration>
                             <skip>false</skip>
                             <executable>bash</executable>
-                            <commandlineArgs>-c "pwd; bash dbuild.sh"</commandlineArgs>
+                            <commandlineArgs>-c "pwd; bash dbuild.sh;bash dstage.sh"</commandlineArgs>
                         </configuration>
                     </plugin>
                 </plugins>
diff --git a/auth/helm/aaf-hello/agent.sh b/auth/helm/aaf-hello/agent.sh
new file mode 100644 (file)
index 0000000..a622686
--- /dev/null
@@ -0,0 +1,103 @@
+function prop () {
+   echo $(grep " $1" values.yaml | grep -v "#"| sed -e "s/.*$1: *//")
+}
+
+REPO=$(prop repository)
+if [ -z "$REPO" ]; then
+  REPO="nexus3.onap.org:10001"
+fi
+
+if [ "\"\"" = "$REPO" ]; then
+    IMAGE="$(prop agentImage)"
+else 
+    IMAGE="$REPO/$(prop agentImage)"
+fi
+
+APP_FQI=$(prop fqi)
+FQDN=$(prop fqdn)
+LATITUDE=$(prop cadi_latitude)
+LONGITUDE=$(prop cadi_longitude)
+DEPLOY_FQI=$(prop deploy_fqi)
+echo "Enter Password for Deployer: $DEPLOY_FQI"
+#read DEPLOY_PASSWORD
+#if [ -z "$DEPLOY_PASSWORD" ]; then
+  # ONAP TEST Password.  DO NOT PUT REAL PASSWORDS HERE!!!
+  DEPLOY_PASSWORD='"demo123456!"'
+#fi
+DEPLOYMENT=$(kubectl -n onap get deployments | grep ${FQDN//\"} | cut -f1 -d' ')
+if [ -z "$DEPLOYMENT" ]; then
+  DEPLOYMENT=$FQDN
+fi
+echo Running from $IMAGE for Deployment $DEPLOYMENT
+
+kubectl -n onap run -it --rm aaf-agent-$USER --image=$IMAGE --overrides='
+{
+    "spec": {
+        "containers": [
+            {
+               "name": "aaf-agent-'$USER'",
+                "image": "'$IMAGE'",
+                "imagePullPolicy": "IfNotPresent",
+                "command": [
+                   "bash",
+                   "-c",
+                   "/opt/app/aaf_config/bin/agent.sh && cd /opt/app/osaaf/local && exec bash"
+                 ],
+                "env": [
+                   {
+                     "name": "APP_FQI",
+                     "value": '$APP_FQI'
+                   },{
+                     "name": "APP_FQDN",
+                     "value": '$FQDN'
+                   },{
+                     "name": "DEPLOY_FQI",
+                     "value": '$DEPLOY_FQI'
+                   },{
+                     "name": "DEPLOY_PASSWORD",
+                     "value": '$DEPLOY_PASSWORD'
+                   },{
+                     "name": "aaf_locate_url",
+                     "value": "https://aaf-locate.onap:8095"
+                   },{
+                     "name": "aaf_locator_container",
+                     "value": "helm"
+                   },{
+                     "name": "aaf_locator_container_ns",
+                     "value": "onap"
+                   },{
+                     "name": "aaf_locator_public_fqdn",
+                     "value": "aaf.osaaf.org"
+                   },{
+                     "name": "aaf_locator_fqdn",
+                     "value": '$FQDN'
+                   },{
+                     "name": "cadi_latitude",
+                     "value": '$LATITUDE'
+                   },{
+                     "name": "cadi_longitude",
+                     "value": '$LONGITUDE'
+                   }
+                ],
+                "stdin": true,
+                "stdinOnce": true,
+                "tty": true,
+                "volumeMounts": [
+                    {
+                        "mountPath": "/opt/app/osaaf",
+                        "name": "'${FQDN//\"}'-vol"
+                    }
+                ]
+            }
+        ],
+        "volumes": [
+            {
+                "name": "'${FQDN//\"}'-vol",
+                "persistentVolumeClaim": {
+                    "claimName": "'${DEPLOYMENT//\"}'-pvc"
+                }
+            }
+         ]
+   }
+}
+' --restart=Never  -- bash
index 7bf35cd..3ff9a57 100644 (file)
@@ -57,7 +57,7 @@ spec:
             claimName: aaf-hello-pvc
       initContainers:
         - name: aaf-hello-config
-          image: "{{ .Values.image.repository }}{{ .Values.service.initImage }}"
+          image: "{{ .Values.image.repository }}{{ .Values.service.agentImage }}"
           imagePullPolicy: IfNotPresent
           volumeMounts:
             - mountPath: "/opt/app/osaaf"
index da37ff6..5a3931c 100644 (file)
@@ -37,8 +37,8 @@ image:
   # repository: localhost:5000/
 
 service:
-  initImage: onap/aaf/aaf_agent:2.1.15-SNAPSHOT
-  image: onap/aaf/aaf_hello:2.1.15-SNAPSHOT
+  agentImage: onap/aaf/aaf_agent:2.1.16-SNAPSHOT
+  image: onap/aaf/aaf_hello:2.1.16-SNAPSHOT
   app_ns: "org.osaaf.aaf"
   fqi: "aaf@aaf.osaaf.org"
   fqdn: "aaf-hello"
@@ -47,6 +47,7 @@ service:
   public_port: "30086"
   cadi_latitude: "38.0"
   cadi_longitude: "-72.0"
+  deploy_fqi: "deployer@people.osaaf.org"
 
 persistence: 
   # Where on local disk to store
index 3f370a5..f83041e 100644 (file)
@@ -22,4 +22,4 @@ apiVersion: v1
 appVersion: "1.0"
 description: AAF Helm Chart
 name: aaf
-version: 2.1.15-SNAPSHOT
+version: 2.1.16-SNAPSHOT
index 4bb2037..b320d9c 100644 (file)
@@ -104,7 +104,7 @@ image:
   # When using Docker Repo, add, and include trailing "/"
   # repository: nexus3.onap.org:10003/
   # repository: localhost:5000/
-  version: 2.1.15-SNAPSHOT
+  version: 2.1.16-SNAPSHOT
 
 resources: {}
   # We usually recommend not to specify default resources and to leave this as a conscious
index 2b888cb..27abccd 100644 (file)
@@ -26,7 +26,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>parent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
     </parent>
     <artifactId>authparent</artifactId>
     <name>AAF Auth Parent</name>
index 0c0d97c..4768d81 100755 (executable)
@@ -70,10 +70,11 @@ fi
 if [ ! -e "$DOT_AAF/keyfile" ]; then
     $JAVA_AGENT cadi keygen $DOT_AAF/keyfile
     chmod 400 $DOT_AAF/keyfile
+    echo "cadi_keyfile=$DOT_AAF/keyfile" > ${SSO}
 
     # Add Deployer Creds to Root's SSO
     DEPLOY_FQI="${DEPLOY_FQI:=$app_id}"
-    echo "aaf_id=${DEPLOY_FQI}" > ${SSO}
+    echo "aaf_id=${DEPLOY_FQI}" >> ${SSO}
     if [ ! "${DEPLOY_PASSWORD}" = "" ]; then
        echo aaf_password=enc:$(sso_encrypt ${DEPLOY_PASSWORD}) >> ${SSO}
     fi
@@ -197,9 +198,13 @@ else
             fi
         fi
         ;;
+    read)
+        echo "## Read Artifacts"
+        $JAVA_AGENT read $APP_FQI $APP_FQDN cadi_prop_files=${SSO} cadi_loglevel=INFO
+        ;;
     showpass)
         echo "## Show Passwords"
-        $JAVA_AGENT showpass $APP_FQI $APP_FQDN cadi_prop_files=${SSO}
+        $JAVA_AGENT showpass $APP_FQI $APP_FQDN cadi_prop_files=${SSO} cadi_loglevel=ERROR
         ;;
     check)
         echo "## Check Certificate"
index 07737f5..1fa4ab5 100644 (file)
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>cadiparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 2a2029c..38d5082 100644 (file)
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>cadiparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 168ae29..aa50090 100644 (file)
@@ -16,7 +16,7 @@
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>cadiparent</artifactId>
         <relativePath>..</relativePath>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
index 139ae42..efc32dd 100644 (file)
@@ -25,7 +25,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>cadiparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
     
index 3dd5d0a..9075385 100644 (file)
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>parent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
     </parent>
     <artifactId>cadiparent</artifactId>
     <name>AAF CADI Parent (Code, Access, Data, Identity)</name>
index 071fce7..7ca8aa4 100644 (file)
@@ -4,7 +4,7 @@
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>cadiparent</artifactId>
         <relativePath>..</relativePath>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <name>CADI Servlet Sample (Test Only)</name>
index a0a5f93..360b920 100644 (file)
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>miscparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 5e662f7..7bfc1bc 100644 (file)
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>miscparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index e8cb791..68e3c4b 100644 (file)
@@ -25,7 +25,7 @@
     <parent>
        <groupId>org.onap.aaf.authz</groupId>
        <artifactId>parent</artifactId>
-       <version>2.1.15-SNAPSHOT</version>
+       <version>2.1.16-SNAPSHOT</version>
     </parent>
     <artifactId>miscparent</artifactId>
     <name>AAF Misc Parent</name>
index c87c81e..9c6d003 100644 (file)
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>miscparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 1cf84cd..8315389 100644 (file)
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.onap.aaf.authz</groupId>
         <artifactId>miscparent</artifactId>
-        <version>2.1.15-SNAPSHOT</version>
+        <version>2.1.16-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/pom.xml b/pom.xml
index 9937297..1926eb0 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.onap.aaf.authz</groupId>
     <artifactId>parent</artifactId>
-    <version>2.1.15-SNAPSHOT</version>
+    <version>2.1.16-SNAPSHOT</version>
     <name>aaf-authz</name>
     <packaging>pom</packaging>
 
             </build>
 
             <modules>
+                <module>auth-client</module>
+                <module>misc</module>
+                <module>cadi</module>
+                <module>auth</module>
                 <module>auth/docker</module>
             </modules>
         </profile>
index 3283461..c0ce1f8 100644 (file)
@@ -1,4 +1,4 @@
 distribution_type: 'maven'
-version: '2.1.15'
+version: '2.1.16'
 project: 'aaf-authz'
-log_dir: 'aaf-authz-maven-stage-master/59/'
+log_dir: 'aaf-authz-maven-stage-master/63/'
index e341f3e..564f55f 100644 (file)
 # Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... )
 # because they are used in Jenkins, whose plug-in doesn't support
 
-# This TAG <version>2.1.15-SNAPSHOT</version> is here to help remember to change this file.  Keep it up to date with the following "real" entries:
+# This TAG <version>2.1.16-SNAPSHOT</version> is here to help remember to change this file.  Keep it up to date with the following "real" entries:
 major=2
 minor=1
-patch=15
+patch=16
 
 base_version=${major}.${minor}.${patch}