Added support for IPMI Debian Live provisionning of Tempest CI
This commit is contained in:
parent
0ee56c3586
commit
78ddec167d
|
@ -7,6 +7,7 @@ openstack-meta-packages (0.15) UNRELEASED; urgency=medium
|
|||
* Removed activation of ec2 lib in preseed, as it's gone away from upstream
|
||||
code in Nova.
|
||||
* Added 14 new python-*client in the openstack-clients metapackage.
|
||||
* Added support for IPMI Debian Live provisionning of Tempest CI.
|
||||
|
||||
[ Ondřej Nový ]
|
||||
* Fixed VCS URLs (https).
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
# Using Xen or OpenStack
|
||||
# Possible values: xen, openstack
|
||||
OTCI_VIRT_MODE=xen
|
||||
# Using a Xen VM, an OpenStack, or ipmi with Debian Live
|
||||
# Possible values: xen, openstack, ipmi
|
||||
OTCI_VIRT_MODE=ipmi
|
||||
|
||||
############################
|
||||
### Xen VM provisionning ###
|
||||
############################
|
||||
# IP of the xen dom0 to provision the VM
|
||||
OTCI_XEN_DOM0_IP=185.8.56.70
|
||||
|
||||
##################################
|
||||
### OpenStack VM provisionning ###
|
||||
##################################
|
||||
# Credential for the cloud where the CI tests are happening
|
||||
export OS_AUTH_URL=http://158.85.165.2:5000/v2.0
|
||||
export OS_TENANT_ID=73e92bdb131f4316b709c0f8613e7b59
|
||||
|
@ -27,24 +33,47 @@ OTCI_KEYPAIR_NAME=jenkins
|
|||
# floating IP ID
|
||||
OTCI_FLOATING_IP_ID=1dd50df2-0ddc-4605-93ca-5ea22f977003
|
||||
|
||||
# floating IP address
|
||||
OTCI_FLOATING_IP_ADDR=185.8.56.76
|
||||
#158.85.175.83
|
||||
|
||||
# "normal" VM network (eg: eth0)
|
||||
OTCI_ETH0_NET_ID=1f35e850-f354-414d-bc43-1b0b91e5d731
|
||||
|
||||
# management network (ie: eth1)
|
||||
OTCI_ETH1_NET_ID=0b2f4c7c-c8d0-4740-9e52-b411c80ecdf9
|
||||
|
||||
##########################
|
||||
### IPMI provisionning ###
|
||||
##########################
|
||||
# IP address of the IPMI of the real hardware running Debian Live
|
||||
OTCI_IPMI_IP_ADDR=
|
||||
|
||||
# IPMI login
|
||||
OTCI_IPMI_LOGIN=
|
||||
|
||||
# IPMI password
|
||||
OTCI_IPMI_PASS=
|
||||
|
||||
########################################################
|
||||
### Configuration of your Tempest machine networking ###
|
||||
########################################################
|
||||
# floating IP address (or the "main" ip address of the
|
||||
# machine/vm which will run Tempest)
|
||||
OTCI_FLOATING_IP_ADDR=192.168.10.3
|
||||
#117.121.243.214
|
||||
#158.85.175.83
|
||||
|
||||
# management network IP
|
||||
OTCI_ETH1_CIDR=192.168.0.1/24
|
||||
|
||||
# Public IP pool start
|
||||
OTCI_PUBIP_START=117.121.243.170
|
||||
#OTCI_PUBIP_START=117.121.243.170
|
||||
OTCI_PUBIP_START=192.168.10.100
|
||||
|
||||
# Public IP pool end
|
||||
OTCI_PUBIP_END=117.121.243.185
|
||||
#OTCI_PUBIP_END=117.121.243.185
|
||||
OTCI_PUBIP_END=192.168.10.150
|
||||
|
||||
# OVS agent local_ip value
|
||||
OTCI_LOCAL_IP=172.16.100.1
|
||||
|
||||
# URL to set as default Debian Jessie repo
|
||||
OTCI_DEBIAN_REPO_URL=http://185.8.56.70:9999/debian
|
||||
#http://ftp.us.debian.org/debian
|
||||
|
|
|
@ -13,7 +13,7 @@ else
|
|||
OTCI_DEBIAN_REPO_URL=http://http.debian.net/debian
|
||||
fi
|
||||
|
||||
if [ "${OTCI_VIRT_MODE}" = "xen" ] ; then
|
||||
if [ "${OTCI_VIRT_MODE}" = "xen" ] || [ "${OTCI_VIRT_MODE}" = "ipmi" ] ; then
|
||||
OTCI_SSH_USER=root
|
||||
else
|
||||
OTCI_SSH_USER=debian
|
||||
|
@ -74,6 +74,26 @@ otci_provision_new_vm () {
|
|||
if [ "${OTCI_VIRT_MODE}" = "xen" ] ; then
|
||||
rm -f /var/lib/jenkins/.ssh/known_hosts
|
||||
ssh -o "StrictHostKeyChecking no" root@${OTCI_XEN_DOM0_IP} /root/p
|
||||
elif [ "${OTCI_VIRT_MODE}" = "ipmi" ] ; then
|
||||
# In the case of ipmi provisionning, we expect the machine to be setup to
|
||||
# just run Debian live with the Jenkins /var/lib/jenkins/.ssh/id_rsa.pub key
|
||||
# setup in /root/.ssh/authorized_keys2. So just a reboot of the machine
|
||||
# brings it fresh and ready. Therefore, we just turn the machine off, then
|
||||
# on again, using IPMI.
|
||||
echo "===> Powering the tempest machine down"
|
||||
IPMI_PASSWORD=${OTCI_IPMI_PASS} ipmitool -H ${OTCI_IPMI_IP_ADDR} -U ${OTCI_IPMI_LOGIN} -I lan -E chassis power off
|
||||
echo "===> Waiting 10 seconds before starting it again"
|
||||
for i in `seq 0 10` ; do
|
||||
echo $i
|
||||
sleep 1
|
||||
done
|
||||
echo "===> Powering the machine on again"
|
||||
IPMI_PASSWORD=${OTCI_IPMI_PASS} ipmitool -H ${OTCI_IPMI_IP_ADDR} -U ${OTCI_IPMI_LOGIN} -I lan -E chassis power on
|
||||
echo "===> Waiting 90 seconds for the machine to be up again"
|
||||
for i in `seq 0 90` ; do
|
||||
echo $i
|
||||
sleep 1
|
||||
done
|
||||
else
|
||||
otci_delete_if_already_running
|
||||
otci_launch_vm
|
||||
|
@ -140,7 +160,7 @@ otci_add_source_list () {
|
|||
echo "-> scp source list"
|
||||
otci_scp /etc/openstack-tempest-ci/openstack-ci.list
|
||||
echo "-> Install new source list"
|
||||
otci_remote "sudo mv openstack-ci.list /etc/apt/sources.list.d/"
|
||||
otci_remote "sudo mv openstack-ci.list /etc/apt/sources.list.d/openstack.list"
|
||||
DEBIAN_RELEASE_NAME=`lsb_release -c | awk '{print $2}'`
|
||||
if [ -r /etc/pkgos/pkgos.conf ] ; then
|
||||
. /etc/pkgos/pkgos.conf
|
||||
|
@ -176,6 +196,9 @@ otci_run_tempest () {
|
|||
|
||||
otci_provision_new_vm
|
||||
otci_wait_for_ssh
|
||||
otci_add_source_list
|
||||
otci_aptget_update
|
||||
if ! [ "${OTCI_VIRT_MODE}" = "ipmi" ] ; then
|
||||
otci_add_source_list
|
||||
fi
|
||||
otci_install_openstack_deploy
|
||||
otci_run_tempest
|
||||
|
|
Loading…
Reference in New Issue