cephadm-ansible 项目教程

cephadm-ansible 项目教程

cephadm-ansibleansible playbooks to be used with cephadm项目地址:https://gitcode.com/gh_mirrors/ce/cephadm-ansible

目录结构及介绍

cephadm-ansible 是一个用于简化 Ceph 集群管理流程的 Ansible 集合。以下是项目的目录结构及其介绍:

cephadm-ansible/
├── README.md
├── cephadm-ansible.yml
├── cephadm-preflight.yml
├── cephadm-clients.yml
├── cephadm-purge-cluster.yml
├── cephadm-distribute-ssh-key.yml
├── cephadm-set-container-insecure-registries.yml
├── roles/
│   ├── cephadm-preflight/
│   ├── cephadm-clients/
│   ├── cephadm-purge/
│   ├── cephadm-distribute-ssh-key/
│   ├── cephadm-set-container-insecure-registries/
│   └── ...
├── inventory/
│   └── sample
├── group_vars/
│   └── all.yml
└── ...
  • README.md: 项目介绍和使用说明。
  • cephadm-ansible.yml: 主启动文件。
  • cephadm-preflight.yml: 集群启动前的初始设置。
  • cephadm-clients.yml: 客户端主机设置。
  • cephadm-purge-cluster.yml: 移除 Ceph 集群。
  • cephadm-distribute-ssh-key.yml: 分发 SSH 公钥到所有主机。
  • cephadm-set-container-insecure-registries.yml: 添加不安全的容器注册表。
  • roles/: 包含各个角色的详细任务和配置。
  • inventory/: 示例库存文件。
  • group_vars/: 组变量配置。

项目的启动文件介绍

cephadm-ansible.yml 是项目的主启动文件,它通常包含了所有其他 playbook 的引用和配置。以下是该文件的基本结构:

---
- name: Main playbook for cephadm-ansible
  hosts: all
  become: yes
  roles:
    - role: cephadm-preflight
    - role: cephadm-clients
    - role: cephadm-purge
    - role: cephadm-distribute-ssh-key
    - role: cephadm-set-container-insecure-registries
  tasks:
    - include: cephadm-preflight.yml
    - include: cephadm-clients.yml
    - include: cephadm-purge-cluster.yml
    - include: cephadm-distribute-ssh-key.yml
    - include: cephadm-set-container-insecure-registries.yml

项目的配置文件介绍

项目的配置文件主要位于 group_vars/inventory/ 目录下。以下是一些关键配置文件的介绍:

  • group_vars/all.yml: 包含所有主机的通用配置变量。
  • inventory/sample: 示例库存文件,定义了主机和组的结构。

group_vars/all.yml

---
ceph_origin: 'distro'
ceph_stable_key: 'https://download.ceph.com/keys/release.asc'
ceph_release: 'octopus'
ceph_dev_branch: 'main'
ceph_dev_sha1: 'latest'
custom_repo_url: ''
ceph_custom_repositories: []

inventory/sample

[admin]
admin-host ansible_host=192.168.1.1

[clients]
client-host ansible_host=192.168.1.2

[all:vars]
ansible_user=ceph-user
ansible_become=yes

以上是 cephadm-ansible 项目的基本教程,涵盖了项目的目录结构、启动文件和配置文件的介绍。希望这些信息能帮助你更好地理解和使用该项目。

cephadm-ansibleansible playbooks to be used with cephadm项目地址:https://gitcode.com/gh_mirrors/ce/cephadm-ansible

  • 4
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

任翊昆Mary

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值