viva
  • 主页
  • 开发
    • IDE环境
      • Vim
      • VSCode
        • code-server
        • theia
    • Golang手册
    • Ansible
    • SaltStack
      • salt-api
    • Python
      • Q&A
      • Hello,world!
      • 类型
        • 数字
        • 字符串
        • 列表
        • 元组
        • 集合
        • 字典
      • 语法
        • 流程控制
        • 循环
      • 工具
        • pip
        • pyenv
        • selenium
      • 示例
    • Shell
    • Vue
      • ant-design
      • vue-material
    • Java
  • 随笔
    • WSL2
    • Git
    • Markdown
      • mermaid
    • Linux
      • 时钟同步
      • 账号
      • 文件
      • SSH
      • systemd
      • TLS加密
        • Openssl
      • 存储
        • rsync
        • NFS
      • 路由
      • 日志采集
        • Journalctl
        • Fluentd
          • 根据字段匹配对日志进行结构化
        • Logstash
    • 虚拟化
      • Hyper-V
      • PXE
    • 命令行工具
      • zsh
    • Nexus3
    • 堡垒机
      • JumpServer
    • 测试工具
      • ioping
      • apache bench
      • dd
      • postman
    • 开源项目管理
      • Github
    • 软件包管理
    • 网络镜像源
    • 网关
      • Nginx
  • 存储
    • Ceph
      • 安装
      • 故障处理
    • Etcd
    • Mysql
  • 网络
    • Overlay网络
    • IPVS
    • 网络工具
      • tshark
      • tcpdump
    • 防火墙
      • nftables
      • firewalld
      • iptables
    • 域名解析
      • dig
      • nslookup
      • dnsmasq
    • 代理
      • Clash
      • Redsocks
      • Redsocks2
      • COW
      • Proxfier
  • 云原生
    • 容器
      • Docker
        • Dockerfile
        • docker-compose
      • Podman
      • 原理
        • Chroot
        • Namespace
        • Cgroup
    • 镜像仓库
      • Harbor
    • Kubernetes
      • 部署
        • Kind
        • Minikube
        • kubespray
      • CNI
        • Flannel
        • OVS
        • Calico
      • Operator
        • OperatorSDK
      • StorageClass
      • Q&A
    • Openshift
      • 集群部署
      • 快速使用
    • Prometheus
      • prometheus-operator
      • kube-prometheus
      • Thanos
        • 组件
          • Bucket
          • Check
          • Compact
          • Querier
          • Receiver
          • Ruler
          • Sidecar
          • Store
        • 参考资料
      • Cortex
        • 组件
          • Alertmanager
          • Config
          • Distributor
          • Ingester
          • Querier
          • Query Frontend
          • Ruler
        • 参考资料
      • Thanos与Cortex方案对比
      • 参考资料
      • Q&A
    • Skywalking
    • Rook
    • Helm
    • Istio
    • 应用部署
      • Nexus
      • RabbitMQ
    • 参考资料
  • DevOps
    • 开源DevOps平台
    • CICD
      • Jenkins
    • 参考资料
  • 机器学习
    • Kubeflow
      • 示例
由 GitBook 提供支持
在本页
  • ceph-ansible
  • 项目地址
  • 安装文档
  • 快速安装
  1. 存储
  2. Ceph

安装

上一页Ceph下一页故障处理

最后更新于5年前

ceph-ansible

项目地址

安装文档

快速安装

安装python-pip

yum install python-pip

下载脚本,以4.0版本为例(分支前缀stable)

git clone https://github.com/ceph/ceph-ansible.git
cd ceph-ansible
git checkout stable-4.0

安装python依赖包

pip install -r requirements.txt

配置inventory

/etc/ansible/hosts-ceph-nautilus
[mons]
centos7-dev

[osds]
centos7-dev

配置group_vars

---
ceph_release_num:
  nautilus: 14
fetch_directory: fetch/
cluster: ceph
mon_group_name: mons
osd_group_name: osds
configure_firewall: False
ceph_conf_local: true
centos_package_dependencies:
  - epel-release
  - libselinux-python
ntp_service_enabled: true
ntp_daemon_type: chronyd
bootstrap_dirs_owner: "64045"
bootstrap_dirs_group: "64045"
upgrade_ceph_packages: False
ceph_origin: repository
valid_ceph_origins:
  - repository
ceph_repository: community
valid_ceph_repository:
  - community
ceph_mirror: http://download.ceph.com
ceph_stable_key: https://download.ceph.com/keys/release.asc
ceph_stable_release: nautilus
ceph_stable_repo: "{{ ceph_mirror }}/debian-{{ ceph_stable_release }}"
ceph_stable_redhat_distro: el7
generate_fsid: true
ceph_conf_key_directory: /etc/ceph
ceph_keyring_permissions: '0600'
cephx: true
monitor_interface: eth0
ip_version: ipv4
public_network: 172.17.209.112/28
cluster_network: "{{ public_network | regex_replace(' ', '') }}"
osd_mkfs_type: xfs
osd_mkfs_options_xfs: -f -i size=2048
osd_mount_options_xfs: noatime,largeio,inode64,swalloc
osd_objectstore: bluestore
dashboard_enabled: False-
---
devices:
  - /dev/sdb
  - /dev/sdc
  - /dev/sdd

执行部署

cp site.yml.sample site.yml
ansible-playbook -i /etc/ansible/hosts-ceph-nautilus site.yml

检查集群状态ceph -s

GitHub - ceph/ceph-ansible: Ansible playbooks to deploy Ceph, the distributed filesystem.GitHub
ceph-ansible — ceph-ansible documentation
Logo
Logo