Installing OpenStack Compute on Red Hat Enterprise Linux 6 This section documents a multi-node installation using RHEL 6. RPM repos for the Bexar
release, the Cactus release, milestone releases of Diablo, and also per-commit trunk
builds for OpenStack Nova are available at http://yum.griddynamics.net. The
final release of Diablo is available at http://yum.griddynamics.net/yum/diablo/, but is not yet tested completely
(as of Oct 4, 2011). Check this page for updates: http://wiki.openstack.org/NovaInstall/RHEL6Notes.Known considerations for RHEL version 6 installations: iSCSI LUN not supported due to tgtadm versus ietadm differencesGuestFS is used for files injectionFiles injection works with libvirtStatic network configuration can detect OS type for RHEL and UbuntuOnly KVM hypervisor has been tested with this installationTo install Nova on RHEL v.6 you need access to two repositories, one available on the
yum.griddynamics.net website and the RHEL DVD image connected as repo. First, install RHEL 6.0, preferrably with a minimal set of packages.Disable SELinux in /etc/sysconfig/selinux and then reboot. Connect the RHEL 3. 6.0 x86_64 DVD as a repository in YUM.
sudo mount /dev/cdrom /mnt/cdrom
/etc/yum.repos.d/rhel.repo
[rhel]
name=RHEL 6.0
baseurl=file:///mnt/cdrom/Server
enabled=1
gpgcheck=0
Download and install repo config and key. The cloud controller plus compute node is
installed with the example rpm below. You can use http://yum.griddynamics.net/yum/diablo/openstack-nova-node-compute-2011.3-b609.noarch.rpm
for a compute node only.
wget http://yum.griddynamics.net/yum/diablo/openstack-nova-node-full-2011.3-b609.noarch.rpm
sudo rpm -i openstack-repo-2011.1-3.noarch.rpm
Install the libvirt package (these instructions are tested only on KVM).
sudo yum install libvirt
sudo chkconfig libvirtd on
sudo service libvirtd start
Repeat the basic installation steps to put the pre-requisites on all cloud controller and compute nodes. Nova has many different possible configurations. You can install Nova services on separate servers as needed but these are the basic pre-reqs.These are the basic packages to install for a cloud controller node:sudo yum install euca2ools openstack-nova-node-fullThese are the basic packages to install compute nodes. Repeat for each compute node (the node that runs the VMs) that you want to install.sudo yum install openstack-nova-compute On the cloud controller node, create a MySQL database named nova.
sudo service mysqld start
sudo chkconfig mysqld on
sudo service rabbitmq-server start
sudo chkconfig rabbitmq-server on
mysqladmin -u root password nova
You can use this script to create the database.
#!/bin/bash
DB_NAME=nova
DB_USER=nova
DB_PASS=nova
PWD=nova
CC_HOST="A.B.C.D" # IPv4 address
HOSTS='node1 node2 node3' # compute nodes list
mysqladmin -uroot -p$PWD -f drop nova
mysqladmin -uroot -p$PWD create nova
for h in $HOSTS localhost; do
echo "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'$h' IDENTIFIED BY '$DB_PASS';" | mysql -u root -p$DB_PASS mysql
done
echo "GRANT ALL PRIVILEGES ON $DB_NAME.* TO $DB_USER IDENTIFIED BY '$DB_PASS';" | mysql -u root -p$DB_PASS mysql
echo "GRANT ALL PRIVILEGES ON $DB_NAME.* TO root IDENTIFIED BY '$DB_PASS';" | mysql -u root -p$DB_PASS mysql
Now, ensure the database version matches the version of nova that you are installing:nova-manage db syncFor iptables configuration, update your firewall configuration to allow incoming
requests on ports 5672 (RabbitMQ), 3306 (MySQL DB), 9292 (Glance), 6080 (noVNC web
console), API (8773, 8774) and DHCP traffic from instances. For non-production
environments the easiest way to fix any firewall problems is removing final REJECT in
INPUT chain of filter table.
sudo iptables -I INPUT 1 -p tcp --dport 5672 -j ACCEPT
sudo iptables -I INPUT 1 -p tcp --dport 3306 -j ACCEPT
sudo iptables -I INPUT 1 -p tcp --dport 9292 -j ACCEPT
sudo iptables -I INPUT 1 -p tcp --dport 6080 -j ACCEPT
sudo iptables -I INPUT 1 -p tcp --dport 8773 -j ACCEPT
sudo iptables -I INPUT 1 -p tcp --dport 8774 -j ACCEPT
sudo iptables -I INPUT 1 -p udp --dport 67 -j ACCEPT
On every node when you have nova-compute running ensure that unencrypted VNC access is allowed only from Cloud Controller node:sudo iptables -I INPUT 1 -p tcp -s <CLOUD_CONTROLLER_IP_ADDRESS> --dport 5900:6400 -j ACCEPT
On each node, set up the configuration file in /etc/nova/nova.conf.Start the Nova services after configuring and you then are running an OpenStack
cloud!
for n in api compute network objectstore scheduler vncproxy; do
sudo service openstack-nova-$n start; done
sudo service openstack-glance-api start
sudo service openstack-glance-registry start
for n in node1 node2 node3; do
ssh $n sudo service openstack-nova-compute start; done