##7.cinder块存储服务
Posted yypr
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了##7.cinder块存储服务相关的知识,希望对你有一定的参考价值。
###openstack-ocata 单节点安装 部署 目录汇总
一. 安装cinder数据库,api端点等
mysql -u root -p111111
CREATE DATABASE cinder;
GRANT ALL PRIVILEGES ON cinder.* TO ‘cinder‘@‘localhost‘ IDENTIFIED BY ‘CINDER_DBPASS‘;
GRANT ALL PRIVILEGES ON cinder.* TO ‘cinder‘@‘%‘ IDENTIFIED BY ‘CINDER_DBPASS‘;
openstack user create --domain default --password-prompt cinder
openstack role add --project service --user cinder admin
openstack service create --name cinderv2 --description "OpenStack Block Storage" volumev2
openstack service create --name cinderv3 --description "OpenStack Block Storage" volumev3
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
--------------------------------------------------------------------------------
二.安装cinder服务
yum install openstack-cinder -y
--------------------------------------------------------------------------------
三.配置cinder文件
cp /etc/cinder/cinder.conf /etc/cinder/cinder.conf.bak
> /etc/cinder/cinder.conf
##注意修改my_ip
echo ‘
[database]
# ...
connection = mysql+pymysql://cinder:[email protected]/cinder
[DEFAULT]
# ...
transport_url = rabbit://openstack:[email protected]
auth_strategy = keystone
my_ip = 10.0.0.11
[keystone_authtoken]
# ...
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = cinder
password = cinder
[oslo_concurrency]
# ...
lock_path = /var/lib/cinder/tmp
‘>>/etc/cinder/cinder.conf
vim /etc/nova/nova.conf
[cinder]
os_region_name = RegionOne
--------------------------------------------------------------------------------
四.初始化数据库,配置nova文件,重启nova-api,启动cinder服务
su -s /bin/sh -c "cinder-manage db sync" cinder
--------------------------------------------------------------------------------
五. 重启服务
systemctl restart openstack-nova-api.service
systemctl enable openstack-cinder-api.service openstack-cinder-scheduler.service
systemctl start openstack-cinder-api.service openstack-cinder-scheduler.service
systemctl status openstack-cinder-api.service openstack-cinder-scheduler.service
以上是关于##7.cinder块存储服务的主要内容,如果未能解决你的问题,请参考以下文章