OpenStackTestPlan
Overview
The purpose of this Topic is to provide details of the Test Plan for testing OpenStack deployments during the Oneiric Ocelot release cycle.
Assumptions
All topologies will be tested using the ensemble formulas for OpenStack.
- Ensemble services will be unit/relation tested using the formula-tester formula
- Deploy topologies will be tested functionally using XXXX
Topologies
Single Node
Overview
The purpose of this topology is to allow easy enablement for OpenStack development and is not intended for use in production deployments.
A single node deployment consists of the following components:
- Nova (api, scheduler, compute, network)
- Hypervisor support: KVM and LXC (compute-kvm, compute-lxc)
- glance
- rabbitmq-server
- API Server
nova-network will be configured to use the default VLANManager.
In-scope
- Tests that will be validated against this topology
Out-of-scope
- Support for Xen hypervisor
- Use of MySQL database
- Deployment of swift
- Deployment of keystone
OpenStack-SingleNode-KVM
Basic Oneiric Server Installation
Perform a standard Oneiric Server amd64 installation; recommendation is that openssh-server is installed to make configuring the node easier.
Test Procedure
- Install bridge-utils:
sudo apt-get install bridge-utils
- Edit /etc/network/interfaces (IP addresses will need to be changed depending on the network configuration of the testing environment):
# The loopback network interface auto lo iface lo inet loopback # The primary network interface #auto eth0 #iface eth0 inet dhcp # This is an autoconfigured IPv6 interface #iface eth0 inet6 auto auto br0 iface br0 inet static address 192.168.0.10 network 192.168.0.0 netmask 255.255.255.0 broadcast 192.168.0.255 gateway 192.168.0.1 bridge_ports eth0 bridge_fd 9 bridge_hello 2 bridge_maxage 12 bridge_stp off
- Reboot
TEST: Validate that br0 is running
ip addr <VOID 1> capture output
Install OpenStack packages
sudo apt-get install nova-compute nova-compute-lxc nova-scheduler nova-objectstore nova-network nova-api glance rabbitmq-server unzip
TEST: Validate that relevant nova processes are running
prompt> pgrep -u nova -l | sort -k 2 1128 nova-api 1123 nova-compute 1112 nova-network 1122 nova-objectstor 1129 nova-scheduler 1109 su 1119 su 1121 su 1125 su 1127 su
TEST: Validate that relevant rabbitmq processes are running
prompt> pgrep -u rabbitmq -l | sort -k 2 1443 beam.smp 1592 cpu_sup 1423 epmd 1594 inet_gethost 1595 inet_gethost 1441 sh 1438 su
TEST: Validate that relevant glance processes are running
prompt> pgrep -u glance -l | sort -k 2 1089 glance-api 1086 glance-registry 1084 su 1088 su
- Setup nova components
sudo nova-manage db sync sudo nova-manage user admin admin sudo nova-manage project create test-cloud-01 admin sudo nova-manage network create private 10.0.0.0/8 3 16 --bridge_interface=br0 sudo nova-manage floating create 192.168.0.220/27
The final command should be adjusted to create an appropriate network range within the test network configuration for access of public IP addresses.
This might be helpful - http://www.subnet-calculator.com/subnet.php?net_class=C.
TEST: Validate that appropriate private network ranges have been created
prompt> sudo nova-manage network list id IPv4 IPv6 start address DNS1 DNS2 VlanID project uuid 1 10.0.0.0/28 None 10.0.0.3 None None 100 None None 2 10.0.0.16/28 None 10.0.0.19 None None 101 None None 3 10.0.0.32/28 None 10.0.0.35 None None 102 None None
TEST: Validate that floating 'public' network addresses have been allocated
prompt> sudo nova-manage floating list None 192.168.0.192 None None 192.168.0.193 None None 192.168.0.194 None None 192.168.0.195 None None 192.168.0.196 None ... None 192.168.0.223 None
- Download project access credentials and unzip
sudo nova-manage project zipfile test-cloud-01 admin unzip nova.zip . novarc
TEST: Zip file named 'nova.zip' created in current working directory containing
prompt> unzip -l nova.zip Archive: nova.zip Length Date Time Name --------- ---------- ----- ---- 1184 2011-09-06 08:55 novarc 887 2011-09-06 08:55 pk.pem 2520 2011-09-06 08:55 cert.pem 1029 2011-09-06 08:55 cacert.pem --------- ------- 5620 4 files
Length, Date and Time will vary from the above
Install cloud-utils, download a cloud image and upload to OpenStack
First:
sudo apt-get install cloud-utils
Then download the relevant test image from cloud-images.ubuntu.com and publish to OpenStack:
ARCH=amd64 CLOUD_TGZ=ubuntu-11.10-beta1-server-cloudimg-$ARCH.tar.gz URL=http://cloud-images.ubuntu.com/releases/oneiric/beta-1/ TYPE=m1.tiny BUCKET="cloudtest-$(date +%Y%m%d%H%M%S)" [ $ARCH = "amd64" ] && IARCH=x86_64 || IARCH=i386 [ ! -e $CLOUD_TGZ ] && wget $URL/$CLOUD_TGZ EMI=$(cloud-publish-tarball $CLOUD_TGZ $BUCKET $IARCH | awk -F \" '{print $2}') && echo $EMI
TEST: Validate that cloud image is ready for use
prompt> euca-describe-images <VOID 2>
Then create a keypair (if required), and run an instance, allocating and associating a 'public' ip address:
if [ ! -e mykey.priv ]; then touch mykey.priv chmod 0600 mykey.priv euca-add-keypair mykey > mykey.priv fi euca-authorize default -P tcp -p 22 -s 0.0.0.0/0 euca-authorize default -P icmp -t -1:-1 -s 0.0.0.0/0 INSTANCEID=$(euca-run-instances -k mykey $EMI -t $TYPE | awk '/^INSTANCE/ {print $2}') && echo $INSTANCEID PUBLICIP=$(euca-allocate-address | awk '{print $2}') euca-associate-address -i $INSTANCEID $PUBLICIP
TEST: Check that instance is accessible via SSH locally
IPADDR=$(euca-describe-instances | grep $INSTANCEID | grep running | awk '{print $4}') ssh -i mykey.priv ubuntu@$IPADDR
TEST: Check that instance is accessible via SSH remotely
scp test-host:* . . novarc ssh -i mykey.priv ubuntu@$IPADDR
Multi Node
Overview
In-scope
- Tests that will be validated against this topology
Out-of-scope
- Support for Xen hypervisor