Installation Configuration Cinder Service
Controller node
First, create a database
[Email protected] ~]# mysql-u root-p>>create DATABASE cinder;>>grant all privileges on cinder.* to ' cinder ' @ ' localhost ' identified by ' Cinder_dbpass ', >>grant all privileges on cinder.* to ' CINDER ' @ '% ' identified by ' CI Nder_dbpass ';
Cinder_dbpass Replace the password you want to set
Ii. Creating service entities and API interfaces
[[email protected] ~]# source /root/admin-openrc.sh[[email protected] ~]# openstack user create --domain default --password-prompt cinder[[email protected] ~]# openstack role add --project service --user cinder admin[[email protected] ~]# openstack service create -- name cinder --description "Openstack block storage" volume[[email protected] ~]# openstack service create --name cinderv2 --description "Openstack block storage" volumev2[[email protected] ~]# openstack endpoint create --region RegionOne volume Public http://controller:8776/v1/%\ (tenant_id\) s[[email protected] ~]# openstack endpoint create --region regionone volume internal [[email protected] ~]# openstack endpoint create --region regionone \ volume admin http://controller:8776/v1/%\ (tenant_id\) s[[email protected] ~]# openstack endpoint create --region regionone \ volumev2 public http:// Controller:8776/v2/%\ (tenant_id\) s[[email protected] ~]# openstack endpoint create --region regionone \ volumev2 internal http://controller:8776/v2/%\ (tenant_id\) s[[email protected] ~]# openstack endpoint create --region regionone \ volumev2 admin http://controller:8776/v2/%\ (tenant_id\) s
Third, the installation of cinder services
[email protected] ~]# Yum install Openstack-cinder
Configuring the Cinder Service
[[email protected] ~]# mv /etc/cinder/cinder.conf /etc/cinder/cinder.conf_bak[[ Email protected] ~]# vim /etc/cinder/cinder.conf[default]rpc_backend = rabbitmy_ ip = 10.0.0.11auth_strategy = keystone[database]connection = mysql+pymysql:// cinder:[email protected]/cinder #改为自己的数据库密码 [oslo_messaging_rabbit]rabbit_host = controllerrabbit_userid = openstackrabbit_password = rabbit_pass #改为rabbimq的密码 [ Keystone_authtoken]auth_uri = http://controller:5000auth_url = http://controller : 35357memcached_servers = controller:11211auth_type = passwordproject_domain_name = defaultuser_domain_name = defaultproject_name = serviceusername = cinderpassword = cinder_pass #改为cinder服务的密码 [oslo_concurrency]lock_path = /var/lib/cinder/tmp
Configure Nova to use Cinder
[Email protected] ~]# vim/etc/nova/nova.conf #增加以下内容 [cinder]os_region_name = Regionone
Restart NOVA-API Service
[Email protected] ~]# systemctl restart Openstack-nova-api.service
Start the cinder service and set the boot up
[Email protected] ~]# Systemctl enable Openstack-cinder-api.service Openstack-cinder-scheduler.service[[email Protected] ~]# systemctl start Openstack-cinder-api.service openstack-cinder-scheduler.service
Storage node
To change the node test, I have two disks here, with a second piece of testing
First, installation configuration lvm2
[[email protected] ~]# yum install lvm2[[email protected] ~]# Systemctl enable Lvm2-lvmetad.service[[email protected] ~]# Systemctl Start Lvm2-lvmetad.service
Use the second disk/dev/sdb to wear a PV
[Email protected] ~]# pvcreate/dev/sdbphysical Volume "/dev/sdb" successfully created
Create a VG on the PV above
[Email protected] ~]# vgcreate cinder-volumes/dev/sdbvolume Group "Cinder-volumes" successfully created
Editing an LVM configuration file
[[Email protected] ~] #vim/etc/lvm/lvm.confdevices {filter = ["a/sdb/", "r/.*/"] #lvm可以扫描发现sdb, other partitions reject
Second, installation configuration cinder volume
[email protected] ~]# Yum install Openstack-cinder targetcli
Edit Cinder configuration file
[[email protected] ~] #mv /etc/cinder/cinder.conf /etc/cinder/cinder.conf_bak[[email Protected] ~] #vim /etc/cinder/cinder.conf[default]rpc_backend = rabbitauth_strategy = keystonemy_ip = MANAGEMENT_INTERFACE_IP_ADDRESS #改成管理网的ip here 10.0.0.41enabled_backends = lvmglance_api_servers = http://controller:9292[database] connection = mysql+pymysql://cinder:[email protected]/cinder #改成自己数据库密码 [Oslo_ messaging_rabbit]rabbit_host = controllerrabbit_userid = openstackrabbit_password = RABBIT_PASS #改成自己rabbit密码 [Keystone_authtoken]auth_uri = http://controller:5000auth_ url = http://controller:35357memcached_servers = controller:11211auth_type = passwordproject_domain_name = defaultuser_domain_name = defaultproject_name = Serviceusername = cinderpassword = cinder_pass #改成自己cinder服务密码 [lvm]volume_driver = cinder.volume.drivers.lvm.lvmvolumedrivervolume_group = cinder-volumesiscsi_protocol = Iscsiiscsi_helper = lioadm[oslo_concurrency]lock_path = /var/lib/cinder/tmp
Start cinder related services and add boot start
[[email protected] ~]# systemctl enable Openstack-cinder-volume.service Target.service[[email protected] ~]# Systemctl Start Openstack-cinder-volume.service Target.service
Third, verification
Executing on the Controller node
[[email protected] ~] #source /root/admin-openrc.sh[[email protected] ~]# cinder service-list+------------------+--------------+------+---------+-------+----------------------------+--- --------------+| binary | host | zone | status | state | Updated_at | disabled reason |+------------------+--------------+------+---------+------ -+----------------------------+-----------------+| cinder-scheduler | controller | nova | enabled | up | 2016-06-16t14:17:46.000000 | - | | cinder-volume | [email protected] | nova | enabled | up | 2016-06-16T14:17:00.000000 | - | | cinder-volume | [email protected] | nova | enabled | down | 2016-06-16T08:41:19.000000 | - |+------------------+--------------+------+------ ---+-------+----------------------------+-----------------+
I am here on the compute2 to do the test installed cinder service, because Compute2 did not start, so is the Down,cinder on time synchronization has requirements, time is not synchronized here to show down.
If the above information appears, it indicates success.
For creating networks, creating instances, creating volumes, mounting volumes, hot migrations, and to be continued .....
This article is from the "Venuxs" blog, make sure to keep this source http://venuxs.blog.51cto.com/11763538/1796039
OpenStack m Installation Storage (Cinder) service Chapter