コントローラーノードのインストールと設定

コントローラーノードのインストールと設定

このセクションは、Shared File Systems サービス (コード名 manila) をコントローラーノードにインストールして設定する方法を説明します。このサービスでは、ファイルストレージドライバーを管理する share ノードが少なくとも 1 つ必要です。

前提条件

Shared File Systems サービスをインストールして設定する前に、データベース、サービスクレデンシャル、API エンドポイントを作成する必要があります。

  1. データベースを作成するには、これらの手順をすべて実行します。

    • データベースクライアントを使用して、データベースサーバーに root ユーザーとして接続します。

      $ mysql -u root -p
      
    • manila データベースを作成します。

      CREATE DATABASE manila;
      
    • manila データベースに適切なアクセス権を付与します。

      GRANT ALL PRIVILEGES ON manila.* TO 'manila'@'localhost' \
        IDENTIFIED BY 'MANILA_DBPASS';
      GRANT ALL PRIVILEGES ON manila.* TO 'manila'@'%' \
        IDENTIFIED BY 'MANILA_DBPASS';
      

      MANILA_DBPASS は適切なパスワードに置き換えます。

    • データベースクライアントを終了します。

  2. admin クレデンシャルを読み込み、管理者専用 CLI コマンドへのアクセス権を取得します。

    $ . admin-openrc
    
  3. 以下の手順を実行して、サービスクレデンシャルを作成します。

    • manila ユーザーを作成します。

      $ openstack user create --domain default --password-prompt manila
      User Password:
      Repeat User Password:
      +-----------+----------------------------------+
      | Field     | Value                            |
      +-----------+----------------------------------+
      | domain_id | e0353a670a9e496da891347c589539e9 |
      | enabled   | True                             |
      | id        | 83a3990fc2144100ba0e2e23886d8acc |
      | name      | manila                           |
      +-----------+----------------------------------+
      
    • admin ロールを manila ユーザーに追加します。

      $ openstack role add --project service --user manila admin
      

      注釈

      このコマンドは何も出力しません。

    • manila および manilav2 サービスエンティティーを作成します。

      $ 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                          |
        +-------------+----------------------------------+
      

      注釈

      Shared File Systems サービスは 2 つのサービスエンティティーを必要とします。

  4. Shared File Systems サービス API エンドポイントを作成します。

    $ 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 |
      +--------------+-----------------------------------------+
    

    注釈

    Share File System サービスはそれぞれのサービスエンティティーのエンドポイントを必要とします。

コンポーネントのインストールと設定

  1. パッケージをインストールします。

    # apt-get install manila-api manila-scheduler \
      python-manilaclient
    
  1. /etc/manila/manila.conf ファイルを編集し、以下の作業をすべて行います。

    • [database] セクションで、データベースのアクセス方法を設定します。

      [database]
      ...
      connection = mysql+pymysql://manila:MANILA_DBPASS@controller/manila
      

      MANILA_DBPASS は Share File System データベース用に選択したパスワードで置き換えます。

    • [DEFAULT][oslo_messaging_rabbit] セクションに、RabbitMQ メッセージキューのアクセス方法を設定します。

      [DEFAULT]
      ...
      rpc_backend = rabbit
      
      [oslo_messaging_rabbit]
      ...
      rabbit_host = controller
      rabbit_userid = openstack
      rabbit_password = RABBIT_PASS
      

      RABBIT_PASSRabbitMQopenstack アカウント用に選択したパスワードで置き換えます。

    • [DEFAULT] セクションに以下の値を設定します。

      [DEFAULT]
      ...
      default_share_type = default_share_type
      rootwrap_config = /etc/manila/rootwrap.conf
      
    • [DEFAULT] セクションと [keystone_authtoken] セクションに、Identity サービスへのアクセス方法を設定します。

      [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
      

      MANILA_PASS は Identity サービスで manila ユーザー用に選択したパスワードで置き換えます。

    • [DEFAULT] セクションで、コントローラーノードの管理インターフェースの IP アドレスを使用するように``my_ip`` オプションを設定します。

      [DEFAULT]
      ...
      my_ip = 10.0.0.11
      
    • [oslo_concurrency] セクションにロックパスを設定します。

      [oslo_concurrency]
      ...
      lock_path = /var/lib/manila/tmp
      
  1. Share File System データベースを展開します。

    # su -s /bin/sh -c "manila-manage db sync" manila
    

    注釈

    この出力の廃止予定に関するメッセージはすべて無視してください。

インストールの最終作業

  • Share File System サービスを再起動します。

    # service manila-scheduler restart
    # service manila-api restart
    
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.