2a2b1c8ecf
Change-Id: If8078c5fdeadb6193552cbd2a8549e6f297a4d5f Closes-Bug: #1283345
199 lines
9.9 KiB
XML
199 lines
9.9 KiB
XML
<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-node">
|
|
<?dbhtml-stop-chunking?>
|
|
<title>Configure a Block Storage Service node</title>
|
|
<para>After you configure the services on the controller node,
|
|
configure a second system to be a Block Storage Service node. This
|
|
node contains the disk that serves volumes.</para>
|
|
<para>You can configure OpenStack to use various storage systems.
|
|
The examples in this guide show you how to configure LVM.</para>
|
|
<procedure>
|
|
<step>
|
|
<para>Use the instructions in <xref linkend="ch_basics"/> to
|
|
configure the 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>. Ensure
|
|
that the IP addresses and host names for both nodes 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 from the controller node.</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</step>
|
|
<step os="ubuntu">
|
|
<para>
|
|
Install the required LVM packages, if they are not already installed:
|
|
<screen><prompt>#</prompt> <userinput>apt-get install lvm2</userinput></screen>
|
|
</para>
|
|
</step>
|
|
<step>
|
|
<para>Create the
|
|
LVM physical and logical volumes. This guide assumes a second
|
|
disk <literal>/dev/sdb</literal> that is 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>Add a filter entry to the devices section
|
|
<filename>/etc/lvm/lvm.conf</filename> to keep LVM from
|
|
scanning devices used by virtual machines:</para>
|
|
<note>
|
|
<para>You must add required physical volumes for LVM on the
|
|
Block Storage host. Run the <command>pvdisplay</command>
|
|
command to get a list or required 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 that
|
|
are required 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, <literal>/dev/sda1</literal> is the
|
|
volume 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>
|
|
<programlisting>devices {
|
|
...
|
|
filter = [ "a/sda1/", "a/sdb/", "r/.*/"]
|
|
...
|
|
}</programlisting>
|
|
</step>
|
|
<step>
|
|
<para>After you configure the operating system, install the
|
|
appropriate packages for the Block Storage Service:</para>
|
|
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install cinder-volume</userinput></screen>
|
|
<screen os="centos;rhel;fedora"><prompt>#</prompt> <userinput>yum install openstack-cinder</userinput></screen>
|
|
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-cinder-volume</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-rabbitqm">RabbitMQ
|
|
credentials</link>. Make sure to enter the same details as
|
|
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, provided that the <systemitem class="library"
|
|
>lvm2</systemitem> package is installed before Block Storage
|
|
(this should be the case if you configured the volume group first,
|
|
as this guide recommends), and tries to use the first one it
|
|
sees. If you have only one active volume group on your Block
|
|
Storage Service node, you do not need to manually enter its
|
|
name in when you install the <systemitem class="service"
|
|
>cinder-volume</systemitem> package because it is detected
|
|
automatically. If no <systemitem class="library"
|
|
>volume-group</systemitem> is available when you install
|
|
<systemitem class="service">cinder-common</systemitem>, you
|
|
must manually configure or re-configure <systemitem
|
|
class="service">cinder-common</systemitem> by using
|
|
<command>dpkg-reconfigure</command>.</para>
|
|
</step>
|
|
<step os="centos;rhel;fedora;opensuse;sles;ubuntu">
|
|
<para>Copy the <filename>/etc/cinder/api-paste.ini</filename>
|
|
file from the controller, or open the file in a text editor
|
|
and locate the section <literal>[filter:authtoken]</literal>.
|
|
Make sure the following options are set:</para>
|
|
<programlisting language="ini">[filter:authtoken]
|
|
paste.filter_factory=keystoneclient.middleware.auth_token:filter_factory
|
|
auth_host=<replaceable>controller</replaceable>
|
|
auth_port = 35357
|
|
auth_protocol = http
|
|
admin_tenant_name=service
|
|
admin_user=cinder
|
|
admin_password=<replaceable>CINDER_PASS</replaceable></programlisting>
|
|
</step>
|
|
<step os="ubuntu">
|
|
<para>Configure Block Storage to use the RabbitMQ message
|
|
broker by setting these configuration keys in the
|
|
<literal>[DEFAULT]</literal> configuration group of the
|
|
<filename>/etc/cinder/cinder.conf</filename> file. Replace
|
|
<replaceable>RABBIT_PASS</replaceable> with the password you
|
|
chose for RabbitMQ.</para>
|
|
<programlisting language="ini">[DEFAULT]
|
|
...
|
|
rpc_backend = cinder.openstack.common.rpc.impl_kombu
|
|
rabbit_host = <replaceable>controller</replaceable>
|
|
rabbit_port = 5672
|
|
rabbit_userid = guest
|
|
rabbit_password = <replaceable>RABBIT_PASS</replaceable></programlisting>
|
|
</step>
|
|
<step os="rhel;centos;fedora">
|
|
<para>Configure Block Storage to use the Qpid message broker.</para>
|
|
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
|
DEFAULT rpc_backend cinder.openstack.common.rpc.impl_qpid</userinput>
|
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
|
DEFAULT qpid_hostname controller</userinput></screen>
|
|
</step>
|
|
<step os="sles;opensuse">
|
|
<para>Configure Block Storage to use the RabbitMQ message broker.
|
|
Replace <replaceable>RABBIT_PASS</replaceable> with the password
|
|
you chose for RabbitMQ.</para>
|
|
<screen><prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
|
DEFAULT rpc_backend cinder.openstack.common.rpc.impl_kombu</userinput>
|
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
|
DEFAULT rabbit_host controller</userinput>
|
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
|
DEFAULT rabbit_port 5672</userinput>
|
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
|
DEFAULT rabbit_password <replaceable>RABBIT_PASS</replaceable></userinput></screen>
|
|
</step>
|
|
<step os="ubuntu;rhel;centos;fedora;opensuse;sles">
|
|
<para>Configure Block Storage to use your MySQL database. Edit the
|
|
<filename>/etc/cinder/cinder.conf</filename> file and add the following
|
|
key under the <literal>[database]</literal> section. Replace
|
|
<replaceable>CINDER_DBPASS</replaceable> with the password you chose
|
|
for the Block Storage database.</para>
|
|
<note os="ubuntu"><para>The <filename>/etc/cinder/cinder.conf</filename>
|
|
file packaged with some distributions does not include the
|
|
<literal>[database]</literal> section header. You must add this
|
|
section header to the end of the file before proceeding further.</para>
|
|
</note>
|
|
<screen os="rhel;centos;fedora;opensuse;sles"><prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
|
database connection mysql://cinder:<replaceable>CINDER_DBPASS</replaceable>@<replaceable>controller</replaceable>/cinder</userinput></screen>
|
|
<programlisting os="ubuntu" language="ini">[database]
|
|
...
|
|
connection = mysql://cinder:<replaceable>CINDER_DBPASS</replaceable>@<replaceable>controller</replaceable>/cinder</programlisting>
|
|
</step>
|
|
|
|
|
|
|
|
<step os="ubuntu">
|
|
<para>Restart the cinder service with its new settings:</para>
|
|
<screen><prompt>#</prompt> <userinput>service cinder-volume restart</userinput>
|
|
<prompt>#</prompt> <userinput>service tgt restart</userinput></screen>
|
|
</step>
|
|
|
|
|
|
<step os="rhel;fedora;centos">
|
|
<para>Configure the iSCSI target service to discover cinder
|
|
volumes. Add the following line to the beginning of the
|
|
<filename>/etc/tgt/targets.conf</filename> file, if it is
|
|
not already present:</para>
|
|
<programlisting>include /etc/cinder/volumes/*</programlisting>
|
|
</step>
|
|
|
|
<step os="rhel;fedora;centos;opensuse;sles">
|
|
<para>Start the cinder services and configure them to start when
|
|
the system boots:</para>
|
|
<screen>
|
|
<prompt>#</prompt> <userinput>service openstack-cinder-volume start</userinput>
|
|
<prompt>#</prompt> <userinput>service tgtd start</userinput>
|
|
<prompt>#</prompt> <userinput>chkconfig openstack-cinder-volume on</userinput>
|
|
<prompt>#</prompt> <userinput>chkconfig tgtd on</userinput></screen>
|
|
</step>
|
|
|
|
</procedure>
|
|
</section>
|