您好,登錄后才能下訂單哦!
整個OpenStack是由控制節點,計算節點,網絡節點,存儲節點四大部分組成。上篇博文詳細講述了控制節點服務controller中的horizon組件,本篇博文將詳解存儲節點cinder的部署。分為兩部分:控制節點和存儲節點
存儲節點包含Cinder,Swift等服務
主 機 | 系 統 | IP地址 | 角 色 |
---|---|---|---|
controller | CentOS7 | 192.168.37.128 | keystone、nova、glance、neutron、horizon、cinder、ntp、mariadb、rabbitmq、memcached、etcd、apache |
compute | CentOS7 | 192.168.37.130 | nova、neutron、ntp |
cinder | CentOS7 | 192.168.37.131 | cinder、ntp |
++安裝和配置Cinder節點++
1、添加、新建一塊磁盤sdb
fdisk /dev/sdb
2、創建LVM物理邏輯卷/dev/sdb1
pvcreate /dev/sdb1
3、創建cinder-volumes邏輯卷組
vgcreate cinder-volumes /dev/sdb1
4、yum安裝cinder軟件包
yum install openstack-cinder targetcli python-keystone -y
5、編輯配置文件
vim /etc/cinder/cinder.conf
[DEFAULT]
#1302
transport_url = rabbit://openstack:123456@controller
#399
auth_strategy = keystone
#291
my_ip = 192.168.175.155
#403
enabled_backends = lvm #支持格式
#296
glance_api_servers = http://controller:9292
[database]
#3586
connection = mysql+pymysql://cinder:123456@controller/cinder
[keystone_authtoken]
#3850
auth_uri = http://controller:5000
auth_url = http://controller:35357
#3901
memcached_servers = controller:11211
#4008
auth_type = password
project_domain_id = default
user_domain_id = default
project_name = service
username = cinder
password = 123456
[oslo_concurrency]
#4125
lock_path = /var/lib/cinder/tmp
#末尾添加[lvm] 模塊,使用LVM驅動程序,cinder-volumes卷組,iSCSI協議和相應的iSCSI服務配置LVM后端。
[lvm]
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_group = cinder-volumes
iscsi_protocol = iscsi
iscsi_helper = lioadm
6、開啟cinder服務,設置開機自啟動
systemctl enable openstack-cinder-volume.service target.service
systemctl start openstack-cinder-volume.service target.service
++安裝和配置controller節點++
1、配置數據庫
mysql -u root -p
create database cinder;
grant all privileges on cinder. to 'cinder'@'localhost' identified by '123456';
grant all privileges on cinder. to 'cinder'@'%' identified by '123456';
2、創建用戶cinder
source ~/admin-openrc
openstack user create --domain default --password-prompt cinder
密碼:123456
3、添加角色
openstack role add --project service --user cinder admin
4、創建cinderv2和cinderv3服務實體
openstack service create --name cinderv2 --description "OpenStack Block Storage" volumev2
openstack service create --name cinderv3 --description "OpenStack Block Storage" volumev3
5、創建塊存儲服務API
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
6、安裝cinder軟件包
yum install openstack-cinder -y
7、編輯配置文件
vim /etc/cinder/cinder.conf
[database]
#3586
connection = mysql+pymysql://cinder:123456@controller/cinder
[DEFAULT]
#1302
transport_url = rabbit://openstack:123456@controller
#399
auth_strategy = keystone
#291
my_ip = 192.168.175.145
[keystone_authtoken]
#3850
auth_uri = http://controller:5000
auth_url = http://controller:35357
#3901
memcached_servers = controller:11211
#4008
auth_type = password
project_domain_id = default
user_domain_id = default
project_name = service
username = cinder
password = 123456
[oslo_concurrency]
#4126
lock_path = /var/lib/cinder/tmp
8、同步數據庫
su -s /bin/sh -c "cinder-manage db sync" cinder
9、編輯nova配置文件
vim /etc/nova/nova.conf
[cinder]
#4237
os_region_name = RegionOne
10、重啟openstack-nova-api服務,開啟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
11、查看用戶cinder
12、查看服務實體
到此為止,cinder組件部分已部署完整,謝謝閱讀!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。