Ansible-ceph集群
配置hosts解析
cat >> /etc/hosts <<EOF
172.19.200.8 ceph-node1
172.19.200.15 ceph-node2
172.19.200.13 ceph-node3
EOF
关闭防火墙和selinux
systemctl stop firewalld && systemctl disable firewalld
setenforce 0 && sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config分别在三个节点设置主机名
hostnamectl set-hostname ceph-node1
hostnamectl set-hostname ceph-node2
hostnamectl set-hostname ceph-node3
分别在三个节点配置主机时间同步
yum install chrony python-netaddr -y-y
timedatectl set-timezone Asia/Shanghai
systemctl restart chronyd.service && systemctl enable chronyd.service
配置免密登录
安装pip和ansible、git
部署ceph集群
这里我选择安装的是ceph nautilus 版本 版本: stable-4.0, 推荐这个版本,其他版本会出现无缘无故的问题 依赖: Ansible version 2.9
安装ansible依赖包
无法安装则使用指定安装路径 -i https://pypi.tuna.tsinghua.edu.cn/simple
修改hosts文件,添加安装的节点
备份group_vars下的yml文件
修改group_vars/all.yml配置
Last updated