QA:Testcase separate OpenStack compute node

From FedoraProject

Revision as of 14:33, 8 March 2012 by Derekh (Talk | contribs)

Jump to: navigation, search

Contents

Description

Everything so far has been done on a single node. Here we add another (virtual) node for running VMs.

Let's assume the machine you've set up above is called 'controller' and the new machine is called 'node'.

Setup

Open the rabbitmq, MySQL, Nova API and iSCSI ports on controller:

$ controller> sudo lokkit -p 3306:tcp
$ controller> sudo lokkit -p 5672:tcp
$ controller> sudo lokkit -p 9292:tcp
$ controller> sudo lokkit -p 3260:tcp
$ controller> sudo service libvirtd reload

Configure the network with a physical bridge interface:

$ controller> sudo service openstack-nova-network stop
$ controller> sudo ip link set testnetbr0 down
$ controller> sudo brctl delbr testnetbr0
$ controller> sudo kill -9 $(cat /var/lib/nova/networks/nova-testnetbr0.pid)
$ controller> mysql -unova -pnova nova -e 'update networks set bridge_interface="em1" where label="admin"'
$ controller> sudo service openstack-nova-network start

Make sure that ntp is enabled on both machines:

$> sudo yum install -y ntp
$> sudo service ntpd start
$> sudo chkconfig ntpd on

On the compute node, follow the "Configure sudo", "Update your machine", "Enable libvirt", "Disable SELinux" and "Load nbd" instructions from the main page.

Configure nova so that node can find the services on controller:

$ node> echo '1.2.3.4 controller' | sudo tee -a /etc/hosts
$ node> echo '--rabbit_host=controller' | sudo tee -a /etc/nova/nova.conf
$ node> echo '--sql_connection=mysql://nova:nova@controller/nova' | sudo tee -a /etc/nova/nova.conf
$ node> echo '--glance_api_servers=controller:9292' | sudo tee -a /etc/nova/nova.conf
$ node> echo '--iscsi_ip_prefix=172.31.0.107' | sudo tee -a /etc/nova/nova.conf

Enable the compute service:

$ node> for svc in compute network; do sudo service openstack-nova-$svc start; done
$ node> for svc in compute network; do sudo chkconfig openstack-nova-$svc on; done 

How to test

Now when the controller launches instances (see: QA:Testcase_launch_an_instance_on_OpenStack), they're started either on the controller or node.

Expected Results

Verify where instances are running with euca-describe-instances