Files
openstack-manuals/doc/install-guide/section_cinder-node.xml
Matthew Kassawara 9fa8994b9d Update cinder content for Juno
I explicitly added the Python MySQL library to list of packages
to install on RHEL/CentOS/Fedora, Ubuntu, and Debian.

Change-Id: I2371d99af7c9eed92d964a401b968fffb97f9fac
2014-10-14 21:20:25 -05:00

270 lines
13 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="cinder-install-storage-node">
<?dbhtml stop-chunking?>
<title>Configure a Block Storage service node</title>
<para>After you configure the services on the controller node,
configure a Block Storage service node, which contains the disk
that serves volumes.</para>
<para>You can configure OpenStack to use various storage systems.
This procedure uses LVM as an example.</para>
<procedure>
<title>To configure the operating system</title>
<step>
<para>Refer to the instructions in <xref linkend="ch_basic_environment"/>
to configure the operating system. Note the following differences
from the installation instructions for the controller node:</para>
<itemizedlist>
<listitem>
<para>Set the host name to <literal>block1</literal> and use
<literal>10.0.0.41</literal> as IP address on the management
network interface. Ensure that the IP addresses and host
names for both controller node and Block Storage service
node are listed in the <filename>/etc/hosts</filename> file
on each system.</para>
</listitem>
<listitem>
<para>Follow the instructions in <xref linkend="basics-ntp"
/> to synchronize the time from the controller node.</para>
</listitem>
</itemizedlist>
</step>
</procedure>
<procedure>
<title>To create a logical volume</title>
<step os="ubuntu;debian;rhel;centos;fedora">
<para>Install the LVM packages:</para>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install lvm2</userinput></screen>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install lvm2</userinput></screen>
<note>
<para>Some distributions include LVM by default.</para>
</note>
</step>
<step os="rhel;centos;fedora">
<para>Start the LVM metadata service and configure it to start when the
system boots:</para>
<screen><prompt>#</prompt> <userinput>systemctl enable lvm2-lvmetad.service</userinput>
<prompt>#</prompt> <userinput>systemctl start lvm2-lvmetad.service</userinput></screen>
</step>
<step>
<para>Create the LVM physical volume and volume group. This guide
assumes a second disk <literal>/dev/sdb</literal> is being used
for this purpose:</para>
<screen><prompt>#</prompt> <userinput>pvcreate /dev/sdb</userinput>
<prompt>#</prompt> <userinput>vgcreate cinder-volumes /dev/sdb</userinput></screen>
</step>
<step>
<para>In the <literal>devices</literal> section in the
<filename>/etc/lvm/lvm.conf</filename> file, add the filter entry
<literal>r/.*/</literal> to prevent LVM from scanning devices
used by virtual machines:</para>
<programlisting>devices {
...
filter = [ "a/sda1/", "a/sdb/", "r/.*/"]
...
}</programlisting>
<note>
<para>You must add the required physical volumes for LVM on the
Block Storage host. Run the <command>pvdisplay</command>
command to get a list of physical volumes.</para>
</note>
<para>Each item in the filter array starts with either an
<literal>a</literal> for accept, or an <literal>r</literal>
for reject. The physical volumes on the Block Storage host have
names that begin with <literal>a</literal>. The array must end
with "<literal>r/.*/</literal>" to reject any device not
listed.</para>
<para>In this example, the <literal>/dev/sda1</literal> volume is
where the volumes for the operating system for the node
reside, while <literal>/dev/sdb</literal> is the volume
reserved for <literal>cinder-volumes</literal>.</para>
</step>
</procedure>
<procedure>
<title>Install and configure Block Storage service node components</title>
<step>
<para>Install the packages for the Block Storage service:</para>
<screen os="debian;ubuntu"><prompt>#</prompt> <userinput>apt-get install cinder-volume python-mysqldb</userinput></screen>
<screen os="centos;fedora;rhel"><prompt>#</prompt> <userinput>yum install openstack-cinder targetcli python-oslo-db MySQL-python</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-cinder-volume tgt python-mysql</userinput></screen>
</step>
<step os="debian">
<para>Respond to the <systemitem class="library"
>debconf</systemitem> prompts about the <link
linkend="debconf-dbconfig-common">database
management</link>, <link linkend="debconf-keystone_authtoken"
><literal>[keystone_authtoken]</literal> settings</link>,
and <link linkend="debconf-rabbitmq">RabbitMQ credentials</link>.
Enter the same details as you did for your Block Storage service
controller node.</para>
<para>Another screen prompts you for the <systemitem
class="library">volume-group</systemitem> to use. The Debian
package configuration script detects every active volume group
and tries to use the first one it sees, provided that the
<systemitem class="library">lvm2</systemitem> package was
installed before Block Storage. This should be the case if you
configured the volume group first, as this guide recommends.</para>
<para>If you have only one active volume group on your Block
Storage service node, its name is automatically detected when you install the <systemitem class="service"
>cinder-volume</systemitem> package. If no <literal
>volume-group</literal> is available when you install
<systemitem class="service">cinder-common</systemitem>, you
must use <command>dpkg-reconfigure</command> to manually
configure or re-configure <systemitem class="service"
>cinder-common</systemitem>.</para>
</step>
<step os="centos;debian;fedora;opensuse;rhel;sles;ubuntu">
<para>Edit the <filename>/etc/cinder/cinder.conf</filename> file
and complete the following actions:</para>
<substeps>
<step os="centos;fedora;opensuse;rhel;sles;ubuntu">
<para>In the <literal>[database]</literal> section, configure
database access:</para>
<programlisting language="ini">[database]
...
connection = mysql://cinder:<replaceable>CINDER_DBPASS</replaceable>@<replaceable>controller</replaceable>/cinder</programlisting>
<para>Replace <replaceable>CINDER_DBPASS</replaceable> with
the password you chose for the Block Storage database.</para>
</step>
<step os="centos;fedora;opensuse;rhel;sles;ubuntu">
<para>In the <literal>[DEFAULT]</literal> section, configure
<application>RabbitMQ</application> message broker access:</para>
<programlisting language="ini">[DEFAULT]
...
rpc_backend = rabbit
rabbit_host = <replaceable>controller</replaceable>
rabbit_password = <replaceable>RABBIT_PASS</replaceable></programlisting>
<para>Replace <replaceable>RABBIT_PASS</replaceable> with the
password you chose for the <literal>guest</literal> account in
RabbitMQ.</para>
</step>
<step os="centos;fedora;opensuse;rhel;sles;ubuntu">
<para>In the <literal>[DEFAULT]</literal> and
<literal>[keystone_authtoken]</literal> sections,
configure Identity service access:</para>
<programlisting language="ini">[DEFAULT]
...
auth_strategy = keystone
[keystone_authtoken]
...
auth_uri = http://<replaceable>controller</replaceable>:5000/v2.0
identity_uri = http://<replaceable>controller</replaceable>:35357
admin_tenant_name = service
admin_user = cinder
admin_password = <replaceable>CINDER_PASS</replaceable></programlisting>
<para>Replace <replaceable>CINDER_PASS</replaceable> with the
password you chose for the <literal>cinder</literal> user in the
Identity service.</para>
<note>
<para>Comment out any <literal>auth_host</literal>,
<literal>auth_port</literal>, and
<literal>auth_protocol</literal> options because the
<literal>identity_uri</literal> option replaces them.</para>
</note>
</step>
<step os="ubuntu;rhel;centos;fedora;sles;opensuse">
<para>In the <literal>[DEFAULT]</literal> section, configure the
<literal>my_ip</literal> option:</para>
<programlisting language="ini">[DEFAULT]
...
my_ip = <replaceable>MANAGEMENT_INTERFACE_IP_ADDRESS</replaceable></programlisting>
<para>Replace
<replaceable>MANAGEMENT_INTERFACE_IP_ADDRESS</replaceable> with
the IP address of the management network interface on your
storage node, typically 10.0.0.41 for the first node in the
<link linkend="architecture_example-architectures">example
architecture</link>.</para>
</step>
<step>
<para>In the <literal>[DEFAULT]</literal> section, configure the
location of the Image Service:</para>
<programlisting language="ini">[DEFAULT]
...
glance_host = <replaceable>controller</replaceable></programlisting>
</step>
<step os="centos;fedora;rhel">
<para>In the <literal>[DEFAULT]</literal> section, configure Block
Storage to use the <command>lioadm</command> iSCSI
service:</para>
<programlisting language="ini">[DEFAULT]
...
iscsi_helper = lioadm</programlisting>
</step>
<step>
<para>(Optional) To assist with troubleshooting,
enable verbose logging in the <literal>[DEFAULT]</literal>
section:</para>
<programlisting language="ini">[DEFAULT]
...
verbose = True</programlisting>
</step>
</substeps>
</step>
<step os="ubuntu">
<para>Due to a packaging bug, the Block Storage service cannot
execute commands with administrative privileges using the
<command>sudo</command> command. Run the following command to
resolve this issue:</para>
<screen><prompt>#</prompt> <userinput>cp /etc/sudoers.d/cinder_sudoers /etc/sudoers.d/cinder_sudoers.orig</userinput>
<prompt>#</prompt> <userinput>sed -i 's,/etc/cinder/rootwrap.conf,/etc/cinder/rootwrap.conf *,g' \
/etc/sudoers.d/cinder_sudoers</userinput></screen>
<para>For more information, see the
<link xlink:href="https://bugs.launchpad.net/ubuntu/+source/cinder/+bug/1380425"
>bug report</link>.</para>
</step>
</procedure>
<procedure os="centos;fedora;opensuse;rhel;sles;ubuntu">
<title>To finalize installation</title>
<step os="ubuntu">
<para>Restart the Block Storage services with the new
settings:</para>
<screen><prompt>#</prompt> <userinput>service tgt restart</userinput>
<prompt>#</prompt> <userinput>service cinder-volume restart</userinput></screen>
</step>
<step os="ubuntu">
<para>By default, the Ubuntu packages create a SQLite database.
Because this configuration uses a SQL database server, remove
the SQLite database file:</para>
<screen><prompt>#</prompt> <userinput>rm -f /var/lib/cinder/cinder.sqlite</userinput></screen>
</step>
<step os="centos;fedora;rhel">
<para>Enable the target service:</para>
<screen><prompt>#</prompt> <userinput>systemctl enable target.service</userinput></screen>
</step>
<step os="centos;fedora;rhel">
<para>Start the target service:</para>
<screen><prompt>#</prompt> <userinput>systemctl start target.service</userinput></screen>
</step>
<step os="opensuse;sles">
<para>Start and configure the Block Storage services to start
- when the system boots:</para>
<para>On SLES:</para>
<screen><prompt>#</prompt> <userinput>service tgtd start</userinput>
<prompt>#</prompt> <userinput>chkconfig tgtd on</userinput></screen>
<para>On openSUSE:</para>
<screen><prompt>#</prompt> <userinput>systemctl enable tgtd.service</userinput>
<prompt>#</prompt> <userinput>systemctl start tgtd.service</userinput></screen>
</step>
<step os="centos;fedora;rhel">
<para>Start and configure the cinder volume service to start
when the system boots:</para>
<screen><prompt>#</prompt> <userinput>systemctl enable openstack-cinder-volume.service</userinput>
<prompt>#</prompt> <userinput>systemctl start openstack-cinder-volume.service</userinput></screen>
</step>
<step os="opensuse;sles">
<para>Start and configure the cinder volume service to start
when the system boots:</para>
<para>On SLES:</para>
<screen><prompt>#</prompt> <userinput>service openstack-cinder-volume start</userinput>
<prompt>#</prompt> <userinput>chkconfig openstack-cinder-volume on</userinput></screen>
<para>On openSUSE:</para>
<screen><prompt>#</prompt> <userinput>systemctl enable openstack-cinder-volume.service</userinput>
<prompt>#</prompt> <userinput>systemctl start openstack-cinder-volume.service</userinput></screen>
</step>
</procedure>
</section>