360SDN.COM

openstack-12:安装cinder存储服务

来源:  2019-04-18 18:21:10    评论:0点击:

安装cinder硬盘服务

. admin-openrc
openstack user create --domain default --password-prompt cinder
openstack role add --project service --user cinder admin

openstack service create --name cinder \
--description "OpenStack Block Storage" volume

openstack service create --name cinderv2 \
--description "OpenStack Block Storage" volumev2

openstack endpoint create --region RegionOne \
volume public http://192.168.56.11:8776/v1/%\(tenant_id\)s

openstack endpoint create --region RegionOne \
volume internal http://192.168.56.11:8776/v1/%\(tenant_id\)s

openstack endpoint create --region RegionOne \
volume admin http://192.168.56.11:8776/v1/%\(tenant_id\)s

openstack endpoint create --region RegionOne \
volumev2 public http://192.168.56.11:8776/v2/%\(tenant_id\)s

openstack endpoint create --region RegionOne \
volumev2 internal http://192.168.56.11:8776/v2/%\(tenant_id\)s

openstack endpoint create --region RegionOne \
volumev2 admin http://192.168.56.11:8776/v2/%\(tenant_id\)s

yum install openstack-cinder
vim /etc/cinder/cinder.conf

[database]
connection = mysql+pymysql://cinder:cinder@192.168.56.11/cinder

[DEFAULT]
transport_url = rabbit://openstack:openstack@192.168.56.11
auth_strategy = keystone
my_ip = 192.168.56.11

[keystone_authtoken]
auth_uri = http://192.168.56.11:5000
auth_url = http://192.168.56.11:35357
memcached_servers = 192.168.56.11: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

同步
su -s /bin/sh -c "cinder-manage db sync" cinder
vim /etc/nova/nova.conf 
[cinder]
os_region_name = RegionOne

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

===============================================================================
cinder计算节点
yum install lvm2
systemctl enable lvm2-lvmetad.service
systemctl start lvm2-lvmetad.service

虚拟机添加一块硬盘sdb
fdisk /dev/sdb
n新建分区
p主分区
1分区数
默认开始
默认结束
t修改分区类型
8e
w

分区后是sdb1
pvcreate /dev/sdb1
vgcreate cinder-volumes /dev/sdb1

vim /etc/lvm/lvm.conf
devices {
filter = [ "a/sdb/", "r/.*/"]
yum install openstack-cinder targetcli python-keystone

vim /etc/cinder/cinder.conf

[database]
connection = mysql+pymysql://cinder:cinder@192.168.56.11/cinder

[DEFAULT]
my_ip = 192.168.56.12
enabled_backends = lvm
auth_strategy = keystone
transport_url = rabbit://openstack:openstack@192.168.56.11
glance_api_servers = http://192.168.56.11:9292

[keystone_authtoken]
auth_uri = http://192.168.56.11:5000
auth_url = http://192.168.56.11:35357
memcached_servers = 192.168.56.11:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = cinder
password = cinder

[lvm]
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_group = cinder-volumes
iscsi_protocol = iscsi
iscsi_helper = lioadm

[oslo_concurrency]
lock_path = /var/lib/cinder/tmp

systemctl enable openstack-cinder-volume.service target.service
systemctl start openstack-cinder-volume.service target.service

为您推荐

友情链接 |九搜汽车网 |手机ok生活信息网|ok生活信息网|ok微生活
 Powered by www.360SDN.COM   京ICP备11022651号-4 © 2012-2016 版权