From 8cc9b72e83529778f35aa67171ad30fb40b0999f Mon Sep 17 00:00:00 2001 From: Xicheng Chang Date: Thu, 18 Jun 2015 17:41:09 -0700 Subject: [PATCH] Fix a syntax error in prepare.sh Change-Id: I609525baf8559252fe534ce6367896d5991f66fc --- install/chef.sh | 4 ++-- install/install.conf | 1 - install/install.conf.template | 2 -- regtest/ansible/ci/deploy-vm.sh | 5 +---- regtest/ansible/ci/prepare.sh | 1 + regtest/ansible/ci/setup-env.sh | 12 +++++++----- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/install/chef.sh b/install/chef.sh index 91582f83..e6ed0e2e 100755 --- a/install/chef.sh +++ b/install/chef.sh @@ -90,8 +90,8 @@ else echo "cookbooks are added to chef server" fi # disable compass-rally when in regtest -if $REGTEST; then - sed -i '/compass-rally/d' /var/roles/os-identity.json +if [ "$REGTEST" = true ]; then + sed -i '/compass-rally/d' /var/chef/roles/os-identity.json fi knife role from file /var/chef/roles/*.json if [[ "$?" != "0" ]]; then diff --git a/install/install.conf b/install/install.conf index c0c48be0..5734e225 100755 --- a/install/install.conf +++ b/install/install.conf @@ -1,7 +1,6 @@ ##################################### # Config File for Compass Installer # ##################################### -export REGTEST="False" # OS_INSTALLER indicates the tool for OS provisioning, default is 'cobbler'. export OS_INSTALLER=${OS_INSTALLER:-cobbler} diff --git a/install/install.conf.template b/install/install.conf.template index df3c9d14..9344c0dd 100755 --- a/install/install.conf.template +++ b/install/install.conf.template @@ -1,8 +1,6 @@ ##################################### # Config File for Compass Installer # ##################################### -# flag for regtest -export REGTEST="True" # REPO_URL indicates the source where to download compass-web and compass-adapters from #export REPO_URL=https://review.openstack.org diff --git a/regtest/ansible/ci/deploy-vm.sh b/regtest/ansible/ci/deploy-vm.sh index be536b55..b5e2be05 100644 --- a/regtest/ansible/ci/deploy-vm.sh +++ b/regtest/ansible/ci/deploy-vm.sh @@ -1,7 +1,4 @@ -cd .. -rm -rf compass-core -git clone http://git.openstack.org/stackforge/compass-core -b dev/experimental -cd compass-core +cd ../.. virtualenv venv source venv/bin/activate pip install -e . diff --git a/regtest/ansible/ci/prepare.sh b/regtest/ansible/ci/prepare.sh index cb247618..4d5f990c 100644 --- a/regtest/ansible/ci/prepare.sh +++ b/regtest/ansible/ci/prepare.sh @@ -33,6 +33,7 @@ if [[ $? != 0 ]]; then else wget ${centos65_box_vb_url} mv ${centos65_box_vb_filename} centos65.box + fi vagrant mutate centos65.box libvirt else echo "centos65 box already exists" diff --git a/regtest/ansible/ci/setup-env.sh b/regtest/ansible/ci/setup-env.sh index bd86caa0..61e9263b 100644 --- a/regtest/ansible/ci/setup-env.sh +++ b/regtest/ansible/ci/setup-env.sh @@ -3,7 +3,8 @@ #cd compass-install function join { local IFS="$1"; shift; echo "$*"; } -source ${SCRIPT_DIR}/conf/one.conf +REGTEST_CONF=${REGTEST_CONF:-"allinone.conf"} +source ${SCRIPT_DIR}/conf/${REGTEST_CONF} source ${SCRIPT_DIR}/func.sh if [[ ! -z $VIRT_NUMBER ]]; then mac_array=$(${SCRIPT_DIR}/mac_generator.sh $VIRT_NUMBER) @@ -12,6 +13,7 @@ if [[ ! -z $VIRT_NUMBER ]]; then echo "test: true" >> ${SCRIPT_DIR}/../install/group_vars/all fi virsh list |grep compass_nodocker +cd ${SCRIPT_DIR}/.. if [[ $? != 0 ]]; then sudo vagrant up compass_nodocker else @@ -34,10 +36,10 @@ if [[ -n $mac_array ]]; then sudo virt-install --accelerate --hvm --connect qemu:///system \ --name pxe$i --ram=$VIRT_MEM --pxe --disk /home/pxe$i.raw,format=raw \ --vcpus=$VIRT_CPUS --graphics vnc,listen=0.0.0.0 \ - --network=bridge:virbr2,mac=$mac \ - --network=bridge:virbr2 \ - --network=bridge:virbr2 \ - --network=bridge:virbr2 \ + --network=bridge:installation,mac=$mac \ + --network=bridge:installation \ + --network=bridge:installation \ + --network=bridge:installation \ --noautoconsole --autostart --os-type=linux --os-variant=rhel6 if [[ $? != 0 ]]; then echo "launching pxe${i} failed"