Compute nodes will also be used as storage nodes. However we need to install the services in controller node.
Create the database, grant privileges
CREATE DATABASE cinder; GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' IDENTIFIED BY 'commonpass'; GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' IDENTIFIED BY 'commonpass'; FLUSH PRIVILEGES; exit
Create service credentials
. admin-openrc openstack user create --domain default --password-prompt cinder openstack role add --project service --user cinder admin
Create the cinderv2
and cinderv3
service entities
openstack service create --name cinderv2 --description "OpenStack Block Storage" volumev2 openstack service create --name cinderv3 --description "OpenStack Block Storage" volumev3
Create service endpoints
openstack endpoint create --region RegionOne volumev2 public http://controller:8776/v2/%\(project_id\)s openstack endpoint create --region RegionOne volumev2 internal http://controller:8776/v2/%\(project_id\)s openstack endpoint create --region RegionOne volumev2 admin http://controller:8776/v2/%\(project_id\)s openstack endpoint create --region RegionOne volumev3 public http://controller:8776/v3/%\(project_id\)s openstack endpoint create --region RegionOne volumev3 internal http://controller:8776/v3/%\(project_id\)s openstack endpoint create --region RegionOne volumev3 admin http://controller:8776/v3/%\(project_id\)s
Install the packages
apt install -y cinder-api cinder-scheduler
Update configurations – Edit /etc/cinder/cinder.conf
[database] connection = mysql+pymysql://cinder:commonpass@controller/cinder #[DEFAULT] - Added to existing configuration [DEFAULT] transport_url = rabbit://openstack:commonpass@controller auth_strategy = keystone # Management IP address my_ip = 10.1.1.60 # Added this section [keystone_authtoken] www_authenticate_uri = http://controller:5000 auth_url = http://controller:5000 memcached_servers = controller:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = cinder password = commonpass # Added this section [oslo_concurrency] lock_path = /var/lib/cinder/tmp
Populate the database
su -s /bin/sh -c "cinder-manage db sync" cinder
Configure Compute to use Block Storage – Edit /etc/nova/nova.conf
[cinder] os_region_name = RegionOne
Restart the Compute API and block storage service
service nova-api restart service cinder-scheduler restart service apache2 restart