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对象存储服务 四

以下操作在控制节点执行controller

##进入/etc/swift目录

cd /etc/swift

##创建基本文件 account

swift-ring-builder account.builder create 10 3 1

##3个节点添加到ring中
swift-ring-builder account.builder add --region 1 --zone 1 --ip 192.168.2.51 --port 6202 --device sdb --weight 100
swift-ring-builder account.builder add --region 1 --zone 1 --ip 192.168.2.51 --port 6202 --device sdc --weight 100
swift-ring-builder account.builder add --region 1 --zone 1 --ip 192.168.2.52 --port 6202 --device sdb --weight 100
swift-ring-builder account.builder add --region 1 --zone 1 --ip 192.168.2.52 --port 6202 --device sdc --weight 100
swift-ring-builder account.builder add --region 1 --zone 1 --ip 192.168.2.53 --port 6202 --device sdb --weight 100
swift-ring-builder account.builder add --region 1 --zone 1 --ip 192.168.2.53 --port 6202 --device sdc --weight 100##验证内容
swift-ring-builder account.builder

##重新平衡

swift-ring-builder account.builder rebalance##创建基本文件 container
swift-ring-builder container.builder create 10 3 1
##3个节点添加到ring中
swift-ring-builder container.builder add --region 1 --zone 1 --ip 192.168.2.51 --port 6202 --device sdb --weight 100
swift-ring-builder container.builder add --region 1 --zone 1 --ip 192.168.2.51 --port 6202 --device sdc --weight 100
swift-ring-builder container.builder add --region 1 --zone 1 --ip 192.168.2.52 --port 6202 --device sdb --weight 100
swift-ring-builder container.builder add --region 1 --zone 1 --ip 192.168.2.52 --port 6202 --device sdc --weight 100
swift-ring-builder container.builder add --region 1 --zone 1 --ip 192.168.2.53 --port 6202 --device sdb --weight 100
swift-ring-builder container.builder add --region 1 --zone 1 --ip 192.168.2.53 --port 6202 --device sdc --weight 100
##验证内容
swift-ring-builder container.builder
##重新平衡
swift-ring-builder container.builder rebalance

##创建基本文件 object
swift-ring-builder object.builder create 10 3 1
##3个节点添加到ring中
swift-ring-builder object.builder add --region 1 --zone 1 --ip 192.168.2.51 --port 6202 --device sdb --weight 100
swift-ring-builder object.builder add --region 1 --zone 1 --ip 192.168.2.51 --port 6202 --device sdc --weight 100
swift-ring-builder object.builder add --region 1 --zone 1 --ip 192.168.2.52 --port 6202 --device sdb --weight 100
swift-ring-builder object.builder add --region 1 --zone 1 --ip 192.168.2.52 --port 6202 --device sdc --weight 100
swift-ring-builder object.builder add --region 1 --zone 1 --ip 192.168.2.53 --port 6202 --device sdb --weight 100
swift-ring-builder object.builder add --region 1 --zone 1 --ip 192.168.2.53 --port 6202 --device sdc --weight 100
##验证内容
swift-ring-builder object.builder##重新平衡
swift-ring-builder object.builder rebalance
##将 .gz文件发送到3个节点中
scp *.gz compute:/etc/swift/
scp *.gz cinder:/etc/swift/
scp *.gz swift:/etc/swift/
##获取配置文件,配置文件/etc/swift/swift.conf 
curl -o /etc/swift/swift.conf   https://git.openstack.org/cgit/openstack/swift/plain/etc/swift.conf-sample?h=stable/rocky
[swift-hash]
...
swift_hash_path_suffix = HASH_PATH_SUFFIX
swift_hash_path_prefix = HASH_PATH_PREFIX
[storage-policy:0]
...
name = Policy-0
default = yes

##将文件发送到其他3节点
scp swift.conf compute:/etc/swift/
scp swift.conf cinder:/etc/swift/
scp swift.conf swift:/etc/swift/
##在所有节点上执行权限操作
chown -R root:swift /etc/swift
##在控制节点执行启动服务命令
systemctl enable openstack-swift-proxy.service memcached.service
systemctl start openstack-swift-proxy.service memcached.service
##在存储节点执行启动服务命令
systemctl enable openstack-swift-account.service openstack-swift-account-auditor.service   openstack-swift-account-reaper.service openstack-swift-account-replicator.service
systemctl start openstack-swift-account.service openstack-swift-account-auditor.service   openstack-swift-account-reaper.service openstack-swift-account-replicator.service

systemctl enable openstack-swift-container.service   openstack-swift-container-auditor.service openstack-swift-container-replicator.service   openstack-swift-container-updater.service
systemctl start openstack-swift-container.service   openstack-swift-container-auditor.service openstack-swift-container-replicator.service   openstack-swift-container-updater.service
systemctl enable openstack-swift-object.service openstack-swift-object-auditor.service   openstack-swift-object-replicator.service openstack-swift-object-updater.service
systemctl start openstack-swift-object.service openstack-swift-object-auditor.service   openstack-swift-object-replicator.service openstack-swift-object-updater.service


原文地址:https://www.cnblogs.com/yypr/p/9882817.html

时间: 2024-10-20 18:14:01

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

Openstack O版 配置swift对象存储服务

环境如下图所示:IP:192.168.0.111 controllerIP:192.168.0.112 computeIP:192.168.0.113 object1IP:192.168.0.117 object2IP:192.168.0.118 cinder1.在控制节点上安装 swift服务[[email protected]er ~]# source admin-openrc创建swift用户[[email protected] ~]# openstack user create --do

openstack I版的搭建二

[[email protected] ~]# cd /usr/local/src/ [[email protected] src]# cd keystone-2014.1 [[email protected] keystone-2014.1]# python setup.py install [[email protected] keystone-2014.1]# cd etc/ [[email protected] etc]# ll 总用量 72 -rw-rw-r-- 1 1004 1004

openstack I版的搭建六--

[[email protected] init.d]# chkconfig openstack-neutron-linuxbridge-agent on [[email protected] init.d]# chkconfig openstack-nova-compute on [[email protected] ~]# nova host-list +---------------------------+-------------+----------+ | host_name    

openstack I版的搭建四--

[[email protected]]# cd /usr/local/src/neutron-2014.1 [[email protected] neutron-2014.1]# python setup.py install [[email protected] etc]# pwd /usr/local/src/neutron-2014.1/etc [[email protected] etc]# mkdir /etc/neutron [[email protected] etc]# mkdi

openstack I版的搭建三--Nova

安装Nova [[email protected] src]# cd ~ [[email protected] ~]# cd /usr/local/src/nova-2014.1 [[email protected] nova-2014.1]# python setup.py install [[email protected] nova]# pwd /usr/local/src/nova-2014.1/etc/nova [ro[email protected] nova]# ll 总用量 48

openstack I版的搭建五--

登陆 用户demo登陆 如果你在启动某个服务的时候,没启动起来,没日子 那么我们就手动启动一下. [[email protected] ~]# neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini 这样的

openstack安装(liberty)--安装对象存储服务(swift)

九.安装对象存储服务(swift),不使用控制節點數據庫服務,而於各存儲節點使用分布式SQLite數據庫. 9.1对象存储服务包括的组件 Proxy servers (swift-proxy-server)代理服務,接收API或HTTP請求,執行上傳文件.修改源數據.WEB瀏覽時列表文件和創建容器等操作.通常使用CACHE技術(memcache)提高性能 Account servers (swift-account-server)賬戶服務,管理對象存儲中的賬戶定義. Container serv

openstack R版 搭建过程遇到的种种问题

一.创建虚拟机失败 vm上运行virt-install 创建kvm类型的主机,centos的版本建议不要超过7.2,本人用的7.7版本,不能创建kvm类型的虚拟机,只能创建qemu类型的虚拟机.把宿主机版本降到7.2后,恢复正常. 二.Nova控制节点安装报错 采用centos7.2,yum安装报错,需要在手动添加一个QEMU-EV.repo文件 [[email protected] yum.repos.d]# cat 1.repo [openstack] name=openstack base

openstack I版的搭建一十--基于glusterfs的云硬盘

计算节点和控制节点上都安装一下 cd /etc/yum.repos.d/ wget http://download.gluster.org/pub/gluster/glusterfs/3.4/3.4.3/CentOS/glusterfs-epel.repo yum install glusterfs-server 验证一下两个节点是否安装成功 [[email protected] ~]# glusterfs -V glusterfs 3.4.5 built on Jul 24 2014 19:1