Change cinder install to use keystone_authtoken
We should no longer edit api-paste.ini, instead we should follow the same keystone_authtoken section edits. Change-Id: Ic8d21108c5f91179b33a4275985f04d5444eee29
This commit is contained in:
parent
e207423d38
commit
e9bde9eefd
@ -4,16 +4,17 @@
|
|||||||
xml:id="cinder-controller">
|
xml:id="cinder-controller">
|
||||||
<title>Configure a Block Storage service controller</title>
|
<title>Configure a Block Storage service controller</title>
|
||||||
<note>
|
<note>
|
||||||
<para>This section describes how to configure OpenStack Block Storage
|
<para>This scenario configures OpenStack Block Storage
|
||||||
services on the <glossterm baseform="controller node">Controller node</glossterm>
|
services on the <glossterm baseform="controller node">Controller node</glossterm>
|
||||||
and assumes that a
|
and assumes that a
|
||||||
second node provides storage through the <systemitem
|
second node provides storage through the <systemitem
|
||||||
class="service">cinder-volume</systemitem> service. For
|
class="service">cinder-volume</systemitem> service.</para>
|
||||||
|
<para>For
|
||||||
instructions on how to configure the second node, see <xref
|
instructions on how to configure the second node, see <xref
|
||||||
linkend="cinder-node"/>.</para>
|
linkend="cinder-node"/>.</para>
|
||||||
</note>
|
</note>
|
||||||
<para>You can configure OpenStack to use various storage systems.
|
<para>You can configure OpenStack to use various storage systems.
|
||||||
The examples in this guide show you how to configure LVM.</para>
|
This example uses LVM.</para>
|
||||||
<procedure>
|
<procedure>
|
||||||
<step>
|
<step>
|
||||||
<para>Install the appropriate packages for the Block Storage
|
<para>Install the appropriate packages for the Block Storage
|
||||||
@ -23,32 +24,24 @@
|
|||||||
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-cinder-api openstack-cinder-scheduler</userinput></screen>
|
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-cinder-api openstack-cinder-scheduler</userinput></screen>
|
||||||
</step>
|
</step>
|
||||||
<step os="debian">
|
<step os="debian">
|
||||||
<para>Respond to the prompts for <link
|
<para>Respond to the prompts for database
|
||||||
linkend="debconf-dbconfig-common">database
|
management, <literal>[keystone_authtoken]</literal> settings, RabbitMQ credentials and API endpoint registration.</para>
|
||||||
management</link>, <link linkend="debconf-keystone_authtoken"
|
|
||||||
><literal>[keystone_authtoken]</literal> settings</link>,
|
|
||||||
<link linkend="debconf-rabbitqm">RabbitMQ credentials</link>
|
|
||||||
and <link linkend="debconf-api-endpoints">API endpoint</link>
|
|
||||||
registration.</para>
|
|
||||||
</step>
|
</step>
|
||||||
<step os="ubuntu;rhel;centos;fedora;opensuse;sles">
|
<step os="ubuntu;rhel;centos;fedora;opensuse;sles">
|
||||||
<para>Configure Block Storage to use your MySQL database. Edit the
|
<para>Configure Block Storage to use your database.</para>
|
||||||
<filename>/etc/cinder/cinder.conf</filename> file and add the
|
<para>In the
|
||||||
following key under the <literal>[database]</literal> section.
|
<filename>/etc/cinder/cinder.conf</filename> file, add this key in the <literal>[database]</literal> section and replace <replaceable>CINDER_DBPASS</replaceable> with the password
|
||||||
Replace <replaceable>CINDER_DBPASS</replaceable> with the password
|
for the Block Storage database that you will create in a later step:</para>
|
||||||
for the Block Storage database that you will create in a later step.
|
|
||||||
</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 \
|
<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>
|
database connection mysql://cinder:<replaceable>CINDER_DBPASS</replaceable>@<replaceable>controller</replaceable>/cinder</userinput></screen>
|
||||||
<programlisting os="ubuntu" language="ini">[database]
|
<programlisting os="ubuntu" language="ini">[database]
|
||||||
...
|
...
|
||||||
connection = mysql://cinder:<replaceable>CINDER_DBPASS</replaceable>@<replaceable>controller</replaceable>/cinder</programlisting>
|
connection = mysql://cinder:<replaceable>CINDER_DBPASS</replaceable>@<replaceable>controller</replaceable>/cinder</programlisting>
|
||||||
</step>
|
<note os="ubuntu"><para>In some distributions, the <filename>/etc/cinder/cinder.conf</filename>
|
||||||
|
file does not include the
|
||||||
|
<literal>[database]</literal> section header. You must add this
|
||||||
|
section header to the end of the file before you proceed.</para>
|
||||||
|
</note></step>
|
||||||
<step os="rhel;centos;fedora;opensuse;sles">
|
<step os="rhel;centos;fedora;opensuse;sles">
|
||||||
<para>To create the Block Storage service database and tables
|
<para>To create the Block Storage service database and tables
|
||||||
and a <literal>cinder</literal> database user, run the
|
and a <literal>cinder</literal> database user, run the
|
||||||
@ -57,51 +50,67 @@ connection = mysql://cinder:<replaceable>CINDER_DBPASS</replaceable>@<replaceabl
|
|||||||
</step>
|
</step>
|
||||||
<step os="ubuntu">
|
<step os="ubuntu">
|
||||||
<para>Use the password that you set to log in as root to create
|
<para>Use the password that you set to log in as root to create
|
||||||
a <literal>cinder</literal> database.</para>
|
a <literal>cinder</literal> database:</para>
|
||||||
<screen><prompt>$</prompt> <userinput>mysql -u root -p</userinput>
|
<screen><prompt>#</prompt> <userinput>mysql -u root -p</userinput></screen>
|
||||||
<prompt>mysql></prompt> <userinput>CREATE DATABASE cinder;</userinput>
|
<screen><prompt>mysql></prompt> <userinput>CREATE DATABASE cinder;</userinput></screen>
|
||||||
<prompt>mysql></prompt> <userinput>GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' \
|
<screen><prompt>mysql></prompt> <userinput>GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' IDENTIFIED BY '<replaceable>CINDER_DBPASS</replaceable>';</userinput></screen>
|
||||||
IDENTIFIED BY '<replaceable>CINDER_DBPASS</replaceable>';</userinput>
|
<screen><prompt>mysql></prompt> <userinput>GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' IDENTIFIED BY '<replaceable>CINDER_DBPASS</replaceable>';</userinput></screen>
|
||||||
<prompt>mysql></prompt> <userinput>GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' \
|
|
||||||
IDENTIFIED BY '<replaceable>CINDER_DBPASS</replaceable>';</userinput></screen>
|
|
||||||
</step>
|
</step>
|
||||||
<step os="ubuntu">
|
<step os="ubuntu">
|
||||||
<para>Create the database tables for the Block Storage
|
<para>Create the database tables for the Block Storage
|
||||||
service.</para>
|
service:</para>
|
||||||
<screen><prompt>#</prompt> <userinput>cinder-manage db sync</userinput></screen>
|
<screen><prompt>#</prompt> <userinput>cinder-manage db sync</userinput></screen>
|
||||||
</step>
|
</step>
|
||||||
<step os="rhel;centos;fedora;opensuse;sles;ubuntu">
|
<step os="rhel;centos;fedora;opensuse;sles;ubuntu">
|
||||||
<para>Create a <literal>cinder</literal> user. The Block Storage
|
<para>Create a <literal>cinder</literal> user.</para>
|
||||||
service uses this user to authenticate with the Identity
|
<para>The Block Storage service uses this user to authenticate
|
||||||
service. Use the <literal>service</literal> tenant and give
|
with the Identity service.</para>
|
||||||
the user the <literal>admin</literal> role.</para>
|
<para>Use the <literal>service</literal> tenant and give the
|
||||||
<screen><prompt>$</prompt> <userinput>keystone user-create --name=cinder --pass=<replaceable>CINDER_PASS</replaceable> --email=<replaceable>cinder@example.com</replaceable></userinput>
|
user the <literal>admin</literal> role:</para>
|
||||||
<prompt>$</prompt> <userinput>keystone user-role-add --user=cinder --tenant=service --role=admin</userinput></screen>
|
<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>
|
||||||
<step os="rhel;centos;fedora;opensuse;sles;ubuntu">
|
<step>
|
||||||
<para>Add the credentials to the file
|
<para os="fedora;rhel;centos;opensuse;sles">Edit the
|
||||||
<filename>/etc/cinder/api-paste.ini</filename>. Open the
|
<filename>/etc/cinder/cinder.conf</filename> configuration file:</para>
|
||||||
file in a text editor and locate the section
|
<screen os="fedora;rhel;centos;opensuse;sles"><prompt>#</prompt>
|
||||||
<literal>[filter:authtoken]</literal>. Set the following
|
<userinput>openstack-config --set /etc/cinder/cinder.conf DEFAULT \
|
||||||
options:</para>
|
auth_strategy keystone</userinput>
|
||||||
<programlisting language="ini">[filter:authtoken]
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \
|
||||||
paste.filter_factory=keystoneclient.middleware.auth_token:filter_factory
|
auth_uri http://<replaceable>controller</replaceable>:5000</userinput>
|
||||||
auth_host=<replaceable>controller</replaceable>
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.confkeystone_authtoken \
|
||||||
|
auth_host <replaceable>controller</replaceable></userinput>
|
||||||
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \
|
||||||
|
auth_protocol http</userinput>
|
||||||
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \
|
||||||
|
auth_port 35357</userinput>
|
||||||
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \
|
||||||
|
admin_user cinder</userinput>
|
||||||
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \
|
||||||
|
admin_tenant_name service</userinput>
|
||||||
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \
|
||||||
|
admin_password <replaceable>CINDER_PASS</replaceable></userinput></screen>
|
||||||
|
<para os="ubuntu;debian">Edit the
|
||||||
|
<filename>/etc/cinder/cinder.conf</filename> configuration
|
||||||
|
file and add this section for keystone credentials:</para>
|
||||||
|
<programlisting os="ubuntu;debian" language="ini">...
|
||||||
|
[keystone_authtoken]
|
||||||
|
auth_uri = http://<replaceable>controller</replaceable>:5000
|
||||||
|
auth_host = <replaceable>controller</replaceable>
|
||||||
auth_port = 35357
|
auth_port = 35357
|
||||||
auth_protocol = http
|
auth_protocol = http
|
||||||
auth_uri = http://<replaceable>controller</replaceable>:5000
|
admin_tenant_name = service
|
||||||
admin_tenant_name=service
|
admin_user = cinder
|
||||||
admin_user=cinder
|
admin_password = <replaceable>CINDER_PASS</replaceable></programlisting>
|
||||||
admin_password=<replaceable>CINDER_PASS</replaceable>
|
|
||||||
</programlisting>
|
|
||||||
</step>
|
</step>
|
||||||
<step os="ubuntu">
|
<step os="ubuntu">
|
||||||
<para>Configure Block Storage to use the RabbitMQ message
|
<para>Configure Block Storage to use the RabbitMQ message
|
||||||
broker by setting these configuration keys in the
|
broker.</para>
|
||||||
<literal>[DEFAULT]</literal> configuration group of the
|
<para>In the <literal>[DEFAULT]</literal> section in
|
||||||
<filename>/etc/cinder/cinder.conf</filename> file. Replace
|
the <filename>/etc/cinder/cinder.conf</filename> file, set
|
||||||
<replaceable>RABBIT_PASS</replaceable> with the password you
|
these configuration keys and replace
|
||||||
chose for RabbitMQ.</para>
|
<replaceable>RABBIT_PASS</replaceable> with the password you
|
||||||
|
chose for RabbitMQ:</para>
|
||||||
<programlisting language="ini">[DEFAULT]
|
<programlisting language="ini">[DEFAULT]
|
||||||
...
|
...
|
||||||
rpc_backend = cinder.openstack.common.rpc.impl_kombu
|
rpc_backend = cinder.openstack.common.rpc.impl_kombu
|
||||||
@ -111,16 +120,18 @@ rabbit_userid = guest
|
|||||||
rabbit_password = <replaceable>RABBIT_PASS</replaceable></programlisting>
|
rabbit_password = <replaceable>RABBIT_PASS</replaceable></programlisting>
|
||||||
</step>
|
</step>
|
||||||
<step os="rhel;centos;fedora">
|
<step os="rhel;centos;fedora">
|
||||||
<para>Configure Block Storage to use the Qpid message broker.</para>
|
<para>Configure Block Storage to use the Qpid message
|
||||||
|
broker:</para>
|
||||||
<screen><prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
<screen><prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
||||||
DEFAULT rpc_backend cinder.openstack.common.rpc.impl_qpid</userinput>
|
DEFAULT rpc_backend cinder.openstack.common.rpc.impl_qpid</userinput>
|
||||||
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
||||||
DEFAULT qpid_hostname controller</userinput></screen>
|
DEFAULT qpid_hostname controller</userinput></screen>
|
||||||
</step>
|
</step>
|
||||||
<step os="sles;opensuse">
|
<step os="sles;opensuse">
|
||||||
<para>Configure Block Storage to use the RabbitMQ message broker.
|
<para>Configure Block Storage to use the RabbitMQ message
|
||||||
Replace <replaceable>RABBIT_PASS</replaceable> with the password
|
broker.</para>
|
||||||
you chose for RabbitMQ.</para>
|
<para>Replace <replaceable>RABBIT_PASS</replaceable> with the
|
||||||
|
password you chose for RabbitMQ:</para>
|
||||||
<screen><prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
<screen><prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
||||||
DEFAULT rpc_backend cinder.openstack.common.rpc.impl_kombu</userinput>
|
DEFAULT rpc_backend cinder.openstack.common.rpc.impl_kombu</userinput>
|
||||||
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
||||||
@ -130,39 +141,35 @@ rabbit_password = <replaceable>RABBIT_PASS</replaceable></programlisting>
|
|||||||
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
||||||
DEFAULT rabbit_password <replaceable>RABBIT_PASS</replaceable></userinput></screen>
|
DEFAULT rabbit_password <replaceable>RABBIT_PASS</replaceable></userinput></screen>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step os="rhel;centos;fedora;opensuse;sles;ubuntu">
|
<step os="rhel;centos;fedora;opensuse;sles;ubuntu">
|
||||||
<para>Register the Block Storage service with the Identity
|
<para>Register the Block Storage service with the Identity
|
||||||
Service so that other OpenStack services can locate it.
|
service so that other OpenStack services can locate it:</para>
|
||||||
Register the service and specify the endpoint using the
|
<screen><prompt>$</prompt> <userinput>keystone service-create --name=cinder --type=volume --description="OpenStack Block Storage"</userinput></screen>
|
||||||
<command>keystone</command> command.</para>
|
<screen><prompt>$</prompt> <userinput>keystone endpoint-create \
|
||||||
<screen><prompt>$</prompt> <userinput>keystone service-create --name=cinder --type=volume \
|
|
||||||
--description="OpenStack Block Storage"</userinput>
|
|
||||||
<prompt>$</prompt> <userinput>keystone endpoint-create \
|
|
||||||
--service-id=$(keystone service-list | awk '/ volume / {print $2}') \
|
--service-id=$(keystone service-list | awk '/ volume / {print $2}') \
|
||||||
--publicurl=http://<replaceable>controller</replaceable>:8776/v1/%\(tenant_id\)s \
|
--publicurl=http://<replaceable>controller</replaceable>:8776/v1/%\(tenant_id\)s \
|
||||||
--internalurl=http://<replaceable>controller</replaceable>:8776/v1/%\(tenant_id\)s \
|
--internalurl=http://<replaceable>controller</replaceable>:8776/v1/%\(tenant_id\)s \
|
||||||
--adminurl=http://<replaceable>controller</replaceable>:8776/v1/%\(tenant_id\)s</userinput></screen>
|
--adminurl=http://<replaceable>controller</replaceable>:8776/v1/%\(tenant_id\)s</userinput></screen>
|
||||||
</step>
|
</step>
|
||||||
<step os="rhel;centos;fedora;opensuse;sles;ubuntu">
|
<step os="rhel;centos;fedora;opensuse;sles;ubuntu">
|
||||||
<para>Also register a service and endpoint for version 2 of the
|
<para>Register a service and endpoint for version 2 of the Block
|
||||||
Block Storage service API.</para>
|
Storage service API:</para>
|
||||||
<screen><prompt>#</prompt> <userinput>keystone service-create --name=cinderv2 --type=volumev2 \
|
<screen><prompt>$</prompt> <userinput>keystone service-create --name=cinderv2 --type=volumev2 --description="OpenStack Block Storage v2"</userinput></screen>
|
||||||
--description="OpenStack Block Storage v2"</userinput>
|
<screen><prompt>$</prompt> <userinput>keystone endpoint-create \
|
||||||
<prompt>$</prompt> <userinput>keystone endpoint-create \
|
|
||||||
--service-id=$(keystone service-list | awk '/ volumev2 / {print $2}') \
|
--service-id=$(keystone service-list | awk '/ volumev2 / {print $2}') \
|
||||||
--publicurl=http://<replaceable>controller</replaceable>:8776/v2/%\(tenant_id\)s \
|
--publicurl=http://<replaceable>controller</replaceable>:8776/v2/%\(tenant_id\)s \
|
||||||
--internalurl=http://<replaceable>controller</replaceable>:8776/v2/%\(tenant_id\)s \
|
--internalurl=http://<replaceable>controller</replaceable>:8776/v2/%\(tenant_id\)s \
|
||||||
--adminurl=http://<replaceable>controller</replaceable>:8776/v2/%\(tenant_id\)s</userinput></screen>
|
--adminurl=http://<replaceable>controller</replaceable>:8776/v2/%\(tenant_id\)s</userinput></screen>
|
||||||
</step>
|
</step>
|
||||||
<step os="ubuntu">
|
<step os="ubuntu">
|
||||||
<para>Restart the cinder service with its new settings:</para>
|
<para>Restart the Block Storage services with the new
|
||||||
|
settings:</para>
|
||||||
<screen><prompt>#</prompt> <userinput>service cinder-scheduler restart</userinput>
|
<screen><prompt>#</prompt> <userinput>service cinder-scheduler restart</userinput>
|
||||||
<prompt>#</prompt> <userinput>service cinder-api restart</userinput></screen>
|
<prompt>#</prompt> <userinput>service cinder-api restart</userinput></screen>
|
||||||
</step>
|
</step>
|
||||||
<step os="rhel;fedora;centos;opensuse;sles">
|
<step os="rhel;fedora;centos;opensuse;sles">
|
||||||
<para>Start the cinder services and configure them to start when
|
<para>Start and configure the Block Storage services to start when
|
||||||
the system boots.</para>
|
the system boots:</para>
|
||||||
<screen os="rhel;fedora;centos;opensuse;sles"><prompt>#</prompt> <userinput>service openstack-cinder-api start</userinput>
|
<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>service openstack-cinder-scheduler start</userinput>
|
||||||
<prompt>#</prompt> <userinput>chkconfig openstack-cinder-api on</userinput>
|
<prompt>#</prompt> <userinput>chkconfig openstack-cinder-api on</userinput>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
configure a second system to be a Block Storage service node. This
|
configure a second system to be a Block Storage service node. This
|
||||||
node contains the disk that serves volumes.</para>
|
node contains the disk that serves volumes.</para>
|
||||||
<para>You can configure OpenStack to use various storage systems.
|
<para>You can configure OpenStack to use various storage systems.
|
||||||
The examples in this guide show you how to configure LVM.</para>
|
This example uses LVM.</para>
|
||||||
<procedure>
|
<procedure>
|
||||||
<step>
|
<step>
|
||||||
<para>Use the instructions in <xref linkend="ch_basics"/> to
|
<para>Use the instructions in <xref linkend="ch_basics"/> to
|
||||||
@ -28,43 +28,43 @@
|
|||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</step>
|
</step>
|
||||||
<step os="ubuntu">
|
<step os="ubuntu">
|
||||||
<para>
|
<para>Install the required LVM packages, if they are not already
|
||||||
Install the required LVM packages, if they are not already installed:
|
installed:</para>
|
||||||
<screen><prompt>#</prompt> <userinput>apt-get install lvm2</userinput></screen>
|
<screen><prompt>#</prompt> <userinput>apt-get install lvm2</userinput></screen>
|
||||||
</para>
|
|
||||||
</step>
|
</step>
|
||||||
<step>
|
<step>
|
||||||
<para>Create the
|
<para>Create the LVM physical and logical volumes. This guide
|
||||||
LVM physical and logical volumes. This guide assumes a second
|
assumes a second disk <literal>/dev/sdb</literal> that is used
|
||||||
disk <literal>/dev/sdb</literal> that is used for this
|
for this purpose:</para>
|
||||||
purpose:</para>
|
|
||||||
<screen><prompt>#</prompt> <userinput>pvcreate /dev/sdb</userinput>
|
<screen><prompt>#</prompt> <userinput>pvcreate /dev/sdb</userinput>
|
||||||
<prompt>#</prompt> <userinput>vgcreate cinder-volumes /dev/sdb</userinput></screen>
|
<prompt>#</prompt> <userinput>vgcreate cinder-volumes /dev/sdb</userinput></screen>
|
||||||
</step>
|
</step>
|
||||||
<step>
|
<step>
|
||||||
<para>Add a filter entry to the devices section
|
<para>Add a filter entry to the <literal>devices</literal>
|
||||||
<filename>/etc/lvm/lvm.conf</filename> to keep LVM from
|
section in the <filename>/etc/lvm/lvm.conf</filename> file to
|
||||||
scanning devices used by virtual machines:</para>
|
keep LVM from scanning devices used by virtual
|
||||||
|
machines:</para>
|
||||||
|
<programlisting>devices {
|
||||||
|
...
|
||||||
|
filter = [ "a/sda1/", "a/sdb/", "r/.*/"]
|
||||||
|
...
|
||||||
|
}</programlisting>
|
||||||
<note>
|
<note>
|
||||||
<para>You must add required physical volumes for LVM on the
|
<para>You must add required physical volumes for LVM on the
|
||||||
Block Storage host. Run the <command>pvdisplay</command>
|
Block Storage host. Run the <command>pvdisplay</command>
|
||||||
command to get a list or required volumes.</para>
|
command to get a list or required volumes.</para>
|
||||||
</note>
|
</note>
|
||||||
<para>Each item in the filter array starts with either an
|
<para>Each item in the filter array starts with either an
|
||||||
<literal>a</literal> for accept, or an
|
<literal>a</literal> for accept, or an <literal>r</literal>
|
||||||
<literal>r</literal> for reject. The physical volumes that
|
for reject. The physical volumes that are required on the
|
||||||
are required on the Block Storage host have names that begin
|
Block Storage host have names that begin with
|
||||||
with <literal>a</literal>. The array must end with
|
<literal>a</literal>. The array must end with
|
||||||
"<literal>r/.*/</literal>" to reject any device not listed.</para>
|
"<literal>r/.*/</literal>" to reject any device not
|
||||||
|
listed.</para>
|
||||||
<para>In this example, <literal>/dev/sda1</literal> is the
|
<para>In this example, <literal>/dev/sda1</literal> is the
|
||||||
volume where the volumes for the operating system for the node
|
volume where the volumes for the operating system for the node
|
||||||
reside, while <literal>/dev/sdb</literal> is the volume
|
reside, while <literal>/dev/sdb</literal> is the volume
|
||||||
reserved for <literal>cinder-volumes</literal>.</para>
|
reserved for <literal>cinder-volumes</literal>.</para>
|
||||||
<programlisting>devices {
|
|
||||||
...
|
|
||||||
filter = [ "a/sda1/", "a/sdb/", "r/.*/"]
|
|
||||||
...
|
|
||||||
}</programlisting>
|
|
||||||
</step>
|
</step>
|
||||||
<step>
|
<step>
|
||||||
<para>After you configure the operating system, install the
|
<para>After you configure the operating system, install the
|
||||||
@ -81,46 +81,60 @@ filter = [ "a/sda1/", "a/sdb/", "r/.*/"]
|
|||||||
><literal>[keystone_authtoken]</literal> settings</link>,
|
><literal>[keystone_authtoken]</literal> settings</link>,
|
||||||
and <link linkend="debconf-rabbitqm">RabbitMQ
|
and <link linkend="debconf-rabbitqm">RabbitMQ
|
||||||
credentials</link>. Make sure to enter the same details as
|
credentials</link>. Make sure to enter the same details as
|
||||||
your Block Storage service controller node.</para>
|
you did for your Block Storage service controller node.</para>
|
||||||
<para>Another screen prompts you for the <systemitem
|
<para>Another screen prompts you for the <systemitem
|
||||||
class="library">volume-group</systemitem> to use. The Debian
|
class="library">volume-group</systemitem> to use. The Debian
|
||||||
package configuration script detects every active volume
|
package configuration script detects every active volume group
|
||||||
group, provided that the <systemitem class="library"
|
and tries to use the first one it sees, provided that the
|
||||||
>lvm2</systemitem> package is installed before Block Storage
|
<systemitem class="library">lvm2</systemitem> package was
|
||||||
(this should be the case if you configured the volume group first,
|
installed before Block Storage. This should be the case if you
|
||||||
as this guide recommends), and tries to use the first one it
|
configured the volume group first, as this guide recommends.</para>
|
||||||
sees. If you have only one active volume group on your Block
|
<para>If you have only one active volume group on your Block
|
||||||
Storage service node, you do not need to manually enter its
|
Storage service node, you do not need to manually enter its
|
||||||
name in when you install the <systemitem class="service"
|
name when you install the <systemitem class="service"
|
||||||
>cinder-volume</systemitem> package because it is detected
|
>cinder-volume</systemitem> package because it is detected
|
||||||
automatically. If no <systemitem class="library"
|
automatically. If no <systemitem class="library"
|
||||||
>volume-group</systemitem> is available when you install
|
>volume-group</systemitem> is available when you install
|
||||||
<systemitem class="service">cinder-common</systemitem>, you
|
<systemitem class="service">cinder-common</systemitem>, you
|
||||||
must manually configure or re-configure <systemitem
|
must use <command>dpkg-reconfigure</command> to manually
|
||||||
class="service">cinder-common</systemitem> by using
|
configure or re-configure <systemitem class="service"
|
||||||
<command>dpkg-reconfigure</command>.</para>
|
>cinder-common</systemitem>.</para>
|
||||||
</step>
|
</step>
|
||||||
<step os="centos;rhel;fedora;opensuse;sles;ubuntu">
|
<step>
|
||||||
<para>Copy the <filename>/etc/cinder/api-paste.ini</filename>
|
<para os="fedora;rhel;centos;opensuse;sles">Copy the
|
||||||
file from the controller, or open the file in a text editor
|
<filename>/etc/cinder/cinder.conf</filename> configuration
|
||||||
and locate the section <literal>[filter:authtoken]</literal>.
|
file from the controller, or perform the following steps to
|
||||||
Make sure the following options are set:</para>
|
set the keystone credentials:</para>
|
||||||
<programlisting language="ini">[filter:authtoken]
|
<screen os="fedora;rhel;centos;opensuse;sles"><prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf DEFAULT auth_strategy keystone</userinput>
|
||||||
paste.filter_factory=keystoneclient.middleware.auth_token:filter_factory
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf keystone_authtoken auth_uri http://<replaceable>controller</replaceable>:5000</userinput>
|
||||||
auth_host=<replaceable>controller</replaceable>
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf keystone_authtoken auth_host <replaceable>controller</replaceable></userinput>
|
||||||
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf keystone_authtoken auth_protocol http</userinput>
|
||||||
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf keystone_authtoken auth_port 35357</userinput>
|
||||||
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf keystone_authtoken admin_user cinder</userinput>
|
||||||
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf keystone_authtoken admin_tenant_name service</userinput>
|
||||||
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf keystone_authtoken admin_password
|
||||||
|
<replaceable>CINDER_PASS</replaceable></userinput></screen>
|
||||||
|
<para os="ubuntu;debian">Edit the
|
||||||
|
<filename>/etc/cinder/cinder.conf</filename> configuration
|
||||||
|
file and add this section for keystone credentials:</para>
|
||||||
|
<programlisting os="ubuntu;debian" language="ini">...
|
||||||
|
[keystone_authtoken]
|
||||||
|
auth_uri = http://<replaceable>controller</replaceable>:5000
|
||||||
|
auth_host = <replaceable>controller</replaceable>
|
||||||
auth_port = 35357
|
auth_port = 35357
|
||||||
auth_protocol = http
|
auth_protocol = http
|
||||||
admin_tenant_name=service
|
admin_tenant_name = service
|
||||||
admin_user=cinder
|
admin_user = cinder
|
||||||
admin_password=<replaceable>CINDER_PASS</replaceable></programlisting>
|
admin_password = <replaceable>CINDER_PASS</replaceable></programlisting>
|
||||||
</step>
|
</step>
|
||||||
<step os="ubuntu">
|
<step os="ubuntu">
|
||||||
<para>Configure Block Storage to use the RabbitMQ message
|
<para>Configure Block Storage to use the RabbitMQ message
|
||||||
broker by setting these configuration keys in the
|
broker.</para>
|
||||||
<literal>[DEFAULT]</literal> configuration group of the
|
<para>In the <literal>[DEFAULT]</literal> configuration section
|
||||||
<filename>/etc/cinder/cinder.conf</filename> file. Replace
|
of the <filename>/etc/cinder/cinder.conf</filename> file, set
|
||||||
<replaceable>RABBIT_PASS</replaceable> with the password you
|
these configuration keys and replace
|
||||||
chose for RabbitMQ.</para>
|
<replaceable>RABBIT_PASS</replaceable> with the password you
|
||||||
|
chose for RabbitMQ:</para>
|
||||||
<programlisting language="ini">[DEFAULT]
|
<programlisting language="ini">[DEFAULT]
|
||||||
...
|
...
|
||||||
rpc_backend = cinder.openstack.common.rpc.impl_kombu
|
rpc_backend = cinder.openstack.common.rpc.impl_kombu
|
||||||
@ -130,16 +144,17 @@ rabbit_userid = guest
|
|||||||
rabbit_password = <replaceable>RABBIT_PASS</replaceable></programlisting>
|
rabbit_password = <replaceable>RABBIT_PASS</replaceable></programlisting>
|
||||||
</step>
|
</step>
|
||||||
<step os="rhel;centos;fedora">
|
<step os="rhel;centos;fedora">
|
||||||
<para>Configure Block Storage to use the Qpid message broker.</para>
|
<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 \
|
<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>
|
DEFAULT rpc_backend cinder.openstack.common.rpc.impl_qpid</userinput>
|
||||||
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
||||||
DEFAULT qpid_hostname controller</userinput></screen>
|
DEFAULT qpid_hostname controller</userinput></screen>
|
||||||
</step>
|
</step>
|
||||||
<step os="sles;opensuse">
|
<step os="sles;opensuse">
|
||||||
<para>Configure Block Storage to use the RabbitMQ message broker.
|
<para>Configure Block Storage to use the RabbitMQ message
|
||||||
Replace <replaceable>RABBIT_PASS</replaceable> with the password
|
broker. Replace <replaceable>RABBIT_PASS</replaceable> with
|
||||||
you chose for RabbitMQ.</para>
|
the password you chose for RabbitMQ:</para>
|
||||||
<screen><prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
<screen><prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
||||||
DEFAULT rpc_backend cinder.openstack.common.rpc.impl_kombu</userinput>
|
DEFAULT rpc_backend cinder.openstack.common.rpc.impl_kombu</userinput>
|
||||||
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
||||||
@ -150,49 +165,45 @@ rabbit_password = <replaceable>RABBIT_PASS</replaceable></programlisting>
|
|||||||
DEFAULT rabbit_password <replaceable>RABBIT_PASS</replaceable></userinput></screen>
|
DEFAULT rabbit_password <replaceable>RABBIT_PASS</replaceable></userinput></screen>
|
||||||
</step>
|
</step>
|
||||||
<step os="ubuntu;rhel;centos;fedora;opensuse;sles">
|
<step os="ubuntu;rhel;centos;fedora;opensuse;sles">
|
||||||
<para>Configure Block Storage to use your MySQL database. Edit the
|
<para>Configure Block Storage to use your MySQL database. Edit
|
||||||
<filename>/etc/cinder/cinder.conf</filename> file and add the following
|
the <filename>/etc/cinder/cinder.conf</filename> file and add
|
||||||
key under the <literal>[database]</literal> section. Replace
|
the following key to the <literal>[database]</literal>
|
||||||
<replaceable>CINDER_DBPASS</replaceable> with the password you chose
|
section. Replace <replaceable>CINDER_DBPASS</replaceable> with
|
||||||
for the Block Storage database.</para>
|
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 \
|
<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>
|
database connection mysql://cinder:<replaceable>CINDER_DBPASS</replaceable>@<replaceable>controller</replaceable>/cinder</userinput></screen>
|
||||||
<programlisting os="ubuntu" language="ini">[database]
|
<programlisting os="ubuntu" language="ini">[database]
|
||||||
...
|
...
|
||||||
connection = mysql://cinder:<replaceable>CINDER_DBPASS</replaceable>@<replaceable>controller</replaceable>/cinder</programlisting>
|
connection = mysql://cinder:<replaceable>CINDER_DBPASS</replaceable>@<replaceable>controller</replaceable>/cinder</programlisting>
|
||||||
|
<note os="ubuntu">
|
||||||
|
<para>In some distributions, the
|
||||||
|
<filename>/etc/cinder/cinder.conf</filename> file does not
|
||||||
|
include the <literal>[database]</literal> section header.
|
||||||
|
You must add this section header to the end of the file
|
||||||
|
before you proceed.</para>
|
||||||
|
</note>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<step os="ubuntu">
|
<step os="ubuntu">
|
||||||
<para>Restart the cinder service with its new settings:</para>
|
<para>Restart the Block Storage services with the new
|
||||||
|
settings:</para>
|
||||||
<screen><prompt>#</prompt> <userinput>service cinder-volume restart</userinput>
|
<screen><prompt>#</prompt> <userinput>service cinder-volume restart</userinput>
|
||||||
<prompt>#</prompt> <userinput>service tgt restart</userinput></screen>
|
<prompt>#</prompt> <userinput>service tgt restart</userinput></screen>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
|
|
||||||
<step os="rhel;fedora;centos">
|
<step os="rhel;fedora;centos">
|
||||||
<para>Configure the iSCSI target service to discover cinder
|
<para>Configure the iSCSI target service to discover Block
|
||||||
volumes. Add the following line to the beginning of the
|
Storage volumes. Add the following line to the beginning of
|
||||||
<filename>/etc/tgt/targets.conf</filename> file, if it is
|
the <filename>/etc/tgt/targets.conf</filename> file, if it is
|
||||||
not already present:</para>
|
not already present:</para>
|
||||||
<programlisting>include /etc/cinder/volumes/*</programlisting>
|
<programlisting>include /etc/cinder/volumes/*</programlisting>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step os="rhel;fedora;centos;opensuse;sles">
|
<step os="rhel;fedora;centos;opensuse;sles">
|
||||||
<para>Start the cinder services and configure them to start when
|
<para>Start and configure the Block Storage services to start
|
||||||
the system boots:</para>
|
when the system boots:</para>
|
||||||
<screen>
|
<screen>
|
||||||
<prompt>#</prompt> <userinput>service openstack-cinder-volume start</userinput>
|
<prompt>#</prompt> <userinput>service openstack-cinder-volume start</userinput>
|
||||||
<prompt>#</prompt> <userinput>service tgtd start</userinput>
|
<prompt>#</prompt> <userinput>service tgtd start</userinput>
|
||||||
<prompt>#</prompt> <userinput>chkconfig openstack-cinder-volume on</userinput>
|
<prompt>#</prompt> <userinput>chkconfig openstack-cinder-volume on</userinput>
|
||||||
<prompt>#</prompt> <userinput>chkconfig tgtd on</userinput></screen>
|
<prompt>#</prompt> <userinput>chkconfig tgtd on</userinput></screen>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
</procedure>
|
</procedure>
|
||||||
</section>
|
</section>
|
||||||
|
Loading…
Reference in New Issue
Block a user