zoukankan      html  css  js  c++  java
  • 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


    
    
  • 相关阅读:
    观察者模式-Observer
    @Resource、@Autowired、@Qualifier的注解注入及区别
    Java垃圾回收(GC)机制详解
    java什么时候进行垃圾回收,垃圾回收的执行流程
    Log4J.xml配置详解
    springMVC配置拦截器、过滤器、前端控制器时遇到的问题总结
    基于zookeeper实现分布式锁
    数据库索引原理及优化
    数据分析——CentOS7配置时间和ntp
    solr——zookeeper部署
  • 原文地址:https://www.cnblogs.com/yypr/p/9882652.html
Copyright © 2011-2022 走看看