QA:Testcase separate OpenStack compute node

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
m (Fixed typo which stumped me for quite some time auth_straGegy to auth_strategy)
 
(21 intermediate revisions by 5 users not shown)
Line 9: Line 9:
 
|setup=
 
|setup=
  
Open the rabbitmq, MySQL and Nova API ports on controller:
+
Open the Qpid, MySQL, iSCSI and Nova API ports on controller:
  
$ controller> sudo lokkit -p 3306:tcp
 
 
  $ controller> sudo lokkit -p 5672:tcp
 
  $ controller> sudo lokkit -p 5672:tcp
 +
$ controller> sudo lokkit -p 3306:tcp
 +
$ controller> sudo lokkit -p 3260:tcp
 
  $ controller> sudo lokkit -p 9292:tcp
 
  $ controller> sudo lokkit -p 9292:tcp
 
  $ controller> sudo service libvirtd reload
 
  $ controller> sudo service libvirtd reload
  
Then make sure that ntp is enabled on both machines:
+
Configure the network with a physical bridge interface:
  
  $> sudo yum install -y ntp
+
  $ controller> sudo systemctl stop openstack-nova-network.service
  $> sudo service ntpd start
+
  $ controller> sudo ip link set testnetbr0 down
  $> sudo chkconfig ntpd on
+
  $ 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="testnet"'
 +
$ controller> sudo systemctl start openstack-nova-network.service
  
We only need to install libvirt and nova on the compute node:
+
Make sure that ntp is enabled on both machines:
  
  $ node> sudo yum install --enablerepo=updates-testing openstack-nova
+
  $> sudo yum install -y ntp
  $ node> sudo service libvirtd start
+
  $> sudo systemctl start ntpd.service
  $ node> sudo chkconfig libvirtd on
+
  $> sudo systemctl enable ntpd.service
$ node> sudo setenforce 0
+
$ node> sudo sed -i 's/^SELINUX=enforcing/SELINUX=permissive/' /etc/selinux/config
+
  
Configure nova so that node can find the services on controller:
+
On the compute node, follow the "Configure sudo", "Update your machine", "Enable the Qpid Broker", "Enable libvirt", "Optionally Load nbd" and "Put SELinux into Permissive Mode" instructions from [[Test_Day:2012-03-08_OpenStack_Test_Day|the main page]].
 +
 
 +
Configure nova so that node can access services on controller:
  
 
  $ node> echo '1.2.3.4 controller' <nowiki>| sudo tee -a /etc/hosts</nowiki>
 
  $ node> echo '1.2.3.4 controller' <nowiki>| sudo tee -a /etc/hosts</nowiki>
  $ node> echo '--rabbit_host=controller' <nowiki>| sudo tee -a /etc/nova/nova.conf</nowiki>
+
  $ node> sudo yum install -y --enablerepo=updates-testing openstack-nova openstack-keystone
  $ node> echo '--sql_connection=mysql://nova:nova@controller/nova' <nowiki>| sudo tee -a /etc/nova/nova.conf</nowiki>
+
$ node> sudo openstack-config --set /etc/nova/nova.conf DEFAULT qpid_hostname controller
  $ node> echo '--glance_api_servers=controller:9292' <nowiki>| sudo tee -a /etc/nova/nova.conf</nowiki>
+
  $ node> sudo openstack-config --set /etc/nova/nova.conf DEFAULT sql_connection mysql://nova:nova@controller/nova
 +
$ node> sudo openstack-config --set /etc/nova/nova.conf DEFAULT glance_api_servers controller:9292
 +
  $ node> sudo openstack-config --set /etc/nova/nova.conf DEFAULT iscsi_ip_prefix 1.2.3.4
 +
$ node> sudo openstack-config --set /etc/nova/nova.conf DEFAULT auth_strategy keystone
  
 
Enable the compute service:
 
Enable the compute service:
  
  $ node> for svc in compute network; do sudo service openstack-nova-$svc start; done
+
  $ node> sudo systemctl start openstack-nova-compute.service
  $ node> for svc in compute network; do sudo chkconfig openstack-nova-$svc on; done
+
  $ node> sudo systemctl enable openstack-nova-compute.service
  
Finally, you need to make sure the network is configured with a physical bridge interface:
+
|actions=
 +
Now when the controller launches instances (see: [[QA:Testcase_launch_an_instance_on_OpenStack]]),
 +
they're started either on the controller or node.
  
$ controller> sudo nova-manage network create 'admin' 10.0.0.0/24 --bridge=br0 --bridge_interface=em1
+
You should also try [[QA:Testcase_attach_a_volume_to_an_instance]] and [[QA:Testcase_OpenStack_floating_IPs]] with instances scheduled on the compute node.
  
 
|actions=
 
Everything should be running as before, except the VMs are launched either on controller or node.
 
 
|results=
 
|results=
 +
Verify where instances are running with euca-describe-instances
 
}}
 
}}
  
 
[[Category:OpenStack Test Cases]]
 
[[Category:OpenStack Test Cases]]
[[Category:Cloud SIG]]
 

Latest revision as of 18:37, 16 November 2012

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 Qpid, MySQL, iSCSI and Nova API ports on controller:

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

Configure the network with a physical bridge interface:

$ controller> sudo systemctl stop openstack-nova-network.service
$ 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="testnet"'
$ controller> sudo systemctl start openstack-nova-network.service

Make sure that ntp is enabled on both machines:

$> sudo yum install -y ntp
$> sudo systemctl start ntpd.service
$> sudo systemctl enable ntpd.service

On the compute node, follow the "Configure sudo", "Update your machine", "Enable the Qpid Broker", "Enable libvirt", "Optionally Load nbd" and "Put SELinux into Permissive Mode" instructions from the main page.

Configure nova so that node can access services on controller:

$ node> echo '1.2.3.4 controller' | sudo tee -a /etc/hosts
$ node> sudo yum install -y --enablerepo=updates-testing openstack-nova openstack-keystone
$ node> sudo openstack-config --set /etc/nova/nova.conf DEFAULT qpid_hostname controller
$ node> sudo openstack-config --set /etc/nova/nova.conf DEFAULT sql_connection mysql://nova:nova@controller/nova
$ node> sudo openstack-config --set /etc/nova/nova.conf DEFAULT glance_api_servers controller:9292
$ node> sudo openstack-config --set /etc/nova/nova.conf DEFAULT iscsi_ip_prefix 1.2.3.4
$ node> sudo openstack-config --set /etc/nova/nova.conf DEFAULT auth_strategy keystone 

Enable the compute service:

$ node> sudo systemctl start openstack-nova-compute.service
$ node> sudo systemctl enable openstack-nova-compute.service 

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.

You should also try QA:Testcase_attach_a_volume_to_an_instance and QA:Testcase_OpenStack_floating_IPs with instances scheduled on the compute node.

Expected Results

Verify where instances are running with euca-describe-instances