openstack-r版(rocky)搭建基于centos7.4 的openstack swift对象存储服务 二

openstack-r版(rocky)搭建基于centos7.4 的openstack swift对象存储服务 一

openstack-r版(rocky)搭建基于centos7.4 的openstack swift对象存储服务 二

openstack-r版(rocky)搭建基于centos7.4 的openstack swift对象存储服务 三

openstack-r版(rocky)搭建基于centos7.4 的openstack swift对象存储服务 四

 

compute,cinder,swift节点执行操作

   ##安装软件依赖包

yum install xfsprogs rsync openstack-swift-account openstack-swift-container openstack-swift-object -y
##3个节点个添加2块硬盘,进行格式化操作。添加完成后可以使用lsblk命令查看

mkfs.xfs /dev/sdb
mkfs.xfs /dev/sdc
## 创建挂载目录
mkdir -p /srv/node/sdb
mkdir -p /srv/node/sdc
##编辑文件 /etc/fstab 添加如下两行
/dev/sdb /srv/node/sdb xfs noatime,nodiratime,nobarrier,logbufs=8 0 2
/dev/sdc /srv/node/sdc xfs noatime,nodiratime,nobarrier,logbufs=8 0 2

##安装设备
mount /srv/node/sdb
mount /srv/node/sdc

##编辑配置文件/etc/rsyncd.conf 注意标红位置为各个节点ip。
uid = swift
gid = swift
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
address = MANAGEMENT_INTERFACE_IP_ADDRESS

[account]
max connections = 2
path = /srv/node/
read only = False
lock file = /var/lock/account.lock

[container]
max connections = 2
path = /srv/node/
read only = False
lock file = /var/lock/container.lock

[object]
max connections = 2
path = /srv/node/
read only = False
lock file = /var/lock/object.lock
## 启动服务
systemctl enable rsyncd.service
systemctl start rsyncd.service
## 获取配置文件
curl -o /etc/swift/account-server.conf https://git.openstack.org/cgit/openstack/swift/plain/etc/account-server.conf-sample?h=stable/rocky
curl -o /etc/swift/container-server.conf https://git.openstack.org/cgit/openstack/swift/plain/etc/container-server.conf-sample?h=stable/rocky
curl -o /etc/swift/object-server.conf https://git.openstack.org/cgit/openstack/swift/plain/etc/object-server.conf-sample?h=stable/rocky
## 编辑配置文件/etc/swift/account-server.conf 注意,标红位置为各个节点ip

[DEFAULT]
...
bind_ip = MANAGEMENT_INTERFACE_IP_ADDRESS
bind_port = 6202
user = swift
swift_dir = /etc/swift
devices = /srv/node
mount_check = True
[pipeline:main]
pipeline = healthcheck recon account-server
[filter:recon]
use = egg:swift#recon
...
recon_cache_path = /var/cache/swift

## 编辑配置文件/etc/swift/container-server.conf 注意,标红位置为各个节点ip
[DEFAULT]
...
bind_ip = MANAGEMENT_INTERFACE_IP_ADDRESS
bind_port = 6201
user = swift
swift_dir = /etc/swift
devices = /srv/node
mount_check = True
[pipeline:main]
pipeline = healthcheck recon container-server
[filter:recon]
use = egg:swift#recon
...
recon_cache_path = /var/cache/swift
## 编辑配置文件 /etc/swift/object-server.conf 注意,标红位置为各个节点ip
[DEFAULT]
...
bind_ip = MANAGEMENT_INTERFACE_IP_ADDRESS
bind_port = 6200
user = swift
swift_dir = /etc/swift
devices = /srv/node
mount_check = True
[pipeline:main]
pipeline = healthcheck recon object-server
[filter:recon]
use = egg:swift#recon
...
recon_cache_path = /var/cache/swift
recon_lock_path = /var/lock
## 3个节点执行更改权限
chown -R swift:swift /srv/node
mkdir -p /var/cache/swift
chown -R root:swift /var/cache/swift
chmod -R 775 /var/cache/swift



posted @ 2018-10-31 14:01  ypr-  阅读(1165)  评论(0编辑  收藏  举报