zoukankan      html  css  js  c++  java
  • Ceph自动化部署----Ceph-ansible

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

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

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

    操作系统:CentOS-7.6(1810)

    二、使用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 做时间同步

    三、后续更新。。。

  • 相关阅读:
    String,StringBuffer,StringBuilder简单对比
    Java基本数据类型
    EasyMock框架的使用详解
    Python3.6在win7中无法正常运行的问题
    zabbix3.4源码安装步骤
    hadoop_2.6.5集群安装
    Cassandra2.2.10安装过程
    JDK1.8安装
    zookeeper3.4.6安装
    python3.6的安装及cx_oracle安装
  • 原文地址:https://www.cnblogs.com/yanling-coder/p/11454986.html
Copyright © 2011-2022 走看看