diff options
Diffstat (limited to 'auth/docker')
-rw-r--r-- | auth/docker/.gitignore | 1 | ||||
-rw-r--r-- | auth/docker/Dockerfile.core | 2 | ||||
-rw-r--r-- | auth/docker/Dockerfile.ms | 2 | ||||
-rw-r--r-- | auth/docker/agent.sh | 9 | ||||
-rw-r--r-- | auth/docker/cass.props.init | 3 | ||||
-rw-r--r-- | auth/docker/d.props.init | 1 | ||||
-rwxr-xr-x | auth/docker/dbuild.sh | 4 | ||||
-rw-r--r-- | auth/docker/dpush.sh | 7 | ||||
-rw-r--r-- | auth/docker/drun.sh | 9 |
9 files changed, 29 insertions, 9 deletions
diff --git a/auth/docker/.gitignore b/auth/docker/.gitignore index f644e05c..47b48da5 100644 --- a/auth/docker/.gitignore +++ b/auth/docker/.gitignore @@ -1,3 +1,4 @@ /local /d.props /aaf.props +/cass.props diff --git a/auth/docker/Dockerfile.core b/auth/docker/Dockerfile.core index c4e8a461..b54dce77 100644 --- a/auth/docker/Dockerfile.core +++ b/auth/docker/Dockerfile.core @@ -7,4 +7,6 @@ LABEL version=${AAF_VERSION} COPY lib /opt/app/aaf/lib COPY bin /opt/app/aaf/bin +COPY theme /opt/app/aaf/theme + diff --git a/auth/docker/Dockerfile.ms b/auth/docker/Dockerfile.ms index b8ef6d9a..121bd06c 100644 --- a/auth/docker/Dockerfile.ms +++ b/auth/docker/Dockerfile.ms @@ -5,8 +5,6 @@ ENV VERSION=${AAF_VERSION} LABEL description="aaf_${AAF_COMPONENT}" LABEL version=${AAF_VERSION} -COPY theme /opt/app/aaf/theme - CMD ["/bin/bash","-c","/opt/app/aaf/bin/${AAF_COMPONENT}"] # For Debugging installation diff --git a/auth/docker/agent.sh b/auth/docker/agent.sh index 4aba092c..1ca12eb8 100644 --- a/auth/docker/agent.sh +++ b/auth/docker/agent.sh @@ -9,10 +9,15 @@ fi . ./aaf.props -for V in VERSION AAF_FQDN AAF_FQDN_IP DEPLOY_FQI APP_FQDN APP_FQI VOLUME DRIVER LATITUDE LONGITUDE; do + +for V in VERSION DOCKER_REPOSITORY AAF_FQDN AAF_FQDN_IP DEPLOY_FQI APP_FQDN APP_FQI VOLUME DRIVER LATITUDE LONGITUDE; do if [ "$(grep $V ./aaf.props)" = "" ]; then unset DEF case $V in + DOCKER_REPOSITORY) + PROMPT="Docker Repo" + DEF=nexus3.onap.org:10003 + ;; AAF_FQDN) PROMPT="AAF's FQDN";; DEPLOY_FQI) PROMPT="Deployer's FQI";; AAF_FQDN_IP) @@ -66,5 +71,5 @@ docker run \ --env LATITUDE=${LATITUDE} \ --env LONGITUDE=${LONGITUDE} \ --name aaf_agent_$USER \ - onap/aaf/aaf_agent:$VERSION \ + $DOCKER_REPOSITORY/onap/aaf/aaf_agent:$VERSION \ /bin/bash "$@" diff --git a/auth/docker/cass.props.init b/auth/docker/cass.props.init new file mode 100644 index 00000000..fc9bab43 --- /dev/null +++ b/auth/docker/cass.props.init @@ -0,0 +1,3 @@ +#!/bin/bash + +CASS_HOST=cass.aaf.osaaf.org:<Cass IP> diff --git a/auth/docker/d.props.init b/auth/docker/d.props.init index b0ba63d8..54a83b71 100644 --- a/auth/docker/d.props.init +++ b/auth/docker/d.props.init @@ -8,7 +8,6 @@ CONF_ROOT_DIR=/opt/app/osaaf # Local Env info HOSTNAME=aaf.osaaf.org HOST_IP= -CASS_HOST=cass.aaf.osaaf.org:<Cass IP> # AAF Machine info AAF_ENV=DEV diff --git a/auth/docker/dbuild.sh b/auth/docker/dbuild.sh index da0b9b64..517afe02 100755 --- a/auth/docker/dbuild.sh +++ b/auth/docker/dbuild.sh @@ -16,10 +16,12 @@ cp ../cadi/aaf/target/aaf-cadi-aaf-${VERSION}-full.jar sample/bin # AAF Config image (for AAF itself) sed -e 's/${AAF_VERSION}/'${VERSION}'/g' -e 's/${AAF_COMPONENT}/'${AAF_COMPONENT}'/g' docker/Dockerfile.config > sample/Dockerfile docker build -t ${ORG}/${PROJECT}/aaf_config:${VERSION} sample +docker tag ${ORG}/${PROJECT}/aaf_config:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_config:${VERSION} # AAF Agent Image (for Clients) sed -e 's/${AAF_VERSION}/'${VERSION}'/g' -e 's/${AAF_COMPONENT}/'${AAF_COMPONENT}'/g' docker/Dockerfile.client > sample/Dockerfile docker build -t ${ORG}/${PROJECT}/aaf_agent:${VERSION} sample +docker tag ${ORG}/${PROJECT}/aaf_agent:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_agent:${VERSION} # Clean up rm sample/Dockerfile sample/bin/aaf-cadi-aaf-${VERSION}-full.jar @@ -31,6 +33,7 @@ echo Building aaf_$AAF_COMPONENT... sed -e 's/${AAF_VERSION}/'${VERSION}'/g' -e 's/${AAF_COMPONENT}/'${AAF_COMPONENT}'/g' Dockerfile.core >../aaf_${VERSION}/Dockerfile cd .. docker build -t ${ORG}/${PROJECT}/aaf_core:${VERSION} aaf_${VERSION} +docker tag ${ORG}/${PROJECT}/aaf_core:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_core:${VERSION} rm aaf_${VERSION}/Dockerfile cd - @@ -45,6 +48,7 @@ for AAF_COMPONENT in ${AAF_COMPONENTS}; do sed -e 's/${AAF_VERSION}/'${VERSION}'/g' -e 's/${AAF_COMPONENT}/'${AAF_COMPONENT}'/g' Dockerfile.ms >../aaf_${VERSION}/Dockerfile cd .. docker build -t ${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} aaf_${VERSION} + docker tag ${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} rm aaf_${VERSION}/Dockerfile cd - done diff --git a/auth/docker/dpush.sh b/auth/docker/dpush.sh index 761ae2a8..0cfd1fc1 100644 --- a/auth/docker/dpush.sh +++ b/auth/docker/dpush.sh @@ -5,14 +5,13 @@ . ./d.props if ["$1" == ""]; then - AAF_COMPONENTS=`ls ../aaf_*HOT/bin | grep -v '\.'` + AAF_COMPONENTS="config agent core `ls ../aaf_*HOT/bin | grep -v '\.'`" else AAF_COMPONENTS=$1 fi for AAF_COMPONENT in ${AAF_COMPONENTS}; do - docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${OLD_VERSION} + # docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${OLD_VERSION} docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} - docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${NEW_VERSION} - + # docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${NEW_VERSION} done diff --git a/auth/docker/drun.sh b/auth/docker/drun.sh index c62adfc2..8cedbcc4 100644 --- a/auth/docker/drun.sh +++ b/auth/docker/drun.sh @@ -2,6 +2,15 @@ # Pull in Variables from d.props . ./d.props +# Only need Cassandra Link Info when initializing the container. +if [ ! -e ./cass.props ]; then + cp cass.props.init cass.props + echo "Edit appropriate Cassandra Link Info into cass.props" + exit +fi + +. ./cass.props + if [ "$1" == "" ]; then AAF_COMPONENTS=$(ls -r ../aaf_${VERSION}/bin | grep -v '\.') else |