Skip to content

Home Lab

Notes from my learning sessions

Menu
Menu

Cinder – Block storage service – Controller node

Posted on October 11, 2020October 21, 2020 by sandeep

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

Recent Posts

  • Openstack Xena on Ubuntu 20.04 – Cinder
  • Preparing custom Debian 11 MATE image
  • Setup Ubuntu 20.04 repository mirror server
  • Preparing custom Debian 11 server cloud image
  • Complile Linux Kernel (on Debian 11)
  • Openstack Xena – Test Home Lab
  • Openstack Xena on Ubuntu 20.04 – Horizon
  • Openstack Xena on Ubuntu 20.04 -Home Lab
  • Openstack Xena on Ubuntu 20.04 – Neutron
  • Openstack Xena on Ubuntu 20.04 – Nova

Archives

  • April 2022
  • March 2022
  • February 2022
  • December 2021
  • October 2021
  • September 2021
  • October 2020
  • February 2020
  • January 2020
  • December 2019
© 2022 Home Lab | Powered by Minimalist Blog WordPress Theme