Merge "[install] Liberty updates for cinder"

This commit is contained in:
Jenkins
2015-10-13 05:47:51 +00:00
committed by Gerrit Code Review
8 changed files with 205 additions and 221 deletions

View File

@@ -1,17 +1,18 @@
===================================== .. _cinder-controller:
Install and configure controller node Install and configure controller node
===================================== ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This section describes how to install and configure the Block This section describes how to install and configure the Block
Storage service, code-named cinder, on the controller node. This Storage service, code-named cinder, on the controller node. This
service requires at least one additional storage node that provides service requires at least one additional storage node that provides
volumes to instances. volumes to instances.
To configure prerequisites Prerequisites
~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------
Before you install and configure the Block Storage service, you Before you install and configure the Block Storage service, you
must create a database, service credentials, and API endpoint. must create a database, service credentials, and API endpoints.
#. To create the database, complete these steps: #. To create the database, complete these steps:
@@ -54,46 +55,29 @@ must create a database, service credentials, and API endpoint.
.. code-block:: console .. code-block:: console
$ openstack user create --password-prompt cinder $ openstack user create --domain default --password-prompt cinder
User Password: User Password:
Repeat User Password: Repeat User Password:
+----------+----------------------------------+ +-----------+----------------------------------+
| Field | Value | | Field | Value |
+----------+----------------------------------+ +-----------+----------------------------------+
| email | None | | domain_id | default |
| enabled | True | | enabled | True |
| id | 881ab2de4f7941e79504a759a83308be | | id | bb279f8ffc444637af38811a5e1f0562 |
| name | cinder | | name | cinder |
| username | cinder | +-----------+----------------------------------+
+----------+----------------------------------+
* Add the ``admin`` role to the ``cinder`` user: * Add the ``admin`` role to the ``cinder`` user:
.. code-block:: console .. code-block:: console
$ openstack role add --project service --user cinder admin $ openstack role add --project service --user cinder admin
+-------+----------------------------------+
| Field | Value |
+-------+----------------------------------+
| id | cd2cb9a39e874ea69e5d4b896eb16128 |
| name | admin |
+-------+----------------------------------+
* Create the ``cinder`` service entities: .. note::
.. code-block:: console This command provides no output.
$ openstack service create --name cinder \ * Create the ``cinderv2`` service entity:
--description "OpenStack Block Storage" volume
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Block Storage |
| enabled | True |
| id | 1e494c3e22a24baaafcaf777d4d467eb |
| name | cinder |
| type | volume |
+-------------+----------------------------------+
.. code-block:: console .. code-block:: console
@@ -104,63 +88,65 @@ must create a database, service credentials, and API endpoint.
+-------------+----------------------------------+ +-------------+----------------------------------+
| description | OpenStack Block Storage | | description | OpenStack Block Storage |
| enabled | True | | enabled | True |
| id | 16e038e449c94b40868277f1d801edb5 | | id | eb9fd245bdbc414695952e93f29fe3ac |
| name | cinderv2 | | name | cinderv2 |
| type | volumev2 | | type | volumev2 |
+-------------+----------------------------------+ +-------------+----------------------------------+
.. note::
The Block Storage service requires both the ``volume`` and
``volumev2`` services. However, both services use the same API
endpoint that references the Block Storage version 2 API.
#. Create the Block Storage service API endpoints: #. Create the Block Storage service API endpoints:
.. code-block:: console .. code-block:: console
$ openstack endpoint create \ $ openstack endpoint create --region RegionOne \
--publicurl http://controller:8776/v2/%\(tenant_id\)s \ volumev2 public http://controller:8776/v2/%\(tenant_id\)s
--internalurl http://controller:8776/v2/%\(tenant_id\)s \
--adminurl http://controller:8776/v2/%\(tenant_id\)s \
--region RegionOne \
volume
+--------------+-----------------------------------------+ +--------------+-----------------------------------------+
| Field | Value | | Field | Value |
+--------------+-----------------------------------------+ +--------------+-----------------------------------------+
| adminurl | http://controller:8776/v2/%(tenant_id)s | | enabled | True |
| id | d1b7291a2d794e26963b322c7f2a55a4 | | id | 513e73819e14460fb904163f41ef3759 |
| internalurl | http://controller:8776/v2/%(tenant_id)s | | interface | public |
| publicurl | http://controller:8776/v2/%(tenant_id)s |
| region | RegionOne | | region | RegionOne |
| service_id | 1e494c3e22a24baaafcaf777d4d467eb | | region_id | RegionOne |
| service_name | cinder | | service_id | eb9fd245bdbc414695952e93f29fe3ac |
| service_type | volume |
+--------------+-----------------------------------------+
.. code-block:: console
$ openstack endpoint create \
--publicurl http://controller:8776/v2/%\(tenant_id\)s \
--internalurl http://controller:8776/v2/%\(tenant_id\)s \
--adminurl http://controller:8776/v2/%\(tenant_id\)s \
--region RegionOne \
volumev2
+--------------+-----------------------------------------+
| Field | Value |
+--------------+-----------------------------------------+
| adminurl | http://controller:8776/v2/%(tenant_id)s |
| id | 097b4a6fc8ba44b4b10d4822d2d9e076 |
| internalurl | http://controller:8776/v2/%(tenant_id)s |
| publicurl | http://controller:8776/v2/%(tenant_id)s |
| region | RegionOne |
| service_id | 16e038e449c94b40868277f1d801edb5 |
| service_name | cinderv2 | | service_name | cinderv2 |
| service_type | volumev2 | | service_type | volumev2 |
| url | http://controller:8776/v2/%(tenant_id)s |
+--------------+-----------------------------------------+ +--------------+-----------------------------------------+
To install and configure Block Storage controller components $ openstack endpoint create --region RegionOne \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ volumev2 internal http://controller:8776/v2/%\(tenant_id\)s
+--------------+-----------------------------------------+
| Field | Value |
+--------------+-----------------------------------------+
| enabled | True |
| id | 6436a8a23d014cfdb69c586eff146a32 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | eb9fd245bdbc414695952e93f29fe3ac |
| service_name | cinderv2 |
| service_type | volumev2 |
| url | http://controller:8776/v2/%(tenant_id)s |
+--------------+-----------------------------------------+
$ openstack endpoint create --region RegionOne \
volumev2 admin http://controller:8776/v2/%\(tenant_id\)s
+--------------+-----------------------------------------+
| Field | Value |
+--------------+-----------------------------------------+
| enabled | True |
| id | e652cf84dd334f359ae9b045a2c91d96 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | eb9fd245bdbc414695952e93f29fe3ac |
| service_name | cinderv2 |
| service_type | volumev2 |
| url | http://controller:8776/v2/%(tenant_id)s |
+--------------+-----------------------------------------+
Install and configure components
--------------------------------
.. only:: obs .. only:: obs
@@ -186,23 +172,7 @@ To install and configure Block Storage controller components
# apt-get install cinder-api cinder-scheduler python-cinderclient # apt-get install cinder-api cinder-scheduler python-cinderclient
2. 2. Edit the ``/etc/cinder/cinder.conf`` file and complete the
.. only:: rdo
.. Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1212900.
Copy the ``/usr/share/cinder/cinder-dist.conf`` file
to ``/etc/cinder/cinder.conf``.
.. code-block:: console
# cp /usr/share/cinder/cinder-dist.conf /etc/cinder/cinder.conf
# chown -R cinder:cinder /etc/cinder/cinder.conf
Edit the ``/etc/cinder/cinder.conf`` file and complete the
following actions: following actions:
* In the ``[database]`` section, configure database access: * In the ``[database]`` section, configure database access:
@@ -294,15 +264,31 @@ To install and configure Block Storage controller components
# su -s /bin/sh -c "cinder-manage db sync" cinder # su -s /bin/sh -c "cinder-manage db sync" cinder
To finalize installation Configure Compute to use Block Storage
~~~~~~~~~~~~~~~~~~~~~~~~ --------------------------------------
* Edit the ``/etc/nova/nova.conf`` file and add the following
to it:
.. code-block:: ini
[cinder]
os_region_name = RegionOne
Finalize installation
---------------------
.. only:: obs or rdo .. only:: obs or rdo
#. Restart the Compute API service:
.. code-block:: console
# systemctl restart openstack-nova-api.service
#. Start the Block Storage services and configure them to start when #. Start the Block Storage services and configure them to start when
the system boots: the system boots:
.. code-block:: console .. code-block:: console
# systemctl enable openstack-cinder-api.service openstack-cinder-scheduler.service # systemctl enable openstack-cinder-api.service openstack-cinder-scheduler.service
@@ -310,6 +296,12 @@ To finalize installation
.. only:: ubuntu .. only:: ubuntu
#. Restart the Compute API service:
.. code-block:: console
# service nova-api restart
#. Restart the Block Storage services: #. Restart the Block Storage services:
.. code-block:: console .. code-block:: console

View File

@@ -1,3 +1,5 @@
.. _cinder-next-steps:
========== ==========
Next steps Next steps
========== ==========

View File

@@ -1,74 +1,56 @@
==================================== .. _cinder-storage:
Install and configure a storage node Install and configure a storage node
==================================== ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This section describes how to install and configure storage nodes This section describes how to install and configure storage nodes
for the Block Storage service. For simplicity, this configuration for the Block Storage service. For simplicity, this configuration
references one storage node with an empty local block storage device references one storage node with an empty local block storage device.
``/dev/sdb`` that contains a suitable partition table with The instructions use ``/dev/sdb``, but you can substitute a different
one partition ``/dev/sdb1`` occupying the entire device. value for your particular node.
The service provisions logical volumes on this device using the The service provisions logical volumes on this device using the
:term:`LVM <Logical Volume Manager (LVM)>` driver and provides them :term:`LVM <Logical Volume Manager (LVM)>` driver and provides them
to instances via :term:`iSCSI` transport. You can follow these to instances via :term:`iSCSI` transport. You can follow these
instructions with minor modifications to horizontally scale your instructions with minor modifications to horizontally scale your
environment with additional storage nodes. environment with additional storage nodes.
To configure prerequisites Prerequisites
~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------
You must configure the storage node before you install and Before you install and configure the Block Storage service on the
configure the volume service on it. Similar to the controller node, storage node, you must prepare the storage device.
the storage node contains one network interface on the
:term:`management network`. The storage node also
needs an empty block storage device of suitable size for your
environment. For more information, see :ref:`environment`.
#. Configure the management interface: .. note::
* IP address: ``10.0.0.41`` Perform these steps on the storage node.
* Network mask: ``255.255.255.0`` (or ``/24``) #. Install the supporting utility packages:
* Default gateway: ``10.0.0.1``
#. Set the hostname of the node to ``block1``.
#. .. include:: shared/edit_hosts_file.txt
#. Install and configure :term:`NTP` using the instructions in
:ref:`environment-ntp`.
.. only:: obs .. only:: obs
5. If you intend to use non-raw image types such as QCOW2 and VMDK, * Install the LVM packages:
install the QEMU support package:
.. code-block:: console
# zypper install lvm2
* (Optional) If you intend to use non-raw image types such as QCOW2
and VMDK, install the QEMU package:
.. code-block:: console .. code-block:: console
# zypper install qemu # zypper install qemu
6. Install the LVM packages:
.. only:: rdo .. only:: rdo
5. If you intend to use non-raw image types such as QCOW2 and VMDK, * Install the LVM packages:
install the QEMU support package:
.. code-block:: console
# yum install qemu
6. Install the LVM packages:
.. code-block:: console .. code-block:: console
# yum install lvm2 # yum install lvm2
.. note:: * Start the LVM metadata service and configure it to start when the
Some distributions include LVM by default.
Start the LVM metadata service and configure it to start when the
system boots: system boots:
.. code-block:: console .. code-block:: console
@@ -78,19 +60,6 @@ environment. For more information, see :ref:`environment`.
.. only:: ubuntu .. only:: ubuntu
5. If you intend to use non-raw image types such as QCOW2 and VMDK,
install the QEMU support package:
.. code-block:: console
# apt-get install qemu
.. note::
Some distributions include LVM by default.
6. Install the LVM packages:
.. code-block:: console .. code-block:: console
# apt-get install lvm2 # apt-get install lvm2
@@ -99,29 +68,23 @@ environment. For more information, see :ref:`environment`.
Some distributions include LVM by default. Some distributions include LVM by default.
#. Create the LVM physical volume ``/dev/sdb``:
7. Create the LVM physical volume ``/dev/sdb1``:
.. code-block:: console .. code-block:: console
# pvcreate /dev/sdb1 # pvcreate /dev/sdb
Physical volume "/dev/sdb1" successfully created Physical volume "/dev/sdb" successfully created
.. note:: #. Create the LVM volume group ``cinder-volumes``:
If your system uses a different device name, adjust these
steps accordingly.
8. Create the LVM volume group ``cinder-volumes``:
.. code-block:: console .. code-block:: console
# vgcreate cinder-volumes /dev/sdb1 # vgcreate cinder-volumes /dev/sdb
Volume group "cinder-volumes" successfully created Volume group "cinder-volumes" successfully created
The Block Storage service creates logical volumes in this volume group. The Block Storage service creates logical volumes in this volume group.
9. Only instances can access Block Storage volumes. However, the #. Only instances can access Block Storage volumes. However, the
underlying operating system manages the devices associated with underlying operating system manages the devices associated with
the volumes. By default, the LVM volume scanning tool scans the the volumes. By default, the LVM volume scanning tool scans the
``/dev`` directory for block storage devices that ``/dev`` directory for block storage devices that
@@ -167,8 +130,8 @@ environment. For more information, see :ref:`environment`.
filter = [ "a/sda/", "r/.*/"] filter = [ "a/sda/", "r/.*/"]
Install and configure Block Storage volume components Install and configure components
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --------------------------------
.. only:: obs .. only:: obs
@@ -340,8 +303,8 @@ Install and configure Block Storage volume components
... ...
verbose = True verbose = True
To finalize installation Finalize installation
~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------
.. only:: obs .. only:: obs

View File

@@ -1,8 +1,7 @@
.. _cinder-verify: .. _cinder-verify:
================
Verify operation Verify operation
================ ~~~~~~~~~~~~~~~~
Verify operation of the Block Storage service. Verify operation of the Block Storage service.
@@ -10,13 +9,6 @@ Verify operation of the Block Storage service.
Perform these commands on the controller node. Perform these commands on the controller node.
#. In each client environment script, configure the Block Storage
client to use API version 2.0:
.. code-block:: console
$ echo "export OS_VOLUME_API_VERSION=2" | tee -a admin-openrc.sh demo-openrc.sh
#. Source the ``admin`` credentials to gain access to #. Source the ``admin`` credentials to gain access to
admin-only CLI commands: admin-only CLI commands:

View File

@@ -1,3 +1,5 @@
.. _cinder:
============================= =============================
Add the Block Storage service Add the Block Storage service
============================= =============================
@@ -5,8 +7,8 @@ Add the Block Storage service
.. toctree:: .. toctree::
common/get_started_block_storage.rst common/get_started_block_storage.rst
cinder-controller-node.rst cinder-controller-install.rst
cinder-storage-node.rst cinder-storage-install.rst
cinder-verify.rst cinder-verify.rst
cinder-next-steps.rst cinder-next-steps.rst

View File

@@ -0,0 +1,25 @@
Block storage node (Optional)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you want to deploy the Block Storage service, configure one
additional storage node.
Configure network interfaces
----------------------------
#. Configure the management interface:
* IP address: ``10.0.0.41``
* Network mask: ``255.255.255.0`` (or ``/24``)
* Default gateway: ``10.0.0.1``
Configure name resolution
-------------------------
#. Set the hostname of the node to ``block1``.
#. .. include:: shared/edit_hosts_file.txt
#. Reboot the system to activate the changes.

View File

@@ -122,5 +122,6 @@ the controller node.
environment-networking-controller.rst environment-networking-controller.rst
environment-networking-compute.rst environment-networking-compute.rst
environment-networking-storage-cinder.rst
environment-networking-storage-swift.rst environment-networking-storage-swift.rst
environment-networking-verify.rst environment-networking-verify.rst

View File

@@ -18,25 +18,31 @@ Create a volume
.. code-block:: console .. code-block:: console
$ cinder create --display-name volume1 1 $ cinder create --display-name volume1 1
+---------------------+--------------------------------------+ +---------------------------------------+--------------------------------------+
| Property | Value | | Property | Value |
+---------------------+--------------------------------------+ +---------------------------------------+--------------------------------------+
| attachments | [] | | attachments | [] |
| availability_zone | nova | | availability_zone | nova |
| bootable | false | | bootable | false |
| created_at | 2015-09-22T13:36:19.457750 | | consistencygroup_id | None |
| display_description | None | | created_at | 2015-10-12T16:02:29.000000 |
| display_name | volume1 | | description | None |
| encrypted | False | | encrypted | False |
| id | 0a816b7c-e578-4290-bb74-c13b8b90d4e7 | | id | 09e3743e-192a-4ada-b8ee-d35352fa65c4 |
| metadata | {} | | metadata | {} |
| multiattach | false | | multiattach | False |
| name | volume1 |
| os-vol-tenant-attr:tenant_id | ed0b60bf607743088218b0a533d5943f |
| os-volume-replication:driver_data | None |
| os-volume-replication:extended_status | None |
| replication_status | disabled |
| size | 1 | | size | 1 |
| snapshot_id | None | | snapshot_id | None |
| source_volid | None | | source_volid | None |
| status | creating | | status | creating |
| user_id | 58126687cbcc4888bfa9ab73a2256f27 |
| volume_type | None | | volume_type | None |
+---------------------+--------------------------------------+ +---------------------------------------+--------------------------------------+
#. After a short time, the volume status should change from ``creating`` #. After a short time, the volume status should change from ``creating``
to ``available``: to ``available``:
@@ -44,11 +50,11 @@ Create a volume
.. code-block:: console .. code-block:: console
$ cinder list $ cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+ +--------------------------------------+-----------+---------+------+-------------+----------+-------------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to | | ID | Status | Name | Size | Volume Type | Bootable | Multiattach | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+ +--------------------------------------+-----------+---------+------+-------------+----------+-------------+-------------+
| 0a816b7c-e578-4290-bb74-c13b8b90d4e7 | available | volume1 | 1 | - | false | | | 09e3743e-192a-4ada-b8ee-d35352fa65c4 | available | volume1 | 1 | - | false | False | |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+ +--------------------------------------+-----------+---------+------+-------------+----------+-------------+-------------+
Attach the volume to an instance Attach the volume to an instance
-------------------------------- --------------------------------
@@ -64,19 +70,19 @@ Attach the volume to an instance
**Example** **Example**
Attach the ``0a816b7c-e578-4290-bb74-c13b8b90d4e7`` volume to the Attach the ``09e3743e-192a-4ada-b8ee-d35352fa65c4`` volume to the
``public-instance`` instance: ``public-instance`` instance:
.. code-block:: console .. code-block:: console
$ nova volume-attach public-instance1 0a816b7c-e578-4290-bb74-c13b8b90d4e7 $ nova volume-attach public-instance 09e3743e-192a-4ada-b8ee-d35352fa65c4
+----------+--------------------------------------+ +----------+--------------------------------------+
| Property | Value | | Property | Value |
+----------+--------------------------------------+ +----------+--------------------------------------+
| device | /dev/vdb | | device | /dev/vdb |
| id | 158bea89-07db-4ac2-8115-66c0d6a4bb48 | | id | 158bea89-07db-4ac2-8115-66c0d6a4bb48 |
| serverId | 181c52ba-aebc-4c32-a97d-2e8e82e4eaaf | | serverId | 181c52ba-aebc-4c32-a97d-2e8e82e4eaaf |
| volumeId | 0a816b7c-e578-4290-bb74-c13b8b90d4e7 | | volumeId | 09e3743e-192a-4ada-b8ee-d35352fa65c4 |
+----------+--------------------------------------+ +----------+--------------------------------------+
#. List volumes: #. List volumes:
@@ -87,7 +93,7 @@ Attach the volume to an instance
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+ +--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Attached to | | ID | Status | Display Name | Size | Volume Type | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+ +--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
| 158bea89-07db-4ac2-8115-66c0d6a4bb48 | in-use | | 1 | - | 181c52ba-aebc-4c32-a97d-2e8e82e4eaaf | | 09e3743e-192a-4ada-b8ee-d35352fa65c4 | in-use | | 1 | - | 181c52ba-aebc-4c32-a97d-2e8e82e4eaaf |
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+ +--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
#. Access your instance using SSH and use the ``fdisk`` command to verify #. Access your instance using SSH and use the ``fdisk`` command to verify
@@ -118,7 +124,8 @@ Attach the volume to an instance
.. note:: .. note::
You must create a partition table and file system to use the volume. You must create a file system on the device and mount it
to use the volume.
For more information about how to manage volumes, see the For more information about how to manage volumes, see the
`OpenStack User Guide `OpenStack User Guide