diff options
author | mbeierl <mark.beierl@dell.com> | 2017-06-29 14:16:39 -0400 |
---|---|---|
committer | mbeierl <mark.beierl@dell.com> | 2017-06-30 20:45:58 -0400 |
commit | 2c95b01efa53c7e7d4ea7d73fde0da6099938e50 (patch) | |
tree | d8e3a3cbed1d1f7778fd1045fe063dfe29d509e4 /ci/launch_docker_container.sh | |
parent | 45130c365c235bc4a5a53fd0ddb15f84a1460199 (diff) |
Docker Compose Updates
Adds docker-compose directory with content to start container suite using
nginx as front and and SwaggerUI in its own container.
Updates the documentation to reflect new method of starting StorPerf.
Change-Id: I469676e330dcad6c968b90133df8866b69eb5ea1
JIRA: STORPERF-181
Signed-off-by: mbeierl <mark.beierl@dell.com>
Diffstat (limited to 'ci/launch_docker_container.sh')
-rwxr-xr-x | ci/launch_docker_container.sh | 44 |
1 files changed, 15 insertions, 29 deletions
diff --git a/ci/launch_docker_container.sh b/ci/launch_docker_container.sh index ec9c4d8..2dfde93 100755 --- a/ci/launch_docker_container.sh +++ b/ci/launch_docker_container.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -x ############################################################################## # Copyright (c) 2016 EMC and others. # @@ -9,42 +9,28 @@ ############################################################################## cd `dirname $0` +ci=`pwd` -storperf_container=`docker ps -a -q -f name=storperf` +cd ${ci}/../docker-compose -if [ ! -z $storperf_container ] -then - echo "Stopping any existing StorPerf container" - docker rm -fv $storperf_container -fi - -if [ ! -f job/admin.rc ] -then - ./generate-admin-rc.sh -fi +export TAG=${DOCKER_TAG:-latest} +export ENV_FILE=${ci}/job/admin.rc +export CARBON_DIR=${ci}/job/carbon/ -if [ ! -d job/carbon ] +if [ ! -d ${ci}/job/carbon ] then - mkdir job/carbon - sudo chown 33:33 job/carbon + mkdir ${ci}/job/carbon + sudo chown 33:33 ${ci}/job/carbon fi -if [ -z $DOCKER_TAG ] -then - DOCKER_TAG=latest -fi - -docker pull opnfv/storperf:$DOCKER_TAG - -docker run -d --env-file `pwd`/job/admin.rc \ - -p 5000:5000 \ - -p 8000:8000 \ - -v `pwd`/job/carbon:/opt/graphite/storage/whisper \ - --name storperf opnfv/storperf -# -v `pwd`/../../storperf:/home/opnfv/repos/storperf \ +docker-compose -f ../docker-compose/docker-compose.yaml up -d echo "Waiting for StorPerf to become active" -while [ $(curl -X GET 'http://127.0.0.1:5000/api/v1.0/configurations' > /dev/null 2>&1;echo $?) -ne 0 ] +curl -X GET 'http://127.0.0.1:5000/api/v1.0/configurations' > test.html 2>&1 +while [ `grep 'agent_count' test.html | wc -l` == "0" ] do sleep 1 + curl -X GET 'http://127.0.0.1:5000/api/v1.0/configurations' > test.html 2>&1 done + +rm -f test.html |