[install] Add steps for manila without the share server management mode

Performs refactoring for better documenting both manila modes:
with/without the management of share servers.

Closes-Bug: #1559031
Implements: bp installguide-mitaka

Change-Id: Id21bce7fb5ea450a3150cb194184c2cb553320b5
This commit is contained in:
dencaval 2016-03-21 13:11:12 +00:00 committed by Matthew Kassawara
parent d45e590bb1
commit a8af40d1d9
10 changed files with 858 additions and 329 deletions

View File

@ -0,0 +1,168 @@
.. _launch-instance-manila-option1:
Option 1 - Create shares without share servers management support
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Create a share type
-------------------
Disable DHSS before creating a share using the LVM driver.
#. Source the admin credentials to gain access to admin-only CLI commands:
.. code-block:: console
$ . admin-openrc
#. Create a default share type with DHSS disabled:
.. code-block:: console
$ manila type-create default_share_type False
+----------------------+--------------------------------------+
| Property | Value |
+----------------------+--------------------------------------+
| required_extra_specs | driver_handles_share_servers : False |
| Name | default_share_type |
| Visibility | public |
| is_default | - |
| ID | 3df065c8-6ca4-4b80-a5cb-e633c0439097 |
| optional_extra_specs | snapshot_support : True |
+----------------------+--------------------------------------+
Create a share
--------------
#. Source the ``demo`` credentials to perform
the following steps as a non-administrative project:
.. code-block:: console
$ . demo-openrc
#. Create a NFS share:
.. code-block:: console
$ manila create NFS 1 --name share1
+-----------------------------+--------------------------------------+
| Property | Value |
+-----------------------------+--------------------------------------+
| status | creating |
| share_type_name | default_share_type |
| description | None |
| availability_zone | None |
| share_network_id | None |
| host | |
| access_rules_status | active |
| snapshot_id | None |
| is_public | False |
| task_state | None |
| snapshot_support | True |
| id | 55c401b3-3112-4294-aa9f-3cc355a4e361 |
| size | 1 |
| name | share1 |
| share_type | c6dfcfc6-9920-420e-8b0a-283d578efef5 |
| has_replicas | False |
| replication_type | None |
| created_at | 2016-03-30T19:10:33.000000 |
| share_proto | NFS |
| consistency_group_id | None |
| source_cgsnapshot_member_id | None |
| project_id | 3a46a53a377642a284e1d12efabb3b5a |
| metadata | {} |
+-----------------------------+--------------------------------------+
#. After some time, the share status should change from ``creating``
to ``available``:
.. code-block:: console
$ manila list
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+-----------------------------+-------------------+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+-----------------------------+-------------------+
| 55c401b3-3112-4294-aa9f-3cc355a4e361 | share1 | 1 | NFS | available | False | default_share_type | storage@lvm#lvm-single-pool | nova |
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+-----------------------------+-------------------+
#. Determine export IP address of the share:
.. code-block:: console
$ manila show share1
+-----------------------------+------------------------------------------------------------------------------------+
| Property | Value |
+-----------------------------+------------------------------------------------------------------------------------+
| status | available |
| share_type_name | default_share_type |
| description | None |
| availability_zone | nova |
| share_network_id | None |
| export_locations | |
| | path = 10.0.0.41:/var/lib/manila/mnt/share-8e13a98f-c310-41df-ac90-fc8bce4910b8 |
| | id = 3c8d0ada-cadf-48dd-85b8-d4e8c3b1e204 |
| | preferred = False |
| host | storage@lvm#lvm-single-pool |
| access_rules_status | active |
| snapshot_id | None |
| is_public | False |
| task_state | None |
| snapshot_support | True |
| id | 55c401b3-3112-4294-aa9f-3cc355a4e361 |
| size | 1 |
| name | share1 |
| share_type | c6dfcfc6-9920-420e-8b0a-283d578efef5 |
| has_replicas | False |
| replication_type | None |
| created_at | 2016-03-30T19:10:33.000000 |
| share_proto | NFS |
| consistency_group_id | None |
| source_cgsnapshot_member_id | None |
| project_id | 3a46a53a377642a284e1d12efabb3b5a |
| metadata | {} |
+-----------------------------+------------------------------------------------------------------------------------+
#. Configure user access to the new share before attempting to mount it via
the network:
.. code-block:: console
$ manila access-allow share1 ip INSTANCE_IP_ADDRESS
+--------------+--------------------------------------+
| Property | Value |
+--------------+--------------------------------------+
| share_id | 55c401b3-3112-4294-aa9f-3cc355a4e361 |
| access_type | ip |
| access_to | 10.0.0.41 |
| access_level | rw |
| state | new |
| id | f88eab01-7197-44bf-ad0f-d6ca6f99fc96 |
+--------------+--------------------------------------+
Replace ``INSTANCE_IP_ADDRESS`` with the IP address of the instance.
.. note::
The instance must have connectivity to the management IP address on
the storage node.
Mount the share from an instance
--------------------------------
#. Create a folder where the mount will be placed:
.. code-block:: console
$ mkdir ~/test_folder
#. Mount the NFS share in the instance using the export location of the share:
.. code-block:: console
# mount -t nfs 10.0.0.41:/var/lib/manila/mnt/share-b94a4dbf-49e2-452c-b9c7-510277adf5c6 ~/test_folder
For more information about how to manage shares, see the
`OpenStack User Guide
<http://docs.openstack.org/user-guide/index.html>`__.
Return to :ref:`launch-instance`.

View File

@ -0,0 +1,222 @@
.. _launch-instance-manila-option2:
Option 2 - Create shares with share servers management support
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Before being able to create a share, the generic driver with the DHSS mode
enabled requires the definition of at least an image, a flavor, a network, and
a share-network for being used to create a share server where the NFS/CIFS
shares are served.
Create a share type
-------------------
Enable DHSS before creating a share using the generic driver.
#. Source the admin credentials to gain access to admin-only CLI commands:
.. code-block:: console
$ . admin-openrc
#. Create a default share type with DHSS enabled:
.. code-block:: console
$ manila type-create generic_share_type True
+----------------------+--------------------------------------+
| Property | Value |
+----------------------+--------------------------------------+
| required_extra_specs | driver_handles_share_servers : True |
| Name | generic_share_type |
| Visibility | public |
| is_default | - |
| ID | 3df065c8-6ca4-4b80-a5cb-e633c0439097 |
| optional_extra_specs | snapshot_support : True |
+----------------------+--------------------------------------+
Create a share network
----------------------
#. Source the ``demo`` credentials to perform
the following steps as a non-administrative project:
.. code-block:: console
$ . demo-openrc
#. List available networks to obtain the network and subnet ID for the
``selfservice`` network:
.. code-block:: console
$ neutron net-list
+--------------------------------------+-------------+-----------------------------------------------------+
| id | name | subnets |
+--------------------------------------+-------------+-----------------------------------------------------+
| b72d8561-aceb-4e79-938f-df3a45fdeaa3 | provider | 072dd25f-e049-454c-9b11-359c910e6668 203.0.113.0/24 |
| 4e963f5b-b5f3-4db1-a935-0d34c8629e7b | selfservice | 005bf8d1-798e-450f-9efe-72bc0c3be491 172.16.1.0/24 |
+--------------------------------------+-------------+-----------------------------------------------------+
#. Create the share network using the ``selfservice`` network and subnet IDs:
.. code-block:: console
$ manila share-network-create --name selfservice-net-share1 \
--neutron-net-id 4e963f5b-b5f3-4db1-a935-0d34c8629e7b \
--neutron-subnet-id 005bf8d1-798e-450f-9efe-72bc0c3be491
+-------------------+--------------------------------------+
| Property | Value |
+-------------------+--------------------------------------+
| name | selfservice-net-share1 |
| segmentation_id | None |
| created_at | 2016-03-31T13:25:39.052439 |
| neutron_subnet_id | 005bf8d1-798e-450f-9efe-72bc0c3be491 |
| updated_at | None |
| network_type | None |
| neutron_net_id | 4e963f5b-b5f3-4db1-a935-0d34c8629e7b |
| ip_version | None |
| nova_net_id | None |
| cidr | None |
| project_id | 3a46a53a377642a284e1d12efabb3b5a |
| id | 997a1a0a-4f4d-4aa3-b7ae-8ae6d9aaa828 |
| description | None |
+-------------------+--------------------------------------+
Create a share
--------------
#. Source the ``demo`` credentials to perform
the following steps as a non-administrative project:
.. code-block:: console
$ . demo-openrc
#. Create a NFS share using the share network:
.. code-block:: console
$ manila create NFS 1 --name share2 \
--share-network selfservice-net-share1 \
--share-type generic_share_type
+-----------------------------+--------------------------------------+
| Property | Value |
+-----------------------------+--------------------------------------+
| status | creating |
| share_type_name | generic_share_type |
| description | None |
| availability_zone | None |
| share_network_id | 997a1a0a-4f4d-4aa3-b7ae-8ae6d9aaa828 |
| host | |
| access_rules_status | active |
| snapshot_id | None |
| is_public | False |
| task_state | None |
| snapshot_support | True |
| id | 6a711b95-9e03-4547-8769-74e34676cb3e |
| size | 1 |
| name | share2 |
| share_type | 8698ed92-2a1c-4c9f-aab4-a35dccd88c8f |
| has_replicas | False |
| replication_type | None |
| created_at | 2016-03-31T13:45:18.000000 |
| share_proto | NFS |
| consistency_group_id | None |
| source_cgsnapshot_member_id | None |
| project_id | 3a46a53a377642a284e1d12efabb3b5a |
| metadata | {} |
+-----------------------------+--------------------------------------+
#. After some time, the share status should change from ``creating``
to ``available``:
.. code-block:: console
$ manila list
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+-----------------------------+-------------------+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+-----------------------------+-------------------+
| 5f8a0574-a95e-40ff-b898-09fd8d6a1fac | share2 | 1 | NFS | available | False | default_share_type | storage@generic#GENERIC | nova |
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+-----------------------------+-------------------+
#. Determine export IP address of the share:
.. code-block:: console
$ manila show share2
+-----------------------------+------------------------------------------------------------------------------------+
| Property | Value |
+-----------------------------+------------------------------------------------------------------------------------+
| status | available |
| share_type_name | generic_share_type |
| description | None |
| availability_zone | nova |
| share_network_id | None |
| export_locations | |
| | path = 10.254.0.6:/shares/share-0bfd69a1-27f0-4ef5-af17-7cd50bce6550 |
| | id = 3c8d0ada-cadf-48dd-85b8-d4e8c3b1e204 |
| | preferred = False |
| host | storage@generic#GENERIC |
| access_rules_status | active |
| snapshot_id | None |
| is_public | False |
| task_state | None |
| snapshot_support | True |
| id | 5f8a0574-a95e-40ff-b898-09fd8d6a1fac |
| size | 1 |
| name | share2 |
| share_type | 8a35da28-0f74-490d-afff-23664ecd4f01 |
| has_replicas | False |
| replication_type | None |
| created_at | 2016-03-30T19:10:33.000000 |
| share_proto | NFS |
| consistency_group_id | None |
| source_cgsnapshot_member_id | None |
| project_id | 3a46a53a377642a284e1d12efabb3b5a |
| metadata | {} |
+-----------------------------+------------------------------------------------------------------------------------+
#. Configure user access to the new share before attempting to mount it via
the network:
.. code-block:: console
$ manila access-allow share2 ip INSTANCE_IP_ADDRESS
+--------------+--------------------------------------+
| Property | Value |
+--------------+--------------------------------------+
| share_id | 55c401b3-3112-4294-aa9f-3cc355a4e361 |
| access_type | ip |
| access_to | 172.16.1.5 |
| access_level | rw |
| state | new |
| id | f88eab01-7197-44bf-ad0f-d6ca6f99fc96 |
+--------------+--------------------------------------+
Replace ``INSTANCE_IP_ADDRESS`` with the IP address of the instance.
.. note::
The instance must use the ``selfservice`` network.
Mount the share from an instance
--------------------------------
#. Create a folder where the mount will be placed:
.. code-block:: console
$ mkdir ~/test_folder
#. Mount the NFS share in the instance using the export location of the share:
.. code-block:: console
# mount -t nfs 10.254.0.6:/shares/share-0bfd69a1-27f0-4ef5-af17-7cd50bce6550 ~/test_folder
For more information about how to manage shares, see the
`OpenStack User Guide
<http://docs.openstack.org/user-guide/index.html>`__.
Return to :ref:`launch-instance`.

View File

@ -3,196 +3,104 @@
Shared File Systems
~~~~~~~~~~~~~~~~~~~
Before being able to create a share, the manila with the generic driver and
the DHSS mode enabled requires the definition of at least an image,
a network and a share-network for being used to create a share server.
For that back end configuration, the share server is an instance where
NFS/CIFS shares are served.
Create the service image
------------------------
.. note::
This configuration automatically creates a cinder volume for every share.
The cinder volumes are attached to share servers according to the
definition of a share network.
In typical deployments, you should create an instance from an image that
supports network file systems such as NFS/CIFS to evaluate the Shared File
Systems service. This guide should use the CirrOS image for instances to
reduce resource requirements for evaluation. However, the CirrOS image
lacks support for network file systems. For evaluation of the Shared File
Systems service, this guide creates a regular instance using the
``manila-share-service`` image because it supports network file systems and
using the ``manila-service-flavor`` that limits resource consumption by the
instance to 256 MB memory on the compute node.
Determine the configuration of the share server
-----------------------------------------------
#. Source the admin credentials to gain access to admin-only CLI commands:
#. Download the source image of the share server:
.. code-block:: console
$ . admin-openrc
$ wget http://tarballs.openstack.org/manila-image-elements/images/manila-service-image-master.qcow2
#. Create a default share type before running manila-share service:
#. Add the image to the Image service:
.. code-block:: console
$ manila type-create default_share_type True
+--------------------------------------+--------------------+------------+------------+-------------------------------------+-------------------------+$
| ID | Name | Visibility | is_default | required_extra_specs | optional_extra_specs |$
+--------------------------------------+--------------------+------------+------------+-------------------------------------+-------------------------+$
| 8a35da28-0f74-490d-afff-23664ecd4f01 | default_share_type | public | - | driver_handles_share_servers : True | snapshot_support : True |$
+--------------------------------------+--------------------+------------+------------+-------------------------------------+-------------------------+$
#. Create a manila share server image to the Image service:
.. code-block:: console
$ glance image-create \
--copy-from http://tarballs.openstack.org/manila-image-elements/images/manila-service-image-master.qcow2 \
--name "manila-service-image" \
# openstack image create "manila-service-image" \
--file manila-service-image-master.qcow2 \
--disk-format qcow2 \
--container-format bare \
--visibility public --progress
[=============================>] 100%
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 48a08e746cf0986e2bc32040a9183445 |
| container_format | bare |
| created_at | 2016-01-26T19:52:24Z |
| disk_format | qcow2 |
| id | 1fc7f29e-8fe6-44ef-9c3c-15217e83997c |
| min_disk | 0 |
| min_ram | 0 |
| name | manila-service-image |
| owner | e2c965830ecc4162a002bf16ddc91ab7 |
| protected | False |
| size | 306577408 |
| status | active |
| tags | [] |
| updated_at | 2016-01-26T19:52:28Z |
| virtual_size | None |
| visibility | public |
+------------------+--------------------------------------+
--public
+------------------+------------------------------------------------------+
| Field | Value |
+------------------+------------------------------------------------------+
| checksum | abb1fdf972162c7214db9fad43229dad |
| container_format | bare |
| created_at | 2016-03-16T23:37:51Z |
| disk_format | qcow2 |
| file | /v2/images/dcec8c7f-4c59-4223-a06f-220231b49c0c/file |
| id | dcec8c7f-4c59-4223-a06f-220231b49c0c |
| min_disk | 0 |
| min_ram | 0 |
| name | manila-service-image |
| owner | fd4a657caa054ca99d8b4179722f49de |
| protected | False |
| schema | /v2/schemas/image |
| size | 324665344 |
| status | active |
| tags | |
| updated_at | 2016-03-16T23:37:55Z |
| virtual_size | None |
| visibility | public |
+------------------+------------------------------------------------------+
#. List available networks in order to get id and subnets of the private
network:
#. Create a new flavor to support the service image:
.. code-block:: console
$ neutron net-list
+--------------------------------------+---------+----------------------------------------------------+
| id | name | subnets |
+--------------------------------------+---------+----------------------------------------------------+
| 0e62efcd-8cee-46c7-b163-d8df05c3c5ad | public | 5cc70da8-4ee7-4565-be53-b9c011fca011 10.3.31.0/24 |
| 7c6f9b37-76b4-463e-98d8-27e5686ed083 | private | 3482f524-8bff-4871-80d4-5774c2730728 172.16.1.0/24 |
+--------------------------------------+---------+----------------------------------------------------+
# openstack flavor create manila-service-flavor --id 100 --ram 256 --disk 0 --vcpus 1
+----------------------------+-----------------------+
| Field | Value |
+----------------------------+-----------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| disk | 0 |
| id | 100 |
| name | manila-service-flavor |
| os-flavor-access:is_public | True |
| ram | 256 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 1 |
+----------------------------+-----------------------+
#. Source the ``demo`` credentials to perform
the following steps as a non-administrative project:
.. note::
.. code-block:: console
Flavor is image specific and may differ from image to image.
$ . demo-openrc
Launch an instance of the service image
---------------------------------------
.. code-block:: console
.. note::
$ manila share-network-create --name demo-share-network1 \
--neutron-net-id PRIVATE_NETWORK_ID \
--neutron-subnet-id PRIVATE_NETWORK_SUBNET_ID
+-------------------+--------------------------------------+
| Property | Value |
+-------------------+--------------------------------------+
| name | demo-share-network1 |
| segmentation_id | None |
| created_at | 2016-01-26T20:03:41.877838 |
| neutron_subnet_id | 3482f524-8bff-4871-80d4-5774c2730728 |
| updated_at | None |
| network_type | None |
| neutron_net_id | 7c6f9b37-76b4-463e-98d8-27e5686ed083 |
| ip_version | None |
| nova_net_id | None |
| cidr | None |
| project_id | e2c965830ecc4162a002bf16ddc91ab7 |
| id | 58b2f0e6-5509-4830-af9c-97f525a31b14 |
| description | None |
+-------------------+--------------------------------------+
This section uses ``manila-service-image`` image as an instance for
mounting shares.
#. Launch an instance using the ``manila-service-image`` and
``manila-service-flavor``.
#. Log into the instance using ``manila`` as the username and password.
Create a share
--------------
#. Create a NFS share using the share network:
Create a share for the Shared File Systems service option that you chose
in :ref:`manila-storage`.
.. code-block:: console
.. toctree::
:maxdepth: 1
$ manila create NFS 1 --name demo-share1 --share-network demo-share-network1
+-----------------------------+--------------------------------------+
| Property | Value |
+-----------------------------+--------------------------------------+
| status | None |
| share_type_name | None |
| description | None |
| availability_zone | None |
| share_network_id | None |
| export_locations | [] |
| host | None |
| snapshot_id | None |
| is_public | False |
| task_state | None |
| snapshot_support | True |
| id | 016ca18f-bdd5-48e1-88c0-782e4c1aa28c |
| size | 1 |
| name | demo-share1 |
| share_type | None |
| created_at | 2016-01-26T20:08:50.502877 |
| export_location | None |
| share_proto | NFS |
| consistency_group_id | None |
| source_cgsnapshot_member_id | None |
| project_id | 48e8c35b2ac6495d86d4be61658975e7 |
| metadata | {} |
+-----------------------------+--------------------------------------+
#. After some time, the share status should change from ``creating``
to ``available``:
.. code-block:: console
$ manila list
+--------------------------------------+-------------+------+-------------+-----------+-----------+--------------------------------------+---------------------------------------------------------------+-----------------------------+-------------------+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type | Export location | Host | Availability Zone |
+--------------------------------------+-------------+------+-------------+-----------+-----------+--------------------------------------+---------------------------------------------------------------+-----------------------------+-------------------+
| 5f8a0574-a95e-40ff-b898-09fd8d6a1fac | demo-share1 | 1 | NFS | available | False | 8a35da28-0f74-490d-afff-23664ecd4f01 | 10.254.0.6:/shares/share-0bfd69a1-27f0-4ef5-af17-7cd50bce6550 | storagenode@generic#GENERIC | nova |
+--------------------------------------+-------------+------+-------------+-----------+-----------+--------------------------------------+---------------------------------------------------------------+-----------------------------+-------------------+
#. Configure user access to the new share before attempting to mount it via
the network:
.. important ::
The image used for launching an instance and mounting a share must have
the NFS packages provided by the distro. Example: The cirros image
created at the image service section is not enough.
.. important ::
Use an instance that is connected to the private network used to create
the share-network.
.. code-block:: console
$ manila access-allow demo-share1 ip INSTANCE_PRIVATE_NETWORK_IP
Mount the share from an instance
--------------------------------
#. Create a folder where the mount will be placed:
.. code-block:: console
$ mkdir ~/test_folder
#. Mount the NFS share in the instance using the export location of the share:
.. code-block:: console
$ mount -v 10.254.0.6:/shares/share-0bfd69a1-27f0-4ef5-af17-7cd50bce6550 ~/test_folder
For more information about how to manage shares, see the
`OpenStack User Guide
<http://docs.openstack.org/user-guide/index.html>`__.
Return to :ref:`launch-instance`.
launch-instance-manila-dhss-false-option1.rst
launch-instance-manila-dhss-true-option2.rst

View File

@ -162,7 +162,7 @@ Shared File Systems
-------------------
If your environment includes the Shared File Systems service, you can create
a share.
a share and mount it in an instance:
.. toctree::
:maxdepth: 1

View File

@ -5,7 +5,7 @@ Install and configure controller node
This section describes how to install and configure the Shared File Systems
service, code-named manila, on the controller node. This service requires at
least one additional share node that manages file storage back-ends.
least one additional share node that manages file storage drivers.
Prerequisites
-------------
@ -225,7 +225,7 @@ Install and configure components
.. code-block:: console
# zypper install openstack-manila-api openstack-manila-scheduler python-manilaclient
# zypper install openstack-manila-api openstack-manila-scheduler
.. only:: rdo
@ -233,7 +233,7 @@ Install and configure components
.. code-block:: console
# yum install openstack-manila python-manilaclient
# yum install openstack-manila
.. only:: ubuntu or debian
@ -241,7 +241,7 @@ Install and configure components
.. code-block:: console
# apt-get install manila-api manila-scheduler python-manilaclient
# apt-get install manila-api manila-scheduler
.. only:: debian
@ -272,7 +272,7 @@ Install and configure components
[database]
...
connection = mysql+pymysql://manila:manila_DBPASS@controller/manila
connection = mysql+pymysql://manila:MANILA_DBPASS@controller/manila
Replace ``MANILA_DBPASS`` with the password you chose for the
Share File System database.
@ -302,9 +302,7 @@ Install and configure components
[DEFAULT]
...
default_share_type = default_share_type
share_name_template = share-%s
rootwrap_config = /etc/manila/rootwrap.conf
api_paste_config = /etc/manila/api-paste.ini
* In the ``[DEFAULT]`` and ``[keystone_authtoken]`` sections,
configure Identity service access:
@ -317,9 +315,10 @@ Install and configure components
[keystone_authtoken]
...
memcached_servers = controller:11211
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
@ -346,7 +345,7 @@ Install and configure components
[oslo_concurrency]
...
lock_path = /var/lock/manila
lock_path = /var/lib/manila/tmp
.. only:: rdo or ubuntu
@ -361,30 +360,30 @@ Finalize installation
.. only:: obs or rdo
#. Start the Share File System services and configure them to start when
the system boots:
* Start the Share File System services and configure them to start when
the system boots:
.. code-block:: console
.. code-block:: console
# systemctl enable openstack-manila-api.service openstack-manila-scheduler.service
# systemctl start openstack-manila-api.service openstack-manila-scheduler.service
# systemctl enable openstack-manila-api.service openstack-manila-scheduler.service
# systemctl start openstack-manila-api.service openstack-manila-scheduler.service
.. only:: ubuntu or debian
#. Restart the Share File Systems services:
* Restart the Share File Systems services:
.. code-block:: console
.. code-block:: console
# service manila-scheduler restart
# service manila-api restart
# service manila-scheduler restart
# service manila-api restart
.. only:: ubuntu
3. By default, the Ubuntu packages create an SQLite database.
* By default, the Ubuntu packages create an SQLite database.
Because this configuration uses an SQL database server,
you can remove the SQLite database file:
Because this configuration uses an SQL database server,
you can remove the SQLite database file:
.. code-block:: console
.. code-block:: console
# rm -f /var/lib/manila/manila.sqlite
# rm -f /var/lib/manila/manila.sqlite

View File

@ -0,0 +1,154 @@
Shared File Systems Option 1: No driver support for share servers management
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For simplicity, this configuration references the same storage node
configuration for the Block Storage service. However, the LVM driver
requires a separate empty local block storage device to avoid conflict
with the Block Storage service. The instructions use ``/dev/sdc``, but
you can substitute a different value for your particular node.
Prerequisites
-------------
.. note::
Perform these steps on the storage node.
#. Install the supporting utility packages:
.. only:: obs
* Install LVM and NFS server packages:
.. code-block:: console
# zypper install lvm2 nfs-kernel-server
* (Optional) If you intend to use non-raw image types such as QCOW2
and VMDK, install the QEMU package:
.. code-block:: console
# zypper install qemu
.. only:: rdo
* Install LVM and NFS server packages:
.. code-block:: console
# yum install lvm2 nfs-utils nfs4-acl-tools portmap
* Start the LVM metadata service and configure it to start when the
system boots:
.. code-block:: console
# systemctl enable lvm2-lvmetad.service
# systemctl start lvm2-lvmetad.service
.. only:: ubuntu
* Install LVM and NFS server packages:
.. code-block:: console
# apt-get install lvm2 nfs-kernel-server
#. Create the LVM physical volume ``/dev/sdc``:
.. code-block:: console
# pvcreate /dev/sdc
Physical volume "/dev/sdc" successfully created
#. Create the LVM volume group ``manila-volumes``:
.. code-block:: console
# vgcreate manila-volumes /dev/sdc
Volume group "manila-volumes" successfully created
The Shared File Systems service creates logical volumes in this volume
group.
#. Only instances can access Shared File Systems service volumes. However,
the underlying operating system manages the devices associated with
the volumes. By default, the LVM volume scanning tool scans the
``/dev`` directory for block storage devices that
contain volumes. If projects use LVM on their volumes, the scanning
tool detects these volumes and attempts to cache them which can cause
a variety of problems with both the underlying operating system
and project volumes. You must reconfigure LVM to scan only the devices
that contain the ``cinder-volume`` and ``manila-volumes`` volume groups.
Edit the ``/etc/lvm/lvm.conf`` file and complete the following actions:
* In the ``devices`` section, add a filter that accepts the
``/dev/sdb`` and ``/dev/sdc`` devices and rejects all other devices:
.. code-block:: ini
devices {
...
filter = [ "a/sdb/", "a/sdc", "r/.*/"]
.. warning::
If your storage nodes use LVM on the operating system disk, you
must also add the associated device to the filter. For example,
if the ``/dev/sda`` device contains the operating system:
.. code-block:: ini
filter = [ "a/sda/", "a/sdb/", "a/sdc", "r/.*/"]
Similarly, if your compute nodes use LVM on the operating
system disk, you must also modify the filter in the
``/etc/lvm/lvm.conf`` file on those nodes to include only
the operating system disk. For example, if the ``/dev/sda``
device contains the operating system:
.. code-block:: ini
filter = [ "a/sda/", "r/.*/"]
Configure components
--------------------
.. include:: shared/note_configuration_vary_by_distribution.rst
#. Edit the ``/etc/manila/manila.conf`` file and complete the following
actions:
* In the ``[DEFAULT]`` section, enable the LVM driver and the NFS/CIFS
protocols:
.. code-block:: ini
[DEFAULT]
...
enabled_share_backends = lvm
enabled_share_protocols = NFS,CIFS
.. note::
Back end names are arbitrary. As an example, this guide uses the name
of the driver.
* In the ``[lvm]`` section, configure the LVM driver:
.. code-block:: ini
[lvm]
share_backend_name = LVM
share_driver = manila.share.drivers.lvm.LVMShareDriver
driver_handles_share_servers = False
lvm_share_volume_group = manila-volumes
lvm_share_export_ip = MANAGEMENT_INTERFACE_IP_ADDRESS
Replace ``MANAGEMENT_INTERFACE_IP_ADDRESS`` with the IP address
of the management network interface on your storage node,
typically 10.0.0.41 for the first node in the
:ref:`example architecture <overview-example-architectures>`.
Return to :ref:`Finalize installation <manila-share-finalize-install>`.

View File

@ -0,0 +1,132 @@
Shared File Systems Option 2: Driver support for share servers management
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For simplicity, this configuration references the same storage node
configuration for the Block Storage service.
.. note::
This guide describes how to configure the Shared File Systems service to
use the ``generic`` driver with the driver handles share server mode
(DHSS) enabled. This mode requires Compute (nova), Networking (neutron) and
Block storage (cinder) services for managing share servers. The information
used for creating share servers is configured as share networks. Generic
driver with DHSS enabled also requires network to be attached to a public
router.
Prerequisites
-------------
Before you proceed, verify operation of the Compute, Networking, and Block
Storage services. This options requires implementation of Networking option 2
and requires installation of some Networking service components on the storage
node.
* Install the Networking service components:
.. only:: obs
.. code-block:: console
# zypper install --no-recommends openstack-neutron-linuxbridge-agent
.. only:: rdo
.. code-block:: console
# yum install openstack-neutron openstack-neutron-linuxbridge ebtables
.. only:: ubuntu
.. code-block:: console
# apt-get install neutron-plugin-linuxbridge-agent
Configure components
--------------------
.. include:: shared/note_configuration_vary_by_distribution.rst
#. Edit the ``/etc/manila/manila.conf`` file and complete the following
actions:
* In the ``[DEFAULT]`` section, enable the generic driver and the NFS/CIFS
protocols:
.. code-block:: ini
[DEFAULT]
...
enabled_share_backends = generic
enabled_share_protocols = NFS,CIFS
.. note::
Back end names are arbitrary. As an example, this guide uses the name
of the driver.
* In the ``[neutron]``, ``[nova]``, and ``[cinder]`` sections, enable
authentication for those services:
.. code-block:: ini
[neutron]
...
url = http://controller:9696
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = NEUTRON_PASS
[nova]
...
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = nova
password = NOVA_PASS
[cinder]
...
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = cinder
password = CINDER_PASS
* In the ``[generic]`` section, configure the generic driver:
.. code-block:: ini
[generic]
share_backend_name = GENERIC
share_driver = manila.share.drivers.generic.GenericShareDriver
driver_handles_share_servers = True
service_instance_flavor_id = 100
service_image_name = manila-service-image
service_instance_user = manila
service_instance_password = manila
interface_driver = manila.network.linux.interface.BridgeInterfaceDriver
.. note::
You can also use SSH keys instead of password authentication for
service instance credentials.
Return to :ref:`Finalize installation <manila-share-finalize-install>`.

View File

@ -4,57 +4,32 @@ Install and configure a share node
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This section describes how to install and configure a share node for the
Shared File Systems service. For simplicity, this configuration references one
storage node with the generic driver managing the share servers. The
generic backend manages share servers using compute, networking and block
services for provisioning shares.
.. Note::
The manila-share process can run in two modes, with and without handling of
share servers. In general it depends of the driver support.
Shared File Systems service.
Install and configure components
--------------------------------
.. include:: shared/note_configuration_vary_by_distribution.rst
#. Install the packages:
.. only:: obs
.. code-block:: console
# zypper install openstack-manila python-PyMySQL
# zypper install openstack-manila-share python-PyMySQL
.. only:: rdo
.. code-block:: console
# yum install openstack-manila targetcli python-oslo-policy
# yum install openstack-manila-share python2-PyMySQL
.. only:: ubuntu
.. code-block:: console
# apt-get install manila-common python-pymysql
#. Install neutron agent packages needed for generic driver:
.. only:: obs
.. code-block:: console
# zypper install --no-recommends openstack-neutron-linuxbridge-agent ipset
.. only:: rdo
.. code-block:: console
# yum install openstack-neutron openstack-neutron-linuxbridge ebtables ipset
.. only:: ubuntu
.. code-block:: console
# apt-get install neutron-plugin-linuxbridge-agent conntrack
# apt-get install manila-share python-pymysql
#. Edit the ``/etc/manila/manila.conf`` file and complete the following
actions:
@ -105,9 +80,7 @@ Install and configure components
[DEFAULT]
...
default_share_type = default_share_type
share_name_template = share-%s
rootwrap_config = /etc/manila/rootwrap.conf
api_paste_config = /etc/manila/api-paste.ini
* In the ``[DEFAULT]`` and ``[keystone_authtoken]`` sections,
configure Identity service access:
@ -120,6 +93,7 @@ Install and configure components
[keystone_authtoken]
...
memcached_servers = controller:11211
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
@ -145,71 +119,6 @@ Install and configure components
typically 10.0.0.41 for the first node in the
:ref:`example architecture <overview-example-architectures>`.
* Edit the ``/etc/manila/manila.conf`` file, configure nova, cinder and
neutron credentials:
.. code-block:: ini
[DEFAULT]
...
nova_admin_auth_url=http://controller:5000/v2.0
nova_admin_tenant_name=service
nova_admin_username=nova
nova_admin_password=NOVA_PASS
cinder_admin_auth_url=http://controller:5000/v2.0
cinder_admin_tenant_name=service
cinder_admin_username=cinder
cinder_admin_password=CINDER_PASS
neutron_admin_auth_url=http://controller:5000/v2.0
neutron_url=http://controller:9696
neutron_admin_project_name=service
neutron_admin_username=neutron
neutron_admin_password=NEUTRON_PASS
* In the ``[generic]`` section, configure the generic share driver:
.. code-block:: ini
[generic]
share_backend_name = GENERIC
share_driver = manila.share.drivers.generic.GenericShareDriver
* In the ``[generic]`` section, enable driver handles share servers (DHSS),
setup flavor (m1.small has id=2) and image configurations:
.. code-block:: ini
driver_handles_share_servers = True
service_instance_flavor_id = 2
service_image_name = manila-service-image
service_instance_user = manila
service_instance_password = manila
* In the ``[generic]`` section, configure linux bridge for interface
driver:
.. code-block:: ini
interface_driver = manila.network.linux.interface.BridgeInterfaceDriver
* In the ``[DEFAULT]`` section, enable the generic back end:
.. note::
Back-end names are arbitrary. As an example, this guide
uses the name of the driver as the name of the back end.
.. code-block:: ini
[DEFAULT]
...
enabled_share_backends = generic
enabled_share_protocols = NFS,CIFS
* In the ``[oslo_concurrency]`` section, configure the lock path:
.. code-block:: ini
@ -218,42 +127,78 @@ Install and configure components
...
lock_path = /var/lib/manila/tmp
Configure share server management support options
-------------------------------------------------
The share node can support two modes, with and without the handling of
share servers. The mode depends on driver support.
Option 1 deploys the service without driver support for share management. In
this mode, the service does not do anything related to networking. The operator
must ensure network connectivity between instances and the NFS server. This
option uses LVM driver that requires LVM and NFS packages as well as an
additional disk for the ``manila-share`` LVM volume group.
Option 2 deploys the service with driver support for share management. In this
mode, the service requires Compute (nova), Networking (neutron) and Block
storage (cinder) services for managing share servers. The information used for
creating share servers is configured as share networks. This option uses the
generic driver with the handling of share servers capacity and requires
attaching the ``selfservice`` network to a router.
.. warning::
A bug prevents using both driver options on the same share node.
For more information, see LVM Driver section at the
`Configuration Reference <http://docs.openstack.org/mitaka/config-reference/content/section_share-drivers.html>`__.
Choose one of the following options to configure the share driver.
Afterwards, return here and proceed to
:ref:`manila-share-finalize-install`.
.. toctree::
:maxdepth: 1
manila-share-install-dhss-false-option1.rst
manila-share-install-dhss-true-option2.rst
.. _manila-share-finalize-install:
Finalize installation
---------------------
#. Prepare manila-share as start/stop service:
.. only:: obs
.. only:: obs
* Start the Share File System service including its dependencies
and configure them to start when the system boots:
* Start the Share File Systems service including its dependencies
and configure them to start when the system boots:
.. code-block:: console
.. code-block:: console
# systemctl enable openstack-manila-share.service tgtd.service
# systemctl start openstack-manila-share.service tgtd.service
# systemctl enable openstack-manila-share.service
# systemctl start openstack-manila-share.service
.. only:: rdo
.. only:: rdo
* Start the Share File System service including its dependencies
and configure them to start when the system boots:
* Start the Share File Systems service including its dependencies
and configure them to start when the system boots:
.. code-block:: console
.. code-block:: console
# systemctl enable openstack-manila-share.service target.service
# systemctl start openstack-manila-share.service target.service
# systemctl enable openstack-manila-share.service
# systemctl start openstack-manila-share.service
.. only:: ubuntu
.. only:: ubuntu
* Start the Share File System service including its dependencies:
* Start the Share File Systems service including its dependencies:
.. code-block:: console
.. code-block:: console
# service manila-share restart
# service manila-share restart
* By default, the Ubuntu packages create an SQLite database.
Because this configuration uses an SQL database server,
remove the SQLite database file:
* By default, the Ubuntu packages create an SQLite database.
Because this configuration uses an SQL database server,
remove the SQLite database file:
.. code-block:: console
.. code-block:: console
# rm -f /var/lib/manila/manila.sqlite
# rm -f /var/lib/manila/manila.sqlite

View File

@ -18,12 +18,26 @@ Verify operation of the Shared File Systems service.
#. List service components to verify successful launch of each process:
For deployments using option 1:
.. code-block:: console
$ manila service-list
+------------------+----------------+------+---------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+----------------+------+---------+-------+----------------------------+-----------------+
| manila-scheduler | controller | nova | enabled | up | 2014-10-18T01:30:54.000000 | None |
| manila-share | share1@generic | nova | enabled | up | 2014-10-18T01:30:57.000000 | None |
+------------------+----------------+------+---------+-------+----------------------------+-----------------+
+----+------------------+-------------+------+---------+-------+----------------------------+
| Id | Binary | Host | Zone | Status | State | Updated_at |
+----+------------------+-------------+------+---------+-------+----------------------------+
| 1 | manila-scheduler | controller | nova | enabled | up | 2016-03-30T20:17:28.000000 |
| 2 | manila-share | storage@lvm | nova | enabled | up | 2016-03-30T20:17:29.000000 |
+----+------------------+-------------+------+---------+-------+----------------------------+
For deployments using option 2:
.. code-block:: console
$ manila service-list
+----+------------------+-----------------+------+---------+-------+----------------------------+
| Id | Binary | Host | Zone | Status | State | Updated_at |
+----+------------------+-----------------+------+---------+-------+----------------------------+
| 1 | manila-scheduler | controller | nova | enabled | up | 2016-03-30T20:17:28.000000 |
| 2 | manila-share | storage@generic | nova | enabled | up | 2016-03-30T20:17:29.000000 |
+----+------------------+-----------------+------+---------+-------+----------------------------+

View File

@ -15,23 +15,10 @@ Shared File Systems service
The OpenStack Shared File Systems service provides coordinated access to
shared or distributed file systems. The method in which the share is
provisioned and consumed is determined by the Shared File Systems driver, or
drivers in the case of a multi-backend configuration. There are a variety of
drivers in the case of a multi-driver configuration. There are a variety of
drivers that support NFS, CIFS, HDFS and/or protocols as well.
The Shared File Systems API and scheduler services typically run on the
controller nodes. Depending upon the drivers used, the share service can run
on controllers, compute nodes, or storage nodes.
.. important::
For simplicity, this guide describes configuring the Shared File Systems
service to use the ``generic`` back end with the driver handles share
server mode (DHSS) enabled that uses Compute (nova), Networking (neutron)
and Block storage (cinder) services.
Networking service configuration requires the capability of networks being
attached to a public router in order to create share networks.
Before you proceed, ensure that Compute, Networking and Block storage
services are properly working. For networking service, ensure that option
2 is properly configured.
For more information, see the `Configuration Reference <http://docs.openstack.org/mitaka/config-reference/content/section_share-drivers.html>`__.