From: Jun Li Date: Wed, 6 Jan 2016 11:10:38 +0000 (+0000) Subject: Merge "Add hosts config" X-Git-Tag: brahmaputra.1.0~24 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=2ef88b4eb1e78f562fed72df00c9b757c45f99f0;hp=52b57789e3a3bee43398d3786d656c56007c113a;p=bottlenecks.git Merge "Add hosts config" --- diff --git a/ci/vstf_run.sh b/ci/vstf_run.sh new file mode 100755 index 00000000..ee523047 --- /dev/null +++ b/ci/vstf_run.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -ex + +BOTTLENECKS_REPO=https://gerrit.opnfv.org/gerrit/bottlenecks + +SCRIPT_DIR=`cd ${BASH_SOURCE[0]%/*};pwd` +GERRIT_REFSPEC_DEBUG=$1 + +if [ x"$GERRIT_REFSPEC_DEBUG" != x ]; then + git fetch $BOTTLENECKS_REPO $GERRIT_REFSPEC_DEBUG && git checkout FETCH_HEAD +fi + +$SCRIPT_DIR/../utils/infra_setup/heat_template/vstf_heat_template/vstf_HOT_create_instance.sh $GERRIT_REFSPEC_DEBUG + +set +ex diff --git a/utils/infra_setup/heat_template/vstf_heat_template/vstf_HOT_create_instance.sh b/utils/infra_setup/heat_template/vstf_heat_template/vstf_HOT_create_instance.sh new file mode 100755 index 00000000..11df69b8 --- /dev/null +++ b/utils/infra_setup/heat_template/vstf_heat_template/vstf_HOT_create_instance.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +set -ex + +GERRIT_REFSPEC_DEBUG=$1 + +echo "vstf DEBUG test" +echo "vstf workflow goes here" + +bottlenecks_env_prepare() +{ + if [ -d $BOTTLENECKS_REPO_DIR ]; then + rm -rf ${BOTTLENECKS_REPO_DIR} + fi + + mkdir -p ${BOTTLENECKS_REPO_DIR} + git config --global http.sslVerify false + git clone ${BOTTLENECKS_REPO} ${BOTTLENECKS_REPO_DIR} + if [ x"$GERRIT_REFSPEC_DEBUG" != x ]; then + cd ${BOTTLENECKS_REPO_DIR} + git fetch $BOTTLENECKS_REPO $GERRIT_REFSPEC_DEBUG && git checkout FETCH_HEAD + cd - + fi + + #obtain installer(openstack) IP, etc, use rubbos's temporarily, later we can amend this + source $BOTTLENECKS_REPO_DIR/rubbos/rubbos_scripts/1-1-1/scripts/env_preparation.sh +} + +#vstf logic function here + +main() +{ + echo "bottlenecks vstf: create instances with heat template" + + BOTTLENECKS_REPO=https://gerrit.opnfv.org/gerrit/bottlenecks + BOTTLENECKS_REPO_DIR=/tmp/opnfvrepo_vstf/bottlenecks + #vstf parameter here + + bottlenecks_env_prepare + #vstf function here +} + +main +set +ex