From f92f97f53e3ee43c5d3b75673122ec9f94db196e Mon Sep 17 00:00:00 2001 From: mbeierl Date: Tue, 12 Sep 2017 16:34:24 -0400 Subject: Add Multi Arch to Docker Adds multi arch support to the launching of the containers. Change-Id: Iee89cfad3dc455fe8fdd7861d73fadbe314c2c1e JIRA: STORPERF-220 Signed-off-by: mbeierl --- ci/launch_docker_container.sh | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) (limited to 'ci/launch_docker_container.sh') diff --git a/ci/launch_docker_container.sh b/ci/launch_docker_container.sh index 2411ce0..ff28e05 100755 --- a/ci/launch_docker_container.sh +++ b/ci/launch_docker_container.sh @@ -8,32 +8,25 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -cd `dirname $0` -ci=`pwd` +cd "$(dirname "$0")" || exit 1 +ci=$(pwd) -cd ${ci}/../docker-compose +cd "${ci}/../docker-compose" || exit 1 -export ENV_FILE=${ci}/job/admin.rc -export CARBON_DIR=${ci}/job/carbon/ +export ENV_FILE="${ci}/job/admin.rc" +export CARBON_DIR="${ci}/job/carbon/" -if [ ! -d ${ci}/job/carbon ] +if [ ! -d "${ci}/job/carbon" ] then - mkdir ${ci}/job/carbon -fi - -if [ -z ${ARCH} ] -then - ARCH=x86_64 + mkdir -p "${ci}/job/carbon" fi +ARCH="${ARCH:-$(uname -m)}" export ARCH -if [ -z ${DOCKER_TAG} ] -then - DOCKER_TAG=latest -fi +DOCKER_TAG="${DOCKER_TAG:-latest}" -export TAG=${DOCKER_TAG} +export TAG="${ARCH}-${DOCKER_TAG}" docker-compose pull docker-compose up -d @@ -42,7 +35,7 @@ echo "Waiting for StorPerf to become active" ATTEMPTS=20 -while [ $(curl -s -o /dev/null -I -w "%{http_code}" -X GET http://127.0.0.1:5000/api/v1.0/configurations) != "200" ] +while [ "$(curl -s -o /dev/null -I -w '%{http_code}' -X GET http://127.0.0.1:5000/api/v1.0/configurations)" != "200" ] do ATTEMPTS=$((ATTEMPTS - 1)) if [ ${ATTEMPTS} -le 1 ] -- cgit 1.2.3-korg