Merge "Flesh cinder install section"
This commit is contained in:
commit
24e3d0b1f5
@ -11,5 +11,6 @@
|
||||
explain the Block Storage components as well as how to configure and install Block
|
||||
Storage.</para>
|
||||
<xi:include href="../common/section_getstart_block-storage.xml"/>
|
||||
<xi:include href="section_cinder-controller.xml"/>
|
||||
<xi:include href="section_cinder-node.xml"/>
|
||||
</chapter>
|
||||
|
127
doc/install-guide/section_cinder-controller.xml
Normal file
127
doc/install-guide/section_cinder-controller.xml
Normal file
@ -0,0 +1,127 @@
|
||||
<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-controller">
|
||||
<title>Configuring a Block Storage Controller</title>
|
||||
|
||||
<para>To create the components that control the Block Storage Service, complete the following steps on the controller node.</para>
|
||||
|
||||
<para>You can configure OpenStack to use various storage systems.
|
||||
The examples in this guide show how to configure LVM.
|
||||
</para>
|
||||
<procedure>
|
||||
<title>Configure a Block Storage Controller</title>
|
||||
|
||||
<step><para>Install the appropriate
|
||||
packages for the Block Storage Service.</para>
|
||||
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install cinder-api cinder-scheduler</userinput></screen>
|
||||
<screen os="centos;rhel;fedora"><prompt>#</prompt> <userinput>yum install openstack-cinder openstack-utils openstack-selinux</userinput></screen>
|
||||
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-cinder-api openstack-cinder-scheduler</userinput></screen>
|
||||
</step>
|
||||
|
||||
<step os="rhel;centos;fedora;opensuse;sles"><para>The Block Storage Service stores volume information in a database.
|
||||
The examples in this section use the same MySQL database that is used by other OpenStack services.</para>
|
||||
<para>
|
||||
To create the Block Storage Service database and tables and a <literal>cinder</literal> database user, run the <command>openstack-db</command> command.
|
||||
Replace
|
||||
<literal><replaceable>CINDER_DBPASS</replaceable></literal> with a
|
||||
password of your choosing.</para>
|
||||
<screen><prompt>#</prompt> <userinput>openstack-db --init --service cinder --password <replaceable>CINDER_DBPASS</replaceable></userinput></screen></step>
|
||||
|
||||
<step os="ubuntu;debian">
|
||||
<para>The Block Storage Service stores volume information in a database.
|
||||
The examples in this section use the same MySQL database that is used by other OpenStack services.</para>
|
||||
<para>Using the password that you set in the previous example, log in as root to create a <literal>cinder</literal> database.</para>
|
||||
<screen><prompt>#</prompt> <userinput>mysql -u root -p</userinput>
|
||||
<prompt>mysql></prompt> <userinput>CREATE DATABASE cinder;</userinput>
|
||||
<prompt>mysql></prompt> <userinput>GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' \
|
||||
IDENTIFIED BY 'CINDER_DBPASS';</userinput></screen>
|
||||
</step>
|
||||
|
||||
|
||||
<step><para>Configure the Block Storage Service to use the created database.</para>
|
||||
<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>
|
||||
<para os="ubuntu;debian">Edit <filename>/etc/cinder/cinder.conf</filename>
|
||||
and change the <literal>[database]</literal> section.</para>
|
||||
<programlisting os="ubuntu;debian" language="ini">
|
||||
[database]
|
||||
...
|
||||
# The SQLAlchemy connection string used to connect to the
|
||||
# database (string value)
|
||||
connection = mysql://cinder:CINDER_DBPASS@localhost/cinder
|
||||
...
|
||||
</programlisting>
|
||||
|
||||
</step>
|
||||
|
||||
<step os="ubuntu;debian">
|
||||
<para>Create the database tables for the Block Storage Service.</para>
|
||||
<screen><prompt>#</prompt> <userinput>cinder-manage db sync</userinput></screen>
|
||||
</step>
|
||||
|
||||
|
||||
<step><para>Create a <literal>cinder</literal> user. The Block Storage
|
||||
Service use this user to authenticate with the Identity Service. Use the
|
||||
<literal>service</literal> tenant and give the user the
|
||||
<literal>admin</literal> role.</para>
|
||||
<screen><prompt>#</prompt> <userinput>keystone user-create --name=cinder --pass=<replaceable>CINDER_PASS</replaceable> --email=<replaceable>cinder@example.com</replaceable></userinput>
|
||||
<prompt>#</prompt> <userinput>keystone user-role-add --user=cinder --tenant=service --role=admin</userinput></screen></step>
|
||||
|
||||
<step> <para>Add the credentials to the file
|
||||
<filename>/etc/cinder/api-paste.ini</filename>. 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>
|
||||
admin_tenant_name=service
|
||||
admin_user=cinder
|
||||
admin_password=<replaceable>CINDER_PASS</replaceable>
|
||||
</programlisting>
|
||||
</step>
|
||||
|
||||
|
||||
|
||||
|
||||
<step><para>Register the Block Storage Service with the Identity Service
|
||||
so that other OpenStack services can locate it. Register the service and
|
||||
specify the endpoint using the <command>keystone</command> command.</para>
|
||||
<screen><prompt>#</prompt> <userinput>keystone service-create --name=cinder --type=volume \
|
||||
--description="Cinder Volume Service"</userinput></screen></step>
|
||||
<step><para>Note the service's <literal>id</literal> property returned in the previous step and use it when
|
||||
creating the endpoint.</para>
|
||||
<screen><prompt>#</prompt> <userinput>keystone endpoint-create \
|
||||
--service-id=<replaceable>the_service_id_above</replaceable> \
|
||||
--publicurl=http://<replaceable>controlller</replaceable>:8776/v1/%\(tenant_id\)s \
|
||||
--internalurl=http://<replaceable>controlller</replaceable>:8776/v1/%\(tenant_id\)s \
|
||||
--adminurl=http://<replaceable>controlller</replaceable>:8776/v1/%\(tenant_id\)s</userinput></screen>
|
||||
<screen><prompt>#</prompt> <userinput>keystone service-create --name=cinder --type=volumev2 \
|
||||
--description="Cinder Volume Service V2"</userinput></screen></step>
|
||||
<step><para>Note the service's <literal>id</literal> property returned in the previous step and use it when
|
||||
creating the endpoint.</para>
|
||||
<screen><prompt>#</prompt> <userinput>keystone endpoint-create \
|
||||
--service-id=<replaceable>the_service_id_above</replaceable> \
|
||||
--publicurl=http://<replaceable>controlller</replaceable>:8776/v2/%\(tenant_id\)s \
|
||||
--internalurl=http://<replaceable>controlller</replaceable>:8776/v2/%\(tenant_id\)s \
|
||||
--adminurl=http://<replaceable>controlller</replaceable>:8776/v2/%\(tenant_id\)s</userinput></screen>
|
||||
</step>
|
||||
|
||||
<step os="ubuntu;debian">
|
||||
<para>We now restart the cinder service with its new settings.</para>
|
||||
<screen><prompt>#</prompt> <userinput>service cinder-scheduler restart</userinput>
|
||||
<prompt>#</prompt> <userinput>service cinder-api restart</userinput></screen>
|
||||
</step>
|
||||
|
||||
<step os="rhel;fedora;centos;opensuse;sles"><para>Start the cinder services and configure them to
|
||||
start when the system boots.</para>
|
||||
<screen os="rhel;fedora;centos;opensuse;sles"><prompt>#</prompt> <userinput>service openstack-cinder-api start</userinput>
|
||||
<prompt>#</prompt> <userinput>service openstack-cinder-scheduler start</userinput>
|
||||
<prompt>#</prompt> <userinput>chkconfig openstack-cinder-api on</userinput>
|
||||
<prompt>#</prompt> <userinput>chkconfig openstack-cinder-scheduler on</userinput></screen>
|
||||
</step>
|
||||
</procedure>
|
||||
</section>
|
@ -5,16 +5,13 @@
|
||||
xml:id="cinder-node">
|
||||
<title>Configuring a Block Storage Node</title>
|
||||
|
||||
<para>After configuring the services on the controller node, configure a second system to
|
||||
be a Block Storage node.</para>
|
||||
<para>After you configure the services on the controller node, configure a second system to be a Block Storage node. This node contains the disk that will be used to serve volumes.</para>
|
||||
|
||||
<para>The Block Storage Service relies on a driver for a particular
|
||||
storage system. OpenStack can use various systemes, but this guide uses
|
||||
LVM.</para>
|
||||
<para>You can configure OpenStack to use various storage systems. The examples in this guide show how to configure LVM.</para>
|
||||
<procedure>
|
||||
<title>Configure a Block Storage Node</title>
|
||||
<step><para>Begin by configuring the system using the instructions in
|
||||
<xref linkend="ch_basics"/>. Note the following differences from the
|
||||
<step><para>Using the instructions in
|
||||
<xref linkend="ch_basics"/> to configure the system. Note the following differences from the
|
||||
controller node:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
@ -29,13 +26,86 @@
|
||||
</itemizedlist>
|
||||
</step>
|
||||
|
||||
<step><para>After configuring the operating system, install the appropriate
|
||||
<step><para>After you configure the operating system, install the appropriate
|
||||
packages for the block storage service.</para>
|
||||
<!-- FIXME: Double check list of packages for ubuntu -->
|
||||
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install cinder-api cinder-scheduler cinder-volume</userinput></screen>
|
||||
<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 openstack-utils openstack-selinux</userinput></screen>
|
||||
<screen os="opensuse"><prompt>#</prompt> <userinput>zypper install openstack-cinder-api openstack-cinder-scheduler \
|
||||
openstack-cinder-volume</userinput></screen>
|
||||
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-cinder-volume</userinput></screen>
|
||||
</step>
|
||||
|
||||
|
||||
<step> <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>
|
||||
admin_tenant_name=service
|
||||
admin_user=cinder
|
||||
admin_password=<replaceable>CINDER_DBPASS</replaceable>
|
||||
</programlisting>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
<para>Configure messaging also in <filename>/etc/cinder/cinder.conf</filename>.</para>
|
||||
<programlisting os="ubuntu">
|
||||
rabbit_host = controller
|
||||
rabbit_port = 5672
|
||||
# Change the following settings if you're not using the default RabbitMQ configuration
|
||||
#rabbit_userid = guest
|
||||
#rabbit_password = guest
|
||||
#rabbit_virtual_host = /nova</programlisting>
|
||||
<programlisting os="rhel;centos;fedora">
|
||||
qpid_hostname = controller</programlisting>
|
||||
<programlisting os="opensuse;sles">
|
||||
rabbit_host = controller
|
||||
rabbit_port = 5672
|
||||
# Change the following settings if you're not using the default RabbitMQ configuration
|
||||
#rabbit_userid = guest
|
||||
#rabbit_password = guest
|
||||
#rabbit_virtual_host = /nova</programlisting>
|
||||
</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 every physical volume that is
|
||||
needed for LVM on the Cinder host. You can get a list by running
|
||||
<command>pvdisplay</command>.</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.
|
||||
Physical volumes that are needed on the Cinder host begin with
|
||||
"<literal>a</literal>". The array must end with
|
||||
"<literal>r/.*/</literal>"</para>
|
||||
<programlisting>devices {
|
||||
...
|
||||
filter = [ "a/sda1/", "a/sdb1/", "r/.*/"]
|
||||
...
|
||||
}</programlisting>
|
||||
</step>
|
||||
|
||||
|
||||
<step os="ubuntu;debian">
|
||||
<para>We now 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;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>
|
||||
|
Loading…
Reference in New Issue
Block a user