如何使用Ansible部署Ceph集群
发表于:2025-02-04 作者:千家信息网编辑
千家信息网最后更新 2025年02月04日,这篇文章主要介绍如何使用Ansible部署Ceph集群,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!基础配置三台环境为centos7.9,以下配置需要在每台机器上执行配置hos
千家信息网最后更新 2025年02月04日如何使用Ansible部署Ceph集群
这篇文章主要介绍如何使用Ansible部署Ceph集群,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!
基础配置
三台环境为centos7.9,以下配置需要在每台机器上执行
配置hosts解析
cat >> /etc/hosts <关闭防火墙和selinux
systemctl stop firewalld && systemctl disable firewalld setenforce 0 && sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config分别在三个节点设置主机名
hostnamectl set-hostname node1 hostnamectl set-hostname node2 hostnamectl set-hostname node3配置主机时间同步
systemctl restart chronyd.service && systemctl enable chronyd.service配置免密登录
ssh-keygen ssh-copy-id -i .ssh/id_rsa.pub node1 ssh-copy-id -i .ssh/id_rsa.pub node2 ssh-copy-id -i .ssh/id_rsa.pub node3安装pip和ansible、git
yum install python-pip ansible git -y部署ceph集群
克隆存储库
这里我选择安装的是ceph nautilus版本
git clone https://github.com/ceph/ceph-ansible.git cd ceph-ansible git checkout stable-4.0安装ansible依赖包
pip install --upgrade pip pip install -r requirements.txt修改hosts文件,添加安装的节点
cat >> /etc/ansible/hosts <备份group_vars下的yml文件
cd ceph-ansible/group_vars for file in *;do cp $file ${file%.*};done修改group_vars/all.yml配置
--- dummy: mon_group_name: mons osd_group_name: osds rgw_group_name: rgws mds_group_name: mdss client_group_name: clients mgr_group_name: mgrs grafana_server_group_name: grafana-server configure_firewall: False ceph_origin: repository ceph_origin: repository ceph_repository: community ceph_mirror: http://mirrors.aliyun.com/ceph ceph_stable_key: http://mirrors.aliyun.com/ceph/keys/release.asc ceph_stable_release: nautilus ceph_stable_repo: "{{ ceph_mirror }}/rpm-{{ ceph_stable_release }}" public_network: "192.168.2.0/24" cluster_network: "192.168.2.0/24" monitor_interface: ens33 osd_auto_discovery: true osd_objectstore: filestore radosgw_interface: ens33 dashboard_admin_password: asd123456 grafana_admin_password: admin pg_autoscale_mode: True修改group_vars/osds.yml配置
devices: - /dev/sdb修改site.yml配置
开始进行安装
剩下的交给时间吧,十分钟左右就装好了
ansible-playbook -i /etc/ansible/hosts site.yml查看安装状态,发现有一个警告,这是因为在之前的all.yml配置没有开启允许自动调整pool中的pg数pg_autoscale_mode: False,手动设置下即可
ceph osd pool setpg_autoscale_mode on 以上是"如何使用Ansible部署Ceph集群"这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注行业资讯频道!
配置
集群
主机
内容
文件
时间
篇文章
节点
三个
价值
兴趣
基础
备份
小伙
小伙伴
手动
更多
机器
版本
状态
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
河南前端软件开发公司
百度云盘网络安全证书
mqtt公开测试服务器
眼镜销售系统数据库
数据库音乐人的E-R图
北京网络安全资讯免费试学
普陀区特定软件开发服务设计标准
职业网络技术第一单元英语单词
数据库查询执行性能要求
做软件开发大学报哪个专业
网络安全与信息安全简报
机房服务器端口映射
孔蒂拉纳克在哪个服务器
网络安全等级测评结论
威海中国网络时间同步服务器
游戏哪些数据是放在服务器的
网络安全十大建议
济宁哪里做手机麻将软件开发
网上书店的数据库设计实验报告
怎样查看股票每日交易数据库
南昌有特殊服务器
网络安全交通图片素材
ole技术共享数据库
pc作服务器
互联网 智能科技 ceo
学习java用什么数据库
服务器cpue5
linux 服务器时间
贵州省宏观经济数据库怎么下载
小学网络安全告家长信