move end 2 end test sequence scripts from jenkins job config to

stackforge

so changes to codes can be aligned with changes to test scripts.

Change-Id: I544e21dfbf524e79b16b2cfdc634cd8a5ad8fc18
This commit is contained in:
zhaoxinyu 2014-02-24 23:09:23 +00:00
parent 3f3b6363d4
commit 91158e54ff
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