Nishant Kumar | 9d06ea9 | 2017-07-20 12:13:03 -0400 | [diff] [blame^] | 1 | Prerequisites |
| 2 | ------------- |
| 3 | |
| 4 | Before you install and configure the volume service, |
| 5 | you must create a database, service credentials, and API endpoints. |
| 6 | |
| 7 | #. To create the database, complete these steps: |
| 8 | |
| 9 | * Use the database access client to connect to the database |
| 10 | server as the ``root`` user: |
| 11 | |
| 12 | .. code-block:: console |
| 13 | |
| 14 | $ mysql -u root -p |
| 15 | |
| 16 | * Create the ``cinder_tempest_plugin`` database: |
| 17 | |
| 18 | .. code-block:: none |
| 19 | |
| 20 | CREATE DATABASE cinder_tempest_plugin; |
| 21 | |
| 22 | * Grant proper access to the ``cinder_tempest_plugin`` database: |
| 23 | |
| 24 | .. code-block:: none |
| 25 | |
| 26 | GRANT ALL PRIVILEGES ON cinder_tempest_plugin.* TO 'cinder_tempest_plugin'@'localhost' \ |
| 27 | IDENTIFIED BY 'CINDER_TEMPEST_PLUGIN_DBPASS'; |
| 28 | GRANT ALL PRIVILEGES ON cinder_tempest_plugin.* TO 'cinder_tempest_plugin'@'%' \ |
| 29 | IDENTIFIED BY 'CINDER_TEMPEST_PLUGIN_DBPASS'; |
| 30 | |
| 31 | Replace ``CINDER_TEMPEST_PLUGIN_DBPASS`` with a suitable password. |
| 32 | |
| 33 | * Exit the database access client. |
| 34 | |
| 35 | .. code-block:: none |
| 36 | |
| 37 | exit; |
| 38 | |
| 39 | #. Source the ``admin`` credentials to gain access to |
| 40 | admin-only CLI commands: |
| 41 | |
| 42 | .. code-block:: console |
| 43 | |
| 44 | $ . admin-openrc |
| 45 | |
| 46 | #. To create the service credentials, complete these steps: |
| 47 | |
| 48 | * Create the ``cinder_tempest_plugin`` user: |
| 49 | |
| 50 | .. code-block:: console |
| 51 | |
| 52 | $ openstack user create --domain default --password-prompt cinder_tempest_plugin |
| 53 | |
| 54 | * Add the ``admin`` role to the ``cinder_tempest_plugin`` user: |
| 55 | |
| 56 | .. code-block:: console |
| 57 | |
| 58 | $ openstack role add --project service --user cinder_tempest_plugin admin |
| 59 | |
| 60 | * Create the cinder_tempest_plugin service entities: |
| 61 | |
| 62 | .. code-block:: console |
| 63 | |
| 64 | $ openstack service create --name cinder_tempest_plugin --description "volume" volume |
| 65 | |
| 66 | #. Create the volume service API endpoints: |
| 67 | |
| 68 | .. code-block:: console |
| 69 | |
| 70 | $ openstack endpoint create --region RegionOne \ |
| 71 | volume public http://controller:XXXX/vY/%\(tenant_id\)s |
| 72 | $ openstack endpoint create --region RegionOne \ |
| 73 | volume internal http://controller:XXXX/vY/%\(tenant_id\)s |
| 74 | $ openstack endpoint create --region RegionOne \ |
| 75 | volume admin http://controller:XXXX/vY/%\(tenant_id\)s |