diff options
Diffstat (limited to 'auth')
-rw-r--r-- | auth/auth-batch/pom.xml | 2 | ||||
-rw-r--r-- | auth/auth-cass/pom.xml | 2 | ||||
-rw-r--r-- | auth/auth-certman/pom.xml | 2 | ||||
-rw-r--r-- | auth/auth-cmd/pom.xml | 2 | ||||
-rw-r--r-- | auth/auth-core/pom.xml | 2 | ||||
-rw-r--r-- | auth/auth-deforg/pom.xml | 2 | ||||
-rw-r--r-- | auth/auth-fs/pom.xml | 2 | ||||
-rw-r--r-- | auth/auth-gui/pom.xml | 2 | ||||
-rw-r--r-- | auth/auth-hello/pom.xml | 2 | ||||
-rw-r--r-- | auth/auth-locate/pom.xml | 2 | ||||
-rw-r--r-- | auth/auth-oauth/pom.xml | 2 | ||||
-rw-r--r-- | auth/auth-service/pom.xml | 2 | ||||
-rw-r--r-- | auth/docker/Dockerfile.agent | 2 | ||||
-rw-r--r-- | auth/docker/Dockerfile.config | 4 | ||||
-rw-r--r-- | auth/docker/Dockerfile.ms | 47 | ||||
-rw-r--r-- | auth/docker/agent.sh | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | auth/docker/dbuild.sh | 104 | ||||
-rw-r--r-- | auth/docker/dstage.sh | 31 | ||||
-rw-r--r-- | auth/docker/pom.xml | 4 | ||||
-rw-r--r-- | auth/helm/aaf-hello/agent.sh | 103 | ||||
-rw-r--r-- | auth/helm/aaf-hello/templates/aaf-hello.yaml | 2 | ||||
-rw-r--r-- | auth/helm/aaf-hello/values.yaml | 5 | ||||
-rw-r--r-- | auth/helm/aaf/Chart.yaml | 2 | ||||
-rw-r--r-- | auth/helm/aaf/values.yaml | 2 | ||||
-rw-r--r-- | auth/pom.xml | 2 | ||||
-rwxr-xr-x | auth/sample/bin/client.sh | 9 |
26 files changed, 247 insertions, 96 deletions
diff --git a/auth/auth-batch/pom.xml b/auth/auth-batch/pom.xml index 6ba73e63..802538ab 100644 --- a/auth/auth-batch/pom.xml +++ b/auth/auth-batch/pom.xml @@ -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> diff --git a/auth/auth-cass/pom.xml b/auth/auth-cass/pom.xml index 628d7392..d8e25cc3 100644 --- a/auth/auth-cass/pom.xml +++ b/auth/auth-cass/pom.xml @@ -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> diff --git a/auth/auth-certman/pom.xml b/auth/auth-certman/pom.xml index a84a76ca..69465b7d 100644 --- a/auth/auth-certman/pom.xml +++ b/auth/auth-certman/pom.xml @@ -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> diff --git a/auth/auth-cmd/pom.xml b/auth/auth-cmd/pom.xml index 1a771ec4..6de09de5 100644 --- a/auth/auth-cmd/pom.xml +++ b/auth/auth-cmd/pom.xml @@ -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> diff --git a/auth/auth-core/pom.xml b/auth/auth-core/pom.xml index d471bf96..91517836 100644 --- a/auth/auth-core/pom.xml +++ b/auth/auth-core/pom.xml @@ -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> diff --git a/auth/auth-deforg/pom.xml b/auth/auth-deforg/pom.xml index 45feae19..353d4b91 100644 --- a/auth/auth-deforg/pom.xml +++ b/auth/auth-deforg/pom.xml @@ -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> diff --git a/auth/auth-fs/pom.xml b/auth/auth-fs/pom.xml index 48a19ef0..7b871267 100644 --- a/auth/auth-fs/pom.xml +++ b/auth/auth-fs/pom.xml @@ -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> diff --git a/auth/auth-gui/pom.xml b/auth/auth-gui/pom.xml index 3796116b..6b003051 100644 --- a/auth/auth-gui/pom.xml +++ b/auth/auth-gui/pom.xml @@ -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> diff --git a/auth/auth-hello/pom.xml b/auth/auth-hello/pom.xml index 31f26a38..2cb8f571 100644 --- a/auth/auth-hello/pom.xml +++ b/auth/auth-hello/pom.xml @@ -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> diff --git a/auth/auth-locate/pom.xml b/auth/auth-locate/pom.xml index 7d47bcc8..3ea432b8 100644 --- a/auth/auth-locate/pom.xml +++ b/auth/auth-locate/pom.xml @@ -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> diff --git a/auth/auth-oauth/pom.xml b/auth/auth-oauth/pom.xml index 725d8f1c..5e0c56fb 100644 --- a/auth/auth-oauth/pom.xml +++ b/auth/auth-oauth/pom.xml @@ -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> diff --git a/auth/auth-service/pom.xml b/auth/auth-service/pom.xml index ceae3e5f..63585f94 100644 --- a/auth/auth-service/pom.xml +++ b/auth/auth-service/pom.xml @@ -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> diff --git a/auth/docker/Dockerfile.agent b/auth/docker/Dockerfile.agent index 20406a46..ec5f24ea 100644 --- a/auth/docker/Dockerfile.agent +++ b/auth/docker/Dockerfile.agent @@ -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/* &&\ diff --git a/auth/docker/Dockerfile.config b/auth/docker/Dockerfile.config index 7b159d7c..4bb7a940 100644 --- a/auth/docker/Dockerfile.config +++ b/auth/docker/Dockerfile.config @@ -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 index 351c3798..00000000 --- a/auth/docker/Dockerfile.ms +++ /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", \ - diff --git a/auth/docker/agent.sh b/auth/docker/agent.sh index 32910874..575e21f9 100644 --- a/auth/docker/agent.sh +++ b/auth/docker/agent.sh @@ -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 diff --git a/auth/docker/dbuild.sh b/auth/docker/dbuild.sh index 703abc5a..0a816461 100755..100644 --- a/auth/docker/dbuild.sh +++ b/auth/docker/dbuild.sh @@ -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 index 00000000..b57a2cec --- /dev/null +++ b/auth/docker/dstage.sh @@ -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 diff --git a/auth/docker/pom.xml b/auth/docker/pom.xml index add4e964..b4d3545c 100644 --- a/auth/docker/pom.xml +++ b/auth/docker/pom.xml @@ -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 index 00000000..a622686a --- /dev/null +++ b/auth/helm/aaf-hello/agent.sh @@ -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 diff --git a/auth/helm/aaf-hello/templates/aaf-hello.yaml b/auth/helm/aaf-hello/templates/aaf-hello.yaml index 7bf35cde..3ff9a576 100644 --- a/auth/helm/aaf-hello/templates/aaf-hello.yaml +++ b/auth/helm/aaf-hello/templates/aaf-hello.yaml @@ -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" diff --git a/auth/helm/aaf-hello/values.yaml b/auth/helm/aaf-hello/values.yaml index da37ff63..5a3931c2 100644 --- a/auth/helm/aaf-hello/values.yaml +++ b/auth/helm/aaf-hello/values.yaml @@ -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 diff --git a/auth/helm/aaf/Chart.yaml b/auth/helm/aaf/Chart.yaml index 3f370a55..f83041e9 100644 --- a/auth/helm/aaf/Chart.yaml +++ b/auth/helm/aaf/Chart.yaml @@ -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 diff --git a/auth/helm/aaf/values.yaml b/auth/helm/aaf/values.yaml index 4bb2037f..b320d9c8 100644 --- a/auth/helm/aaf/values.yaml +++ b/auth/helm/aaf/values.yaml @@ -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 diff --git a/auth/pom.xml b/auth/pom.xml index 2b888cbc..27abccdb 100644 --- a/auth/pom.xml +++ b/auth/pom.xml @@ -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> diff --git a/auth/sample/bin/client.sh b/auth/sample/bin/client.sh index 0c0d97cb..4768d81c 100755 --- a/auth/sample/bin/client.sh +++ b/auth/sample/bin/client.sh @@ -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" |