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 drivers.
Before you install and configure the Share File System service, you must create a database, service credentials, and API endpoints.
Proveďte následující kroky pro vytvoření databáze:
Použijte klienta pro přístup k databázi a přihlaste se na něj jako uživatel root:
$ mysql -u root -p
Create the manila database:
CREATE DATABASE manila;
Grant proper access to the manila database:
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.
Ukončete klienta s přístup k databázi.
Použijte příkaz source pro přihlašovací údaje pro admin pro získání přístupu k příkazům příkazového řádku pro správce:
$ . admin-openrc
Proveďte následující kroky pro vytvoření přihlašovacích údajů služby:
Create a manila user:
$ openstack user create --domain default --password-prompt manila
User Password:
Repeat User Password:
+-----------+----------------------------------+
| Field | Value |
+-----------+----------------------------------+
| domain_id | e0353a670a9e496da891347c589539e9 |
| enabled | True |
| id | 83a3990fc2144100ba0e2e23886d8acc |
| name | manila |
+-----------+----------------------------------+
Add the admin role to the manila user:
$ openstack role add --project service --user manila admin
Poznámka
Tento příkaz nemá žádný výstup.
Create the manila and manilav2 service entities:
$ 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 |
+-------------+----------------------------------+
$ openstack service create --name manilav2 \
--description "OpenStack Shared File Systems" sharev2
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Shared File Systems |
| enabled | True |
| id | 30d92a97a81a4e5d8fd97a32bafd7b88 |
| name | manilav2 |
| type | sharev2 |
+-------------+----------------------------------+
Poznámka
The Share File System services require two service entities.
Create the Shared File Systems service API endpoints:
$ 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/%(tenant_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/%(tenant_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/%(tenant_id)s |
+--------------+-----------------------------------------+
$ openstack endpoint create --region RegionOne \
sharev2 public http://controller:8786/v2/%\(tenant_id\)s
+--------------+-----------------------------------------+
| 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/%(tenant_id)s |
+--------------+-----------------------------------------+
$ openstack endpoint create --region RegionOne \
sharev2 internal http://controller:8786/v2/%\(tenant_id\)s
+--------------+-----------------------------------------+
| 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/%(tenant_id)s |
+--------------+-----------------------------------------+
$ openstack endpoint create --region RegionOne \
sharev2 admin http://controller:8786/v2/%\(tenant_id\)s
+--------------+-----------------------------------------+
| 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/%(tenant_id)s |
+--------------+-----------------------------------------+
Poznámka
The Share File System services require endpoints for each service entity.
Nainstalujte balíčky:
# yum install openstack-manila python-manilaclient
Edit the /etc/manila/manila.conf file and complete the following actions:
V části [database] nastavte přístup k databázi:
[database]
...
connection = mysql+pymysql://manila:MANILA_DBPASS@controller/manila
Replace MANILA_DBPASS with the password you chose for the Share File System database.
V částech [DEFAULT] a [oslo_messaging_rabbit] nastavte přístup ke frontě zpráv RabbitMQ:
[DEFAULT]
...
rpc_backend = rabbit
[oslo_messaging_rabbit]
...
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = RABBIT_PASS
Nahraďte RABBIT_PASS Vámi zvoleným heslem pro účet openstack v RabbitMQ.
In the [DEFAULT] section, set the following config values:
[DEFAULT]
...
default_share_type = default_share_type
rootwrap_config = /etc/manila/rootwrap.conf
V částech [DEFAULT] a [keystone_authtoken] nastavte přístup ke službě identit:
[DEFAULT]
...
auth_strategy = keystone
[keystone_authtoken]
...
memcached_servers = controller:11211
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = manila
password = MANILA_PASS
Replace MANILA_PASS with the password you chose for the manila user in the Identity service.
V části [DEFAULT] nastavte volbu my_ip pro zvolení IP adresy rozhraní pro správce v uzlu kontroléru:
[DEFAULT]
...
my_ip = 10.0.0.11
V části [oslo_concurrencyservice_credentials] nastavte cestu pro zámky:
[oslo_concurrency]
...
lock_path = /var/lib/manila/tmp
Populate the Share File System database:
# su -s /bin/sh -c "manila-manage db sync" manila
Poznámka
Ignore any deprecation messages in this output.
Start the Share File System services and configure them to start when the system boots:
# systemctl enable openstack-manila-api.service openstack-manila-scheduler.service
# systemctl start openstack-manila-api.service openstack-manila-scheduler.service
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.