From bfcbea292aa9e9c3e01bddd1cba80035c85df8ec Mon Sep 17 00:00:00 2001 From: "Ikram Ikramullah (ikram@research.att.com)" Date: Mon, 12 Mar 2018 12:39:31 -0400 Subject: Moved all docker files moved to main folder Issue-ID: OPTFRA-123 Change-Id: I9334bda9ef05ed18c4e1fe35616b53e9ba128dc1 Signed-off-by: Ikram Ikramullah (ikram@research.att.com) --- build-dockers.sh | 8 ++++++++ conductor/docker/build-dockers.sh | 8 -------- conductor/docker/push-dockers.sh | 43 --------------------------------------- conductor/docker/run-dockers.sh | 7 ------- conductor/docker/stop-dockers.sh | 5 ----- push-dockers.sh | 43 +++++++++++++++++++++++++++++++++++++++ run-dockers.sh | 7 +++++++ stop-dockers.sh | 5 +++++ 8 files changed, 63 insertions(+), 63 deletions(-) create mode 100755 build-dockers.sh delete mode 100755 conductor/docker/build-dockers.sh delete mode 100755 conductor/docker/push-dockers.sh delete mode 100755 conductor/docker/run-dockers.sh delete mode 100755 conductor/docker/stop-dockers.sh create mode 100755 push-dockers.sh create mode 100755 run-dockers.sh create mode 100755 stop-dockers.sh diff --git a/build-dockers.sh b/build-dockers.sh new file mode 100755 index 0000000..37698c8 --- /dev/null +++ b/build-dockers.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# TODO (IKRAM): need to test api only first to test the docker upload chain. +# Will enable the others once api is tested +docker build -t api conductor/docker/api/ +docker build -t controller conductor/docker/controller/ +docker build -t data conductor/docker/data/ +docker build -t solver conductor/docker/solver/ +docker build -t reservation conductor/docker/reservation/ diff --git a/conductor/docker/build-dockers.sh b/conductor/docker/build-dockers.sh deleted file mode 100755 index f62a6fd..0000000 --- a/conductor/docker/build-dockers.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# TODO (IKRAM): need to test api only first to test the docker upload chain. -# Will enable the others once api is tested -docker build -t api api/ -docker build -t controller controller/ -docker build -t data data/ -docker build -t solver solver/ -docker build -t reservation reservation/ diff --git a/conductor/docker/push-dockers.sh b/conductor/docker/push-dockers.sh deleted file mode 100755 index 59cb7d4..0000000 --- a/conductor/docker/push-dockers.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -BUILD_ARGS="--no-cache" -ORG="onap" -VERSION="1.1.0" -PROJECT="optf" -IMAGE="api" -DOCKER_REPOSITORY="nexus3.onap.org:10003" -IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}" -TIMESTAMP=$(date +"%Y%m%dT%H%M%S") - -if [ $HTTP_PROXY ]; then -BUILD_ARGS+=" --build-arg HTTP_PROXY=${HTTP_PROXY}" -fi -if [ $HTTPS_PROXY ]; then - BUILD_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}" -fi - -function tag { - echo "Tagging !!!" - docker tag api "nexus3.onap.org:10003/onap/optf/api" - docker tag data "nexus3.onap.org:10003/onap/optf/data" - docker tag controller "nexus3.onap.org:10003/onap/optf/controller" - docker tag solver "nexus3.onap.org:10003/onap/optf/solver" - docker tag reservation "nexus3.onap.org:10003/onap/optf/reservation" -} - - -function push_image { - echo "Start push ${IMAGE_NAME}:latest" - - tag - docker push "nexus3.onap.org:10003/onap/optf/api" - docker push "nexus3.onap.org:10003/onap/optf/data" - docker push "nexus3.onap.org:10003/onap/optf/controller" - docker push "nexus3.onap.org:10003/onap/optf/solver" - docker push "nexus3.onap.org:10003/onap/optf/reservation" - - #docker push ${IMAGE_NAME}:latest - #push_image_tag ${IMAGE_NAME}:${VERSION}-SNAPSHOT-latest - #push_image_tag ${IMAGE_NAME}:${VERSION}-STAGING-latest - #push_image_tag ${IMAGE_NAME}:${VERSION}-STAGING-${TIMESTAMP} - } -push_image diff --git a/conductor/docker/run-dockers.sh b/conductor/docker/run-dockers.sh deleted file mode 100755 index f8ae249..0000000 --- a/conductor/docker/run-dockers.sh +++ /dev/null @@ -1,7 +0,0 @@ -### example run - provide the conductor configuration file as input to the run script -# ./run-dockers.sh /conductor.conf -docker run -v $1:/usr/local/bin/conductor.conf data & -docker run -v $1:/usr/local/bin/conductor.conf controller & -docker run -p "8091:8091" -v $1:/usr/local/bin/conductor.conf api & -docker run -v $1:/usr/local/bin/conductor.conf solver & -docker run -v $1:/usr/local/bin/conductor.conf reservation & diff --git a/conductor/docker/stop-dockers.sh b/conductor/docker/stop-dockers.sh deleted file mode 100755 index 72595e8..0000000 --- a/conductor/docker/stop-dockers.sh +++ /dev/null @@ -1,5 +0,0 @@ -docker stop $(sudo docker ps -a -q --filter ancestor=api) -docker stop $(sudo docker ps -a -q --filter ancestor=solver) -docker stop $(sudo docker ps -a -q --filter ancestor=reservation) -docker stop $(sudo docker ps -a -q --filter ancestor=data) -docker stop $(sudo docker ps -a -q --filter ancestor=controller) diff --git a/push-dockers.sh b/push-dockers.sh new file mode 100755 index 0000000..59cb7d4 --- /dev/null +++ b/push-dockers.sh @@ -0,0 +1,43 @@ +#!/bin/bash +BUILD_ARGS="--no-cache" +ORG="onap" +VERSION="1.1.0" +PROJECT="optf" +IMAGE="api" +DOCKER_REPOSITORY="nexus3.onap.org:10003" +IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}" +TIMESTAMP=$(date +"%Y%m%dT%H%M%S") + +if [ $HTTP_PROXY ]; then +BUILD_ARGS+=" --build-arg HTTP_PROXY=${HTTP_PROXY}" +fi +if [ $HTTPS_PROXY ]; then + BUILD_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}" +fi + +function tag { + echo "Tagging !!!" + docker tag api "nexus3.onap.org:10003/onap/optf/api" + docker tag data "nexus3.onap.org:10003/onap/optf/data" + docker tag controller "nexus3.onap.org:10003/onap/optf/controller" + docker tag solver "nexus3.onap.org:10003/onap/optf/solver" + docker tag reservation "nexus3.onap.org:10003/onap/optf/reservation" +} + + +function push_image { + echo "Start push ${IMAGE_NAME}:latest" + + tag + docker push "nexus3.onap.org:10003/onap/optf/api" + docker push "nexus3.onap.org:10003/onap/optf/data" + docker push "nexus3.onap.org:10003/onap/optf/controller" + docker push "nexus3.onap.org:10003/onap/optf/solver" + docker push "nexus3.onap.org:10003/onap/optf/reservation" + + #docker push ${IMAGE_NAME}:latest + #push_image_tag ${IMAGE_NAME}:${VERSION}-SNAPSHOT-latest + #push_image_tag ${IMAGE_NAME}:${VERSION}-STAGING-latest + #push_image_tag ${IMAGE_NAME}:${VERSION}-STAGING-${TIMESTAMP} + } +push_image diff --git a/run-dockers.sh b/run-dockers.sh new file mode 100755 index 0000000..f8ae249 --- /dev/null +++ b/run-dockers.sh @@ -0,0 +1,7 @@ +### example run - provide the conductor configuration file as input to the run script +# ./run-dockers.sh /conductor.conf +docker run -v $1:/usr/local/bin/conductor.conf data & +docker run -v $1:/usr/local/bin/conductor.conf controller & +docker run -p "8091:8091" -v $1:/usr/local/bin/conductor.conf api & +docker run -v $1:/usr/local/bin/conductor.conf solver & +docker run -v $1:/usr/local/bin/conductor.conf reservation & diff --git a/stop-dockers.sh b/stop-dockers.sh new file mode 100755 index 0000000..72595e8 --- /dev/null +++ b/stop-dockers.sh @@ -0,0 +1,5 @@ +docker stop $(sudo docker ps -a -q --filter ancestor=api) +docker stop $(sudo docker ps -a -q --filter ancestor=solver) +docker stop $(sudo docker ps -a -q --filter ancestor=reservation) +docker stop $(sudo docker ps -a -q --filter ancestor=data) +docker stop $(sudo docker ps -a -q --filter ancestor=controller) -- cgit 1.2.3-korg