1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
|
Prerequisites
-------------
Before you install and configure the Shared File Systems service, you
must create a database, service credentials, and `API endpoints`.
#. To create the database, complete these steps:
* Use the database access client to connect to the database server as the
``root`` user:
.. code-block:: console
$ mysql -u root -p
* Create the `manila` database:
.. code-block:: console
CREATE DATABASE manila;
* Grant proper access to the ``manila`` database:
.. code-block:: console
GRANT ALL PRIVILEGES ON manila.* TO 'manila'@'localhost' \
IDENTIFIED BY 'MANILA_DBPASS';
GRANT ALL PRIVILEGES ON manila.* TO 'manila'@'%' \
IDENTIFIED BY 'MANILA_DBPASS';
Replace ``MANILA_DBPASS`` with a suitable password.
* Exit the database access client.
#. Source the ``admin`` credentials to gain access to admin CLI commands:
.. code-block:: console
$ . admin-openrc.sh
#. To create the service credentials, complete these steps:
* Create a ``manila`` user:
.. code-block:: console
$ openstack user create --domain default --password-prompt manila
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | e0353a670a9e496da891347c589539e9 |
| enabled | True |
| id | 83a3990fc2144100ba0e2e23886d8acc |
| name | manila |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+
* Add the ``admin`` role to the ``manila`` user:
.. code-block:: console
$ openstack role add --project service --user manila admin
.. note::
This command provides no output.
* Create the ``manila`` and ``manilav2`` service entities:
.. code-block:: console
$ openstack service create --name manila \
--description "OpenStack Shared File Systems" share
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Shared File Systems |
| enabled | True |
| id | 82378b5a16b340aa9cc790cdd46a03ba |
| name | manila |
| type | share |
+-------------+----------------------------------+
.. code-block:: console
$ openstack service create --name manilav2 \
--description "OpenStack Shared File Systems V2" sharev2
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Shared File Systems V2 |
| enabled | True |
| id | 30d92a97a81a4e5d8fd97a32bafd7b88 |
| name | manilav2 |
| type | sharev2 |
+-------------+----------------------------------+
.. note::
The Shared File Systems services require two service entities.
#. Create the Shared File Systems service API endpoints:
.. code-block:: console
$ openstack endpoint create --region RegionOne \
share public http://controller:8786/v1/%\(tenant_id\)s
+--------------+------------------------------------------+
| Field | Value |
+--------------+------------------------------------------+
| enabled | True |
| id | 0bd2bbf8d28b433aaea56a254c69f69d |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 82378b5a16b340aa9cc790cdd46a03ba |
| service_name | manila |
| service_type | share |
| url | http://controller:8786/v1/%(project_id)s |
+--------------+------------------------------------------+
$ openstack endpoint create --region RegionOne \
share internal http://controller:8786/v1/%\(tenant_id\)s
+--------------+------------------------------------------+
| Field | Value |
+--------------+------------------------------------------+
| enabled | True |
| id | a2859b5732cc48b5b083dd36dafb6fd9 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 82378b5a16b340aa9cc790cdd46a03ba |
| service_name | manila |
| service_type | share |
| url | http://controller:8786/v1/%(project_id)s |
+--------------+------------------------------------------+
$ openstack endpoint create --region RegionOne \
share admin http://controller:8786/v1/%\(tenant_id\)s
+--------------+------------------------------------------+
| Field | Value |
+--------------+------------------------------------------+
| enabled | True |
| id | f7f46df93a374cc49c0121bef41da03c |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 82378b5a16b340aa9cc790cdd46a03ba |
| service_name | manila |
| service_type | share |
| url | http://controller:8786/v1/%(project_id)s |
+--------------+------------------------------------------+
.. code-block:: console
$ openstack endpoint create --region RegionOne \
sharev2 public http://controller:8786/v2
+--------------+-----------------------------------------+
| Field | Value |
+--------------+-----------------------------------------+
| enabled | True |
| id | d63cc0d358da4ea680178657291eddc1 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 30d92a97a81a4e5d8fd97a32bafd7b88 |
| service_name | manilav2 |
| service_type | sharev2 |
| url | http://controller:8786/v2 |
+--------------+-----------------------------------------+
$ openstack endpoint create --region RegionOne \
sharev2 internal http://controller:8786/v2
+--------------+-----------------------------------------+
| Field | Value |
+--------------+-----------------------------------------+
| enabled | True |
| id | afc86e5f50804008add349dba605da54 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 30d92a97a81a4e5d8fd97a32bafd7b88 |
| service_name | manilav2 |
| service_type | sharev2 |
| url | http://controller:8786/v2 |
+--------------+-----------------------------------------+
$ openstack endpoint create --region RegionOne \
sharev2 admin http://controller:8786/v2
+--------------+-----------------------------------------+
| Field | Value |
+--------------+-----------------------------------------+
| enabled | True |
| id | e814a0cec40546e98cf0c25a82498483 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 30d92a97a81a4e5d8fd97a32bafd7b88 |
| service_name | manilav2 |
| service_type | sharev2 |
| url | http://controller:8786/v2 |
+--------------+-----------------------------------------+
.. note::
The Shared File Systems services require endpoints for each service
entity.
|