Install and configure controller node on Ubuntu¶
This section describes how to install and configure the Shared File Systems service, code-named manila, on the controller node that runs Ubuntu. This service requires at least one additional share node that manages file storage back ends.
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
rootuser:$ mysql -u root -pCreate the manila database:
CREATE DATABASE manila;Grant proper access to the
maniladatabase: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_DBPASSwith a suitable password.Exit the database access client.
Source the
admincredentials to gain access to admin CLI commands:$ . admin-openrc.shTo create the service credentials, complete these steps:
Create a
manilauser:$ 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
adminrole to themanilauser:$ openstack role add --project service --user manila adminNote
This command provides no output.
Create the
manilaandmanilav2service 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 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:
$ 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 | +--------------+------------------------------------------+
$ 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.
Install and configure components¶
Install the packages:
# apt-get install manila-api manila-scheduler python3-manilaclientEdit the
/etc/manila/manila.conffile and complete the following actions:In the
[database]section, configure database access:[database] ... connection = mysql+pymysql://manila:MANILA_DBPASS@controller/manila
Replace
MANILA_DBPASSwith the password you chose for the Shared File Systems database.
Complete the rest of the configuration in
manila.conf:In the
[DEFAULT]section, configureRabbitMQmessage queue access:[DEFAULT] ... transport_url = rabbit://openstack:RABBIT_PASS@controller
Replace
RABBIT_PASSwith the password you chose for theopenstackaccount inRabbitMQ.In the
[DEFAULT]section, set the following config values:[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
Important
The
default_share_typeoption specifies the default share type to be used when shares are created without specifying the share type in the request. The default share type that is specified in the configuration file has to be created with the necessary required extra-specs (such asdriver_handles_share_servers) set appropriately with reference to the driver mode used. This is further explained in the section discussing the setup and configuration of the share node.In the
[DEFAULT]and[keystone_authtoken]sections, configure Identity service access:[DEFAULT] ... auth_strategy = keystone [keystone_authtoken] ... memcached_servers = controller:11211 www_authenticate_uri = http://controller:5000 auth_url = http://controller:5000 auth_type = password project_domain_name = Default user_domain_name = Default project_name = service username = manila password = MANILA_PASS
Replace
MANILA_PASSwith the password you chose for themanilauser in the Identity service.In the
[DEFAULT]section, configure themy_ipoption to use the management interface IP address of the controller node:[DEFAULT] ... my_ip = 10.0.0.11
In the
[oslo_concurrency]section, configure the lock path:[oslo_concurrency] ... lock_path = /var/lock/manila
Populate the Shared File Systems database:
# su -s /bin/sh -c "manila-manage db sync" manila
Note
Ignore any deprecation messages in this output.
Finalize installation¶
Restart the Shared File Systems services:
# service manila-scheduler restart # service manila-api restart
By default, the Ubuntu packages create an SQLite database. Because this configuration uses an SQL database server, you can remove the SQLite database file:
# rm -f /var/lib/manila/manila.sqlite