Common services
Operating System Install Fedora 18 openSUSE 12.3 Ubuntu 12.04 or 13.04, or Debian Wheezy. The exact installation procedure is outside the scope of this document, but please note the following configurations: Time zone: UTC Hostname: cloud Packages: OpenSSH-Server, wget Once installation has finished, the server reboots. Setup the repositories as described in . Configure the network: Edit /etc/network/interfaces: # Internal Network auto eth0 iface eth0 inet static address 10.10.10.10 netmask 255.255.255.0 # External Network auto eth1 iface eth1 inet static address 10.0.0.10 netmask 255.255.255.0 gateway 10.0.0.1 dns-nameservers 8.8.8.8 Edit /etc/sysctl.conf: net.ipv4.conf.all.rp_filter = 0 net.ipv4.conf.default.rp_filter = 0 Then, restart the network service: # service networking restart And apply the sysctl settings: # sysctl -e -p /etc/sysctl.conf Set up old ethernet nic device names: # sed -i 's/# GOTO="netdevicename_end"/GOTO="netdevicename_end"/g' /lib/udev/rules.d/71-biosdevname.rules Disable NetworkManager and enable the network service # service NetworkManager stop # service network start # chkconfig NetworkManager off # chkconfig network on Edit /etc/sysconfig/network-scripts/ifcfg-eth0: # Internal Network DEVICE=eth0 TYPE=Ethernet BOOTPROTO=static IPADDR=10.10.10.10 NETMASK=255.255.255.0 DEFROUTE=yes ONBOOT=yes Edit /etc/sysconf/network-scripts/ifcfg-eth1: # External Network DEVICE=eth1 TYPE=Ethernet BOOTPROTO=static IPADDR=10.0.0.10 NETMASK=255.255.255.0 GATEWAY=10.0.0.1 DNS=8.8.8.8 DEFROUTE=yes ONBOOT=yes Reboot To set up the two network interfaces, start the YaST network module, as follows: # yast2 network Use the following parameters to set up the first ethernet card eth0 for the internal network: Statically assigned IP Address IP Address: 10.10.10.10 Subnet Mask: 255.255.255.0 Use the following parameters to set up the second ethernet card eth1 for the external network: Statically assigned IP Address IP Address: 10.0.0.10 Subnet Mask: 255.255.255.0 Use the following parameters to set up Routing: Default IPv4 Gateway: 10.0.0.1 Device: eth1 Use the following parameters to set up Hostname/DNS: Hostname: cloud Name Server 1: 8.8.8.8 Save the configuration and leave YaST. Edit the /etc/hosts file and add cloud, network, and c01 hostnames with correct IP. 127.0.0.1 localhost 10.10.10.10 cloud 10.10.10.9 network 10.10.10.11 c01 While manually specifying host entries is acceptable for a simple or testing environment, it is highly recommended to use proper DNS entries, or at a minimum a configuration management system such as Puppet, to maintain your IP to host mappings. Install NTP. NTP ensures that the server has the correct time. This is important because if an OpenStack server's time is not correct, it is removed from the rest of the cloud. # apt-get install ntp # yum install ntp # zypper install ntp
MySQL Database Service The various OpenStack components store persistent data in a relational database. MySQL is the most popular choice. Install the packages: # apt-get install python-mysqldb mysql-server # yum install mysql mysql-server MySQL-python # zypper install mysql-community-server-client mysql-community-server \ python-mysql apt-get prompts you to set the MySQL root password. By default, MySQL only accepts connections from localhost. This needs changed so that the compute nodes can access the OpenStack Networking service. Database requests for the OpenStack Compute service are proxied through the nova-conductor service. # sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf # sed -i 's/127.0.0.1/0.0.0.0/g' /etc/my.cnf # sed -i 's/127.0.0.1/0.0.0.0/g' /etc/my.cnf Restart the service: # service mysql restart # systemctl start mysqld # chkconfig mysqld on # systemctl start mysql # systemctl enable mysql The various databases that the OpenStack services require need to be created. Additionally, MySQL accounts to access those databases need to be created: # mysql -u root -p <<EOF CREATE DATABASE nova; GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' \ IDENTIFIED BY 'password'; CREATE DATABASE cinder; GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' \ IDENTIFIED BY 'password'; CREATE DATABASE glance; GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' \ IDENTIFIED BY 'password'; CREATE DATABASE keystone; GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' \ IDENTIFIED BY 'password'; CREATE DATABASE neutron; GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' \ IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'10.10.10.9' \ IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'10.10.10.11' \ IDENTIFIED BY 'password'; FLUSH PRIVILEGES; EOF
<phrase os="rhel;centos;fedora">Qpid</phrase> <phrase os="ubuntu;debian">RabbitMQ</phrase> <phrase os="opensuse">RabbitMQ</phrase> Messaging Service The OpenStack components also communicate through a queuing service. For example, the Cloud Controller places a request to launch an instance on the queue. The Compute Node then picks this request up and launches the instance. OpenStack can work with several different queuing services. Install the packages: # apt-get install rabbitmq-server # yum install qpid-cpp-server # zypper install rabbitmq-server Change the default password: # rabbitmqctl change_password guest password In addition to choosing another password in a production environment, you should also disable the guest account and use a proper RabbitMQ account. Please see the RabbitMQ documentation for further details. Enable authentication: # echo auth=1 >> /etc/qpidd.conf Add qpid user and password: #$ saslpasswd2 -f /var/lib/qpidd/qpidd.sasldb -u QPID guest >Password: guest >Again (for verification): guest Enable the messaging service: # chkconfig qpidd on Start the messaging service: # service qpidd start Enable the messaging service: # systemctl enable rabbitmq-server Start the messaging service: # systemctl start rabbitmq-server