首页 > 其他 > 详细

Ceph自动化部署----Ceph-ansible

时间:2019-09-03 21:00:54      阅读:256      评论:0      收藏:0      [点我收藏+]

Ceph自动化部署----Ceph-ansible

操作系统:rhel-7.5

一、前言——Ceph的几种不同的部署方式

  • 手动部署
  • Helm+kubernetes部署
  • Ceph-deploy部署
  • Ceph-ansible部署

二、使用Ceph-ansible部署Ceph

  1. 从GIT上面拷贝源代码到本地

    # git clone https://github.com/ceph/ceph-ansible.git 
  2. 切换到stable-3.1版本(git的相关使用方式,详情请自行查询)

    # cd  ceph-ansible     //进入到ceph-ansible目录下
    # git branch -r   //查看系统分支
    # git fetch origin stable-3.1  //将远端得3.1拉到本地
    # git chechout  stable-3.1  //切换到3.1分支
  3. 安装ansible,使用pip去安装ansible。

    # pip install -r requirements.txt
  4. 创建Inventory列表

    只 创建如下角色,我们只部署Ceph得基本功能

    [mons]
    node1
    node2
    node3
    
    [osds]
    node1
    node2
    node3
    
    [rgws]
    node1
    node2
    node3
    
    [clients]
    node1
    node2
    node3
    
    [mgrs]
    node1
    node2
    node3
  5. 拷贝group_vars/all.yml.sample 到group_vars/all.yml,并修改all.yml 文件,添加如下参数:

    ceph_origin: repository
    ceph_repository: community
    ceph_mirror: https://mirrors.163.com/ceph/
    ceph_stable_release: luminous
    ceph_stable_repo: "{{ ceph_mirror }}/rpm-{{ ceph_stable_release }}"
    ceph_stable_redhat_distro: el7
    monitor_interface: eth1
    journal_size: 1024
    public_network: 192.168.9.0/24
    cluster_network: 192.168.10.0/24
    osd_objectstore: filestore
    radosgw_interface: "{{ monitor_interface }}"
    osd_auto_discovery: true
  6. 拷贝site.yml.sample 到site.yml(注释掉一些host,效果如下:)

    - hosts:
      - mons
      - agents
      - osds
     # - mdss
      - rgws
     # - nfss
     # - restapis
     # - rbdmirrors
      - clients
      - mgrs
     # - iscsigws
     # - iscsi-gws # for backward compatibility only!
    
  7. 执行部署操作

    ansible-playbook  -i hosts  site.yml

注意事项:

部署集群之前,还要做一些操作:

1、每台服务器上做地址解析

2、服务器之间做互信(可以免密登录)

3、使用chrony 做时间同步

三、后续更新。。。

Ceph自动化部署----Ceph-ansible

原文:https://www.cnblogs.com/yanling-coder/p/11454986.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!