Merge "move end 2 end test sequence scripts from jenkins job config to stackforge"

This commit is contained in:
Jenkins 2014-02-25 22:23:37 +00:00 committed by Gerrit Code Review
commit 479f9923eb
3 changed files with 54 additions and 0 deletions

8
misc/ci/pxe-deploy.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash -xe
cp compass-core/compass/apiclient/example.py /tmp/test.py
chmod +x /tmp/test.py
virsh destroy pxe01
virsh start pxe01
virsh list
source compass-core/install/install.conf.template
/usr/bin/python /tmp/test.py

29
misc/ci/pxe-prepare.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/bash -x
if [[ ! -e /tmp/pxe01.raw ]]; then
qemu-img create -f raw /tmp/pxe01.raw 20G
else
rm -rf /tmp/pxe01.raw
qemu-img create -f raw /tmp/pxe01.raw 20G
fi
virsh list |grep pxe01
vmrc=$?
if [[ $vmrc -eq 0 ]] ; then
virsh destroy pxe01
virsh undefine pxe01
else
echo "no legacy pxe vm found"
fi
virt-install --accelerate --hvm --connect qemu:///system \
--network=bridge:installation,mac=00:11:20:30:40:01 --pxe \
--network=network:default \
--name pxe01 --ram=4096 \
--disk /tmp/pxe01.raw,format=raw \
--vcpus=10 \
--graphics vnc,listen=0.0.0.0 --noautoconsole \
--os-type=linux --os-variant=rhel6
rm -rf switch-file
echo "machine,10.145.81.220,5,1,00:11:20:30:40:01" > switch-file
echo "switch,10.145.81.220,huawei,v2c,public,under_monitoring" >> switch-file
/usr/bin/python /opt/compass/bin/manage_db.py set_switch_machines --switch_machines_file switch-file
/usr/bin/python /opt/compass/bin/manage_db.py clean_clusters
/usr/bin/python /opt/compass/bin/manage_db.py clean_installation_progress

17
misc/ci/test-install.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash -x
# create a bridge named 'installation' so that compass and pxeboot vm are in the
# same l2 network.
brctl show |grep installation > /dev/null
if [[ $? -eq 0 ]] ; then
echo "bridge already exists"
else
brctl addbr installation
brctl addif installation eth1
ifconfig eth1 up
dhclient -r eth1
dhclient -r installation
dhclient installation
fi
source compass-core/install/install.conf.template
/bin/bash -x compass-core/install/install.sh
sleep 5