CentOS 7
Sponsored Link

OpenStack Juno : Configure Cinder#1 ( Control Node )
2015/01/11
 
Install and Configure OpenStack Block Storage (Cinder).
For this example, Install Cinder API Server on Control Node which Keystone/Glance/Nova API are already installed, and Install Cinder-Volume on Block Storage Service Node. ( it's possible to install on a server as All-in-One, though, if you want )
                                      +------------------+
                             10.0.0.50| [ Storage Node ] |
+------------------+            +-----+   Cinder-Volume  |
| [ Control Node ] |            | eth0|                  |
|     Keystone     |10.0.0.30   |     +------------------+
|      Glance      |------------+
|     Nova API     |eth0        |     +------------------+
|    Cinder API    |            | eth0| [ Compute Node ] |
+------------------+            +-----+   Nova Compute   |
                             10.0.0.51|                  |
                                      +------------------+

 
Configure Control Node on this section.
[1] Add a User or Endpoint for Cinder to Keystone on Control Node.
# create a Cinder user (set in service tenant)

[root@dlp ~(keystone)]#
keystone user-create --tenant service --name cinder --pass servicepassword --enabled true

+----------+----------------------------------+
| Property |              Value               |
+----------+----------------------------------+
|  email   |                                  |
| enabled  |               True               |
|    id    | 6a9c39d906c64e7e9390fe2792a8165e |
|   name   |              cinder              |
| tenantId | 9e657ab1d2344de5aa9d86006732c7f0 |
| username |              cinder              |
+----------+----------------------------------+

# add Cinder user in admin role

[root@dlp ~(keystone)]#
keystone user-role-add --user cinder --tenant service --role admin
# create a service entry for Cinder

[root@dlp ~(keystone)]#
keystone service-create --name=cinder --type=volume --description="Cinder Service"

+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description |          Cinder Service          |
|   enabled   |               True               |
|      id     | 572abfe6390b400eaeb8cd5268ef1348 |
|     name    |              cinder              |
|     type    |              volume              |
+-------------+----------------------------------+
[root@dlp ~(keystone)]#
keystone service-create --name=cinderv2 --type=volumev2 --description="Cinder Service"

+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description |          Cinder Service          |
|   enabled   |               True               |
|      id     | 1b8491c6ce174bab84e1815ff6e2303d |
|     name    |             cinderv2             |
|     type    |             volumev2             |
+-------------+----------------------------------+

# define IP address for Cinder API server

[root@dlp ~(keystone)]#
export cinder_api=10.0.0.30
# create an endpoint for Cinder

[root@dlp ~(keystone)]#
keystone endpoint-create --region RegionOne \
--service cinder \
--publicurl "http://$cinder_api:8776/v1/\$(tenant_id)s" \
--internalurl "http://$cinder_api:8776/v1/\$(tenant_id)s" \
--adminurl "http://$cinder_api:8776/v1/\$(tenant_id)s"

+-------------+----------------------------------------+
|   Property  |                 Value                  |
+-------------+----------------------------------------+
|   adminurl  | http://10.0.0.30:8776/v1/$(tenant_id)s |
|      id     |    881ea211f493478cba7fff329073477a    |
| internalurl | http://10.0.0.30:8776/v1/$(tenant_id)s |
|  publicurl  | http://10.0.0.30:8776/v1/$(tenant_id)s |
|    region   |               RegionOne                |
|  service_id |    572abfe6390b400eaeb8cd5268ef1348    |
+-------------+----------------------------------------+
[root@dlp ~(keystone)]#
keystone endpoint-create --region RegionOne \
--service cinderv2 \
--publicurl "http://$cinder_api:8776/v2/\$(tenant_id)s" \
--internalurl "http://$cinder_api:8776/v2/\$(tenant_id)s" \
--adminurl "http://$cinder_api:8776/v2/\$(tenant_id)s"

+-------------+----------------------------------------+
|   Property  |                 Value                  |
+-------------+----------------------------------------+
|   adminurl  | http://10.0.0.30:8776/v2/$(tenant_id)s |
|      id     |    db0781e5a5c7431ea81c724eb74b818a    |
| internalurl | http://10.0.0.30:8776/v2/$(tenant_id)s |
|  publicurl  | http://10.0.0.30:8776/v2/$(tenant_id)s |
|    region   |               RegionOne                |
|  service_id |    1b8491c6ce174bab84e1815ff6e2303d    |
+-------------+----------------------------------------+
[2] Add a User and DB for Cinder to MariaDB.
[root@dlp ~(keystone)]#
mysql -u root -p

Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 16
Server version: 5.5.40-MariaDB-wsrep MariaDB Server, wsrep_25.11.r4026

Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>
create database cinder;

Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on cinder.* to cinder@'localhost' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on cinder.* to cinder@'%' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
flush privileges;

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
exit

Bye
[3] Install Cinder service.
# install from RDO, EPEL

[root@dlp ~(keystone)]#
yum --enablerepo=openstack-juno,epel -y install openstack-cinder
[4] Configure Cinder.
[root@dlp ~(keystone)]#
mv /etc/cinder/cinder.conf /etc/cinder/cinder.conf.org

[root@dlp ~(keystone)]#
vi /etc/cinder/cinder.conf
# create new

[DEFAULT]
state_path=/var/lib/cinder
api_paste_config=api-paste.ini
enable_v1_api=true
rootwrap_config=/etc/cinder/rootwrap.conf
auth_strategy=keystone
# specify RabbitMQ server

rabbit_host=10.0.0.30
rabbit_port=5672
# specify RabbitMQ user for auth

rabbit_userid=guest
# specify RabbitMQ user's password above

rabbit_password=password
rpc_backend=rabbit
scheduler_driver=cinder.scheduler.filter_scheduler.FilterScheduler
volume_manager=cinder.volume.manager.VolumeManager
volume_api_class=cinder.volume.api.API
volumes_dir=$state_path/volumes
# auth info for MariaDB

[database]
connection=mysql://cinder:password@10.0.0.30/cinder
# auth info for Keystone

[keystone_authtoken]
auth_host=10.0.0.30
auth_port=35357
auth_protocol=http
admin_user=cinder
admin_password=servicepassword
admin_tenant_name=service
[root@dlp ~(keystone)]#
chmod 640 /etc/cinder/cinder.conf

[root@dlp ~(keystone)]#
chgrp cinder /etc/cinder/cinder.conf

[root@dlp ~(keystone)]#
cinder-manage db sync

[root@dlp ~(keystone)]#
for service in api scheduler; do
systemctl start openstack-cinder-$service
systemctl enable openstack-cinder-$service
done

# show status

[root@dlp ~(keystone)]#
cinder-manage service list

Binary           Host      Zone     Status     State Updated At
cinder-scheduler dlp       nova     enabled    :-)   2015-01-11 12:46:24
Matched Content
 
Tweet