10. Control node installation cinder

Article directory

10.1 storage classification

  • Block storage: hard disk, disk array DAS,SAN storage
  • File storage: nfs, GluserFS,Ceph(PB level distributed file system), MooserFS (disadvantages: Metadata data loss, virtual machine complete loss)
  • Object storage: Swift, S3

10.2 creating a cinder database

mysql -uroot -pabc-123
---
create database cinder;
grant all privileges on cinder.* to 'cinder'@'localhost' identified by 'cinder';
grant all privileges on cinder.*to 'cinder'@'%' identified by 'cinder';
flush privileges;
---
exit

10.3 register cinder in keystone

10.3.1 keystone creates a cinder user

source /script/admin.sh
openstack user create --domain default --password=cinder cinder
openstack user list

10.3.2 add the cinder user to the admin permission of the test project on Keystone

openstack role add --project test --user cinder admin

10.3.3 create a cinder storage service

openstack service create --name cinderv2 --description "OpenStack Block Storage" volumev2
openstack service create --name cinderv3 --description "OpenStack Block Storage" volumev3
openstack service list

10.3.4 creating API services for cinder

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
openstack endpoint list

10.4 installation of cinder

yum install openstack-cinder -y

10.5 modify the cinder configuration

openstack-config --set  /etc/cinder/cinder.conf DEFAULT my_ip 192.168.204.10
openstack-config --set  /etc/cinder/cinder.conf database connection  mysql+pymysql://cinder:cinder@controller/cinder
openstack-config --set  /etc/cinder/cinder.conf DEFAULT transport_url  rabbit://openstack:openstack@controller
openstack-config --set  /etc/cinder/cinder.conf DEFAULT auth_strategy  keystone 
openstack-config --set  /etc/cinder/cinder.conf keystone_authtoken auth_uri  http://controller:5000
openstack-config --set  /etc/cinder/cinder.conf keystone_authtoken auth_url  http://controller:5000
openstack-config --set  /etc/cinder/cinder.conf keystone_authtoken memcached_servers  controller:11211
openstack-config --set  /etc/cinder/cinder.conf keystone_authtoken auth_type  password
openstack-config --set  /etc/cinder/cinder.conf keystone_authtoken project_domain_name  default 
openstack-config --set  /etc/cinder/cinder.conf keystone_authtoken user_domain_name  default
openstack-config --set  /etc/cinder/cinder.conf keystone_authtoken project_name  test 
openstack-config --set  /etc/cinder/cinder.conf keystone_authtoken username  cinder
openstack-config --set  /etc/cinder/cinder.conf keystone_authtoken password  cinder
openstack-config --set  /etc/cinder/cinder.conf oslo_concurrency lock_path  /var/lib/nova/tmp

10.6 synchronous cinder database

su -s /bin/sh -c "cinder-manage db sync" cinder
mysql -h127.0.0.1 -ucinder -pcinder -e "use cinder;show tables;"

10.7 modify nova configuration file

openstack-config --set  /etc/nova/nova.conf cinder os_region_name  RegionOne

10.8 restart Nova API service

systemctl restart openstack-nova-api.service
systemctl status openstack-nova-api.service

10.9 start and configure self start

systemctl start openstack-cinder-api.service openstack-cinder-scheduler.service
systemctl status openstack-cinder-api.service openstack-cinder-scheduler.service
systemctl enable openstack-cinder-api.service openstack-cinder-scheduler.service

Tags: OpenStack Database MySQL Ceph

Posted on Thu, 28 Nov 2019 10:08:02 -0800 by praveenbabur