openstack-manuals/doc/install-guide/basic-install-files/basic-install_controller-common.xml
Diane Fleming 64b6c9261e Folder rename, file rename, flattening of directories
Current folder name	New folder name	        Book title
----------------------------------------------------------
basic-install 	        DELETE
cli-guide	        DELETE
common	                common
NEW	                admin-guide-cloud	Cloud Administrators Guide
docbkx-example	        DELETE
openstack-block-storage-admin 	DELETE
openstack-compute-admin 	DELETE
openstack-config 	config-reference	OpenStack Configuration Reference
openstack-ha 	        high-availability-guide	OpenStack High Availabilty Guide
openstack-image	        image-guide	OpenStack Virtual Machine Image Guide
openstack-install 	install-guide	OpenStack Installation Guide
openstack-network-connectivity-admin 	admin-guide-network 	OpenStack Networking Administration Guide
openstack-object-storage-admin 	DELETE
openstack-security 	security-guide	OpenStack Security Guide
openstack-training 	training-guide	OpenStack Training Guide
openstack-user 	        user-guide	OpenStack End User Guide
openstack-user-admin 	user-guide-admin	OpenStack Admin User Guide
glossary	        NEW        	OpenStack Glossary

bug: #1220407

Change-Id: Id5ffc774b966ba7b9a591743a877aa10ab3094c7
author: diane fleming
2013-09-08 15:15:50 -07:00

335 lines
17 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
xml:id="basic-install_controller-common">
<title>Common services</title>
<section xml:id="controller-os">
<title>Operating System</title>
<orderedlist>
<listitem>
<para>Install <phrase os="rhel;centos;fedora">Fedora 18</phrase>
<phrase os="opensuse">openSUSE 12.3</phrase>
<phrase os="ubuntu;debian">Ubuntu 12.04 or 13.04, or Debian Wheezy</phrase>.
The exact installation procedure is outside the scope of
this document, but please note the following
configurations:</para>
<itemizedlist>
<listitem>
<para>
Time zone: <emphasis role="bold">UTC</emphasis>
</para>
</listitem>
<listitem>
<para>
Hostname: <emphasis role="bold">cloud</emphasis>
</para>
</listitem>
<listitem>
<para>
Packages: <emphasis role="bold">OpenSSH-Server</emphasis>,
<emphasis role="bold">wget</emphasis>
</para>
</listitem>
</itemizedlist>
<para>
Once installation has finished, the server reboots.
</para>
</listitem>
<listitem>
<para>Setup the repositories as described in
<xref linkend="basic-install_common_repo" />.
</para>
</listitem>
<listitem>
<para>Configure the network:</para>
<para os="ubuntu;debian"><itemizedlist>
<listitem>
<para>Edit <filename>/etc/network/interfaces</filename>:
<programlisting># 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</programlisting>
</para>
</listitem>
<listitem os="ubuntu;debian"> <para>Edit <filename>/etc/sysctl.conf</filename>:
<programlisting>net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.default.rp_filter = 0</programlisting>
Then, restart the network service:
<screen><prompt>#</prompt> <userinput>service networking restart</userinput></screen>
And apply the sysctl settings:
<screen><prompt>#</prompt> <userinput>sysctl -e -p /etc/sysctl.conf</userinput></screen>
</para>
</listitem>
</itemizedlist>
</para>
<para os="rhel;centos;fedora"><itemizedlist>
<listitem>
<para>Set up old ethernet nic device names:</para>
<para>
<screen><prompt>#</prompt> <userinput>sed -i 's/# GOTO="netdevicename_end"/GOTO="netdevicename_end"/g' /lib/udev/rules.d/71-biosdevname.rules</userinput></screen>
</para>
</listitem>
<listitem>
<para>Disable NetworkManager and enable the network service
<screen><prompt>#</prompt> <userinput>service NetworkManager stop</userinput>
<prompt>#</prompt> <userinput>service network start</userinput>
<prompt>#</prompt> <userinput>chkconfig NetworkManager off</userinput>
<prompt>#</prompt> <userinput>chkconfig network on</userinput></screen>
</para>
</listitem>
<listitem>
<para>Edit <filename>/etc/sysconfig/network-scripts/ifcfg-eth0</filename>:
<programlisting># Internal Network
DEVICE=eth0
TYPE=Ethernet
BOOTPROTO=static
IPADDR=10.10.10.10
NETMASK=255.255.255.0
DEFROUTE=yes
ONBOOT=yes</programlisting>
</para>
</listitem>
<listitem>
<para>Edit <filename>/etc/sysconf/network-scripts/ifcfg-eth1</filename>:
<programlisting># 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</programlisting>
</para>
</listitem>
<listitem>
<para os="rhel;centos;fedora"> Reboot
</para>
</listitem>
</itemizedlist>
</para>
<para os="opensuse">
To set up the two network interfaces, start the YaST
network module, as follows:
<screen><prompt>#</prompt> <userinput>yast2 network</userinput></screen>
<itemizedlist>
<listitem>
<para>
Use the following parameters to set up the first ethernet card
<emphasis role="bold">eth0</emphasis> for the internal network:
<programlisting>
Statically assigned IP Address
IP Address: 10.10.10.10
Subnet Mask: 255.255.255.0
</programlisting>
</para>
</listitem>
<listitem>
<para>
Use the following parameters to set up the second ethernet card
<emphasis role="bold">eth1</emphasis> for the external network:
<programlisting>
Statically assigned IP Address
IP Address: 10.0.0.10
Subnet Mask: 255.255.255.0
</programlisting>
</para>
</listitem>
<listitem>
<para>
Use the following parameters to set up <emphasis role="bold">Routing</emphasis>:
<programlisting>
Default IPv4 Gateway: 10.0.0.1
Device: eth1
</programlisting>
</para>
</listitem>
<listitem>
<para>
Use the following parameters to set up <emphasis role="bold">Hostname/DNS</emphasis>:
<programlisting>
Hostname: cloud
Name Server 1: 8.8.8.8
</programlisting>
</para>
</listitem>
<listitem>
<para>
Save the configuration and leave YaST.
</para>
</listitem>
</itemizedlist>
</para>
<para>
<itemizedlist>
<listitem>
<para>Edit the <filename>/etc/hosts</filename> file and add
<emphasis role="bold">cloud</emphasis>,
<emphasis role="bold">network</emphasis>, and
<emphasis role="bold">c01</emphasis> hostnames with correct IP.
<programlisting>127.0.0.1 localhost
10.10.10.10 cloud
10.10.10.9 network
10.10.10.11 c01</programlisting>
<note>
<para>
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.
</para>
</note>
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>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.<itemizedlist>
<listitem>
<para>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install ntp</userinput></screen>
<screen os="rhel;fedora;centos"><prompt>#</prompt> <userinput>yum install ntp</userinput></screen>
<screen os="opensuse"><prompt>#</prompt> <userinput>zypper install ntp</userinput></screen>
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</orderedlist>
</section>
<section xml:id="controller-mysql">
<info>
<title>MySQL Database Service</title>
</info>
<para>The various OpenStack components store
persistent data in a relational database. MySQL is the
most popular choice. <orderedlist>
<listitem>
<para>Install the packages: <screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install python-mysqldb mysql-server</userinput></screen>
<screen os="rhel;fedora;centos"><prompt>#</prompt> <userinput>yum install mysql mysql-server MySQL-python</userinput></screen>
<screen os="opensuse"><prompt>#</prompt> <userinput>zypper install mysql-community-server-client mysql-community-server \
python-mysql</userinput></screen>
<note os="ubuntu;debian"> <para><literal>apt-get</literal>
prompts you to set the MySQL root
password.</para>
</note>
</para>
</listitem>
<listitem>
<para>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
<systemitem class="service">nova-conductor</systemitem> service. <screen os="ubuntu;debian"><prompt>#</prompt> <userinput>sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf</userinput></screen>
<screen os="rhel;fedora;centos"><prompt>#</prompt> <userinput>sed -i 's/127.0.0.1/0.0.0.0/g' /etc/my.cnf</userinput></screen>
<screen os="opensuse"><prompt>#</prompt> <userinput>sed -i 's/127.0.0.1/0.0.0.0/g' /etc/my.cnf</userinput></screen></para>
</listitem>
<listitem>
<para>Restart the service: <screen os="ubuntu;debian"><prompt>#</prompt> <userinput>service mysql restart</userinput></screen>
<screen os="rhel;fedora;centos"><prompt>#</prompt> <userinput>systemctl start mysqld</userinput></screen>
<screen os="rhel;fedora;centos"><prompt>#</prompt> <userinput>chkconfig mysqld on</userinput></screen>
<screen os="opensuse"><prompt>#</prompt> <userinput>systemctl start mysql</userinput></screen>
<screen os="opensuse"><prompt>#</prompt> <userinput>systemctl enable mysql</userinput></screen></para>
</listitem>
<listitem>
<para>The various databases that the OpenStack
services require need to be created. Additionally,
MySQL accounts to access those databases need
to be created:
<screen><prompt>#</prompt> <userinput>mysql -u root -p &lt;&lt;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</userinput></screen></para>
</listitem>
</orderedlist>
</para>
</section>
<section xml:id="controller-rabbitmq">
<title> <phrase os="rhel;centos;fedora">Qpid</phrase>
<phrase os="ubuntu;debian">RabbitMQ</phrase>
<phrase os="opensuse">RabbitMQ</phrase> Messaging Service</title>
<para>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.
<orderedlist>
<listitem>
<para>Install the packages:
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install rabbitmq-server</userinput></screen>
<screen os="rhel;fedora;centos"><prompt>#</prompt> <userinput>yum install qpid-cpp-server</userinput></screen>
<screen os="opensuse"><prompt>#</prompt> <userinput>zypper install rabbitmq-server</userinput></screen>
</para>
</listitem>
<listitem>
<para os="ubuntu;debian;opensuse">Change the default password:
<screen os="ubuntu;debian;opensuse"><prompt>#</prompt> <userinput>rabbitmqctl change_password guest password</userinput></screen>
<note>
<para>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.
</para>
</note>
</para>
<para os="rhel;fedora;centos">Enable authentication:
<screen os="rhel;fedora;centos"><prompt>#</prompt> <userinput>echo auth=1 >> /etc/qpidd.conf</userinput></screen>
</para>
<para os="rhel;fedora;centos">Add qpid user and password:
<screen><prompt>#$</prompt> <userinput>saslpasswd2 -f /var/lib/qpidd/qpidd.sasldb -u QPID guest</userinput>
<computeroutput>&gt;Password: guest
&gt;Again (for verification): guest</computeroutput></screen>
</para>
</listitem>
<listitem os="rhel;fedora;centos"><para>Enable the messaging service:</para>
<screen><prompt>#</prompt> <userinput>chkconfig qpidd on</userinput></screen>
</listitem>
<listitem os="rhel;fedora;centos"><para>Start the messaging service:</para>
<screen><prompt>#</prompt> <userinput>service qpidd start</userinput></screen>
</listitem>
<listitem os="opensuse">
<para>Enable the messaging service:</para>
<screen><prompt>#</prompt> <userinput>systemctl enable rabbitmq-server</userinput></screen>
</listitem>
<listitem os="opensuse">
<para>Start the messaging service:</para>
<screen><prompt>#</prompt> <userinput>systemctl start rabbitmq-server</userinput></screen>
</listitem>
</orderedlist>
</para>
</section>
</section>