Block1节点安装及配置
2018-03-29 本文已影响0人
sapbcs
一、前期准备
1. 软件包准备
- 安装OpenStack Pike Repository
~]# yum install centos-release-openstack-pike -y
- 升级软件包
~]# yum upgrade
- 安装openstack客户端软件包
~]# yum install python-openstackclient -y
- 安装openstack-selinux软件包
~]# yum install openstack-selinux -y
2. 安装LVM软件包
~]# yum install lvm2 device-mapper-persistent-data -y
启动服务,并配置其开机自动启动
~]# systemctl enable lvm2-lvmetad.service
~]# systemctl start lvm2-lvmetad.service
3. 创建LVM物理卷
~]# pvcreate /dev/sdb
4. 创建LVM的VG卷组cinder-volumes
~]# vgcreate cinder-volumes /dev/sdb
5. 编辑/etc/lvm/lvm.conf配置文件,确保只允许LVM扫描cinder-volumes
~]# cp /etc/lvm/lvm.conf{,.bak}
~]# vim /etc/lvm/lvm.conf
devices {
...
filter = [ "a/sdb/", "r/.*/"]
二. 安装和配置组件
1. 安装软件包
~]# yum install openstack-cinder targetcli python-keystone -y
2. 编辑配置文件
~]# cp /etc/cinder/cinder.conf{,.bak}
~]# vim /etc/cinder/cinder.conf
[database]
# ...
connection = mysql+pymysql://cinder:pike@controller/cinder
[DEFAULT]
# ...
transport_url = rabbit://openstack:pike@controller
auth_strategy = keystone
my_ip = 10.6.10.3
enabled_backends = lvm
glance_api_servers = http://controller:9292
[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 = pike
[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
三、结束安装
启动openstack-cinder-volume.service和target.service服务,并配置其开机自动启动
~]# systemctl enable openstack-cinder-volume.service target.service
~]# systemctl start openstack-cinder-volume.service target.service
四、验证操作
警告:此步骤在controller节点操作!!
1. 读取admin-openrc环境变量脚本文件
~]# . admin-openrc
2. 列出volume相关服务组件,以验证各个进程的成功加载
~]# openstack volume service list
+------------------+------------+------+---------+-------+----------------------------+
| Binary | Host | Zone | Status | State | Updated At |
+------------------+------------+------+---------+-------+----------------------------+
| cinder-scheduler | controller | nova | enabled | up | 2018-02-13T06:24:03.000000 |
| cinder-volume | block1@lvm | nova | enabled | up | 2018-02-13T06:24:12.000000 |
+------------------+------------+------+---------+-------+----------------------------+