Update dpush for layer removal 17/91617/1
authorInstrumental <jonathan.gathman@att.com>
Wed, 17 Jul 2019 16:50:16 +0000 (11:50 -0500)
committerInstrumental <jonathan.gathman@att.com>
Wed, 17 Jul 2019 16:50:28 +0000 (11:50 -0500)
Issue-ID: AAF-873
Change-Id: If35a6d3ee1432032d440385ab21431b1f68c761d
Signed-off-by: Instrumental <jonathan.gathman@att.com>
auth/docker/Dockerfile.hello
auth/docker/dbuild.sh
auth/docker/dpush.sh
auth/helm/aaf-hello/templates/aaf-hello.yaml

index 2002822..2378bae 100644 (file)
@@ -17,7 +17,7 @@
 #  limitations under the License.
 #  ============LICENSE_END====================================================
 #
-FROM ${DOCKER_REPOSITORY}/onap/aaf/aaf_core:${AAF_VERSION}
+FROM ${DOCKER_REPOSITORY}/onap/aaf/aaf_base:${AAF_VERSION}
 MAINTAINER AAF Team, AT&T 2018
 ENV VERSION=${AAF_VERSION}
 
@@ -25,11 +25,16 @@ LABEL description="aaf_hello"
 LABEL version=${AAF_VERSION}
  
 COPY bin/pod_wait.sh /opt/app/aaf/bin/
+COPY lib /opt/app/aaf/lib
 COPY etc /opt/app/osaaf/etc
-RUN 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
+COPY bin/hello /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 []
index 3ecdd11..3b76454 100755 (executable)
@@ -121,6 +121,23 @@ $DOCKER tag ${ORG}/${PROJECT}/aaf_core:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${
 $DOCKER tag ${ORG}/${PROJECT}/aaf_core:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_core:latest
 rm aaf_${VERSION}/Dockerfile
 
+########
+# Fourth, do Hello
+# Apply currrent Properties to Docker file, and put in place.
+cd -
+sed -e 's/${AAF_VERSION}/'${VERSION}'/g' \
+    -e 's/${DOCKER_REPOSITORY}/'${DOCKER_REPOSITORY}'/g' \
+    -e 's/${DUSER}/'${DUSER}'/g' \
+    Dockerfile.hello >../aaf_${VERSION}/Dockerfile
+cd ..
+echo "#######"
+pwd
+echo "#######"
+cp -Rf sample/etc aaf_${VERSION}
+$DOCKER build -t ${ORG}/${PROJECT}/aaf_hello:${VERSION} aaf_${VERSION}
+$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
index 380f6aa..50113b9 100644 (file)
@@ -24,7 +24,7 @@
 . ./d.props
 DOCKER=${DOCKER:=docker}
 
-AAF_COMPONENTS="config agent base core cass $(cat components) "
+AAF_COMPONENTS="config agent base core cass hello "
 
 for AAF_COMPONENT in ${AAF_COMPONENTS}; do
         # docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${OLD_VERSION}
index e19b599..896ff35 100644 (file)
@@ -102,7 +102,7 @@ spec:
       - name: aaf-hello
         image: {{ .Values.image.repository }}onap/aaf/aaf_hello:{{ .Values.image.version }}
         imagePullPolicy: IfNotPresent
-        command: ["/bin/bash","-c","cd /opt/app/aaf && exec bin/hello"]
+        command: ["/bin/bash","-c","cd /opt/app/aaf && sleep 240 && exec bin/hello"]
         volumeMounts:
         -  mountPath: "/opt/app/osaaf/local"
            name: aaf-hello-vol