diff options
author | QiLiang <liangqi1@huawei.com> | 2016-01-16 01:14:18 +0000 |
---|---|---|
committer | QiLiang <liangqi1@huawei.com> | 2016-01-16 02:20:04 +0000 |
commit | 2942272878f99b7a7894f175285ebfeeac788da9 (patch) | |
tree | aa54fbbca64549734e03b6ee8909954efd82effe /ci/rubbos_docker_run.sh | |
parent | 6c9169e63129b31fe7830443aa5ba5c680dd787e (diff) |
Add Dockerfile and bootstrap scripts to run rubbos
JIRA: -
Change-Id: Ifc14193ee2d6f0a1f9f5b67a2043ed6640a8b928
Signed-off-by: QiLiang <liangqi1@huawei.com>
Diffstat (limited to 'ci/rubbos_docker_run.sh')
-rwxr-xr-x | ci/rubbos_docker_run.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ci/rubbos_docker_run.sh b/ci/rubbos_docker_run.sh new file mode 100755 index 00000000..d170c00d --- /dev/null +++ b/ci/rubbos_docker_run.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +set -ex + +docker build -t opnfv/bottlenecks ${BOTTLENECKS_TOP_DIR}/ci/docker/bottlenecks-ci/ + +if [ x"${GERRIT_REFSPEC_DEBUG}" != x ]; then + opts="--privileged=true -it" +else + opts="--privileged=true --rm" +fi + +envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NETWORK=${EXTERNAL_NETWORK} -e BOTTLENECKS_BRANCH=${GIT_BRANCH##origin/} -e GERRIT_REFSPEC_DEBUG=${GERRIT_REFSPEC_DEBUG}" +volumes="-v ${BOTTLENECKS_TOP_DIR}:${BOTTLENECKS_TOP_DIR}" +create_instance=${BOTTLENECKS_TOP_DIR}/utils/infra_setup/heat_template/HOT_create_instance.sh + +echo ${envs} ${ops} ${volumes} + +# Run docker +cmd="sudo docker run ${opts} ${envs} ${volumes} opnfv/bottlenecks ${create_instance}" +echo "Bottlenecks: Running docker cmd: ${cmd}" +${cmd} + +echo "Bottlenecks: done!" + +set +ex + |