cinder存储服务
安装配置(控制节点)
- 创建cinder数据库并授权,自定义帐号密码cinder/cinder
mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE cinder;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' IDENTIFIED BY 'cinder';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' IDENTIFIED BY 'cinder';
MariaDB [(none)]> FLUSH PRIVILEGES;
- 加载临时环境变量
. keystonerc_admin
- 创建服务凭据
- 创建cinder用户,自定义密码为cinder:
[root@controller-01 ~]# openstack user create --domain default --password-prompt cinder
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | default |
| enabled | True |
| id | 586034dc84fa427baec593ed32501d28 |
| name | cinder |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+
- 给cinder用户添加admin角色,命令不输出结果:
openstack role add --project service --user cinder admin
- 创建cinderv2和cinderv3服务实体:
[root@controller-01 ~]# openstack service create --name cinderv2 --description "OpenStack Block Storage" volumev2
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Block Storage |
| enabled | True |
| id | 08c72135ddcb46fda290c6ec94b270ed |
| name | cinderv2 |
| type | volumev2 |
+-------------+----------------------------------+
[root@controller-01 ~]# openstack service create --name cinderv3 --description "OpenStack Block Storage" volumev3
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Block Storage |
| enabled | True |
| id | 671d97addc654760be943446f9c158f6 |
| name | cinderv3 |
| type | volumev3 |
+-------------+----------------------------------+
- 创建块存储服务API端点:
[root@controller-01 ~]# openstack endpoint create --region RegionOne volumev2 public http://controller-01:8776/v2/%\(project_id\)s
+--------------+---------------------------------------------+
| Field | Value |
+--------------+---------------------------------------------+
| enabled | True |
| id | 7a53221557e04a619dc0c32f8c7317d0 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 08c72135ddcb46fda290c6ec94b270ed |
| service_name | cinderv2 |
| service_type | volumev2 |
| url | http://controller-01:8776/v2/%(project_id)s |
+--------------+---------------------------------------------+
[root@controller-01 ~]# openstack endpoint create --region RegionOne volumev2 internal http://controller-01:8776/v2/%\(project_id\)s
+--------------+---------------------------------------------+
| Field | Value |
+--------------+---------------------------------------------+
| enabled | True |
| id | 09a252a768084d889d512fcc9d2a654a |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 08c72135ddcb46fda290c6ec94b270ed |
| service_name | cinderv2 |
| service_type | volumev2 |
| url | http://controller-01:8776/v2/%(project_id)s |
+--------------+---------------------------------------------+
[root@controller-01 ~]# openstack endpoint create --region RegionOne volumev2 admin http://controller-01:8776/v2/%\(project_id\)s
+--------------+---------------------------------------------+
| Field | Value |
+--------------+---------------------------------------------+
| enabled | True |
| id | b9f21f762ce841bba9d54611bd2ecd42 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 08c72135ddcb46fda290c6ec94b270ed |
| service_name | cinderv2 |
| service_type | volumev2 |
| url | http://controller-01:8776/v2/%(project_id)s |
+--------------+---------------------------------------------+
[root@controller-01 ~]# openstack endpoint create --region RegionOne volumev3 public http://controller-01:8776/v3/%\(project_id\)s
+--------------+---------------------------------------------+
| Field | Value |
+--------------+---------------------------------------------+
| enabled | True |
| id | d7e6dffcafbb4c4f807808c834af160a |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 671d97addc654760be943446f9c158f6 |
| service_name | cinderv3 |
| service_type | volumev3 |
| url | http://controller-01:8776/v3/%(project_id)s |
+--------------+---------------------------------------------+
[root@controller-01 ~]# openstack endpoint create --region RegionOne volumev3 internal http://controller-01:8776/v3/%\(project_id\)s
+--------------+---------------------------------------------+
| Field | Value |
+--------------+---------------------------------------------+
| enabled | True |
| id | ac3c4e5395cc4b82b0ffa3af5548c69c |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 671d97addc654760be943446f9c158f6 |
| service_name | cinderv3 |
| service_type | volumev3 |
| url | http://controller-01:8776/v3/%(project_id)s |
+--------------+---------------------------------------------+
[root@controller-01 ~]# openstack endpoint create --region RegionOne volumev3 admin http://controller-01:8776/v3/%\(project_id\)s
+--------------+---------------------------------------------+
| Field | Value |
+--------------+---------------------------------------------+
| enabled | True |
| id | a6479e61952b4e7a85719195c4ac5728 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 671d97addc654760be943446f9c158f6 |
| service_name | cinderv3 |
| service_type | volumev3 |
| url | http://controller-01:8776/v3/%(project_id)s |
+--------------+---------------------------------------------+