惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LINUX DO - 热门话题
Recorded Future
Recorded Future
Engineering at Meta
Engineering at Meta
F
Fortinet All Blogs
Vercel News
Vercel News
MyScale Blog
MyScale Blog
Microsoft Azure Blog
Microsoft Azure Blog
爱范儿
爱范儿
C
CERT Recently Published Vulnerability Notes
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
罗磊的独立博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Webroot Blog
Webroot Blog
B
Blog
WordPress大学
WordPress大学
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
F
Full Disclosure
V
V2EX
H
Help Net Security
Stack Overflow Blog
Stack Overflow Blog
H
Hacker News: Front Page
小众软件
小众软件
Latest news
Latest news
Google DeepMind News
Google DeepMind News
S
Secure Thoughts
I
InfoQ
P
Palo Alto Networks Blog
Apple Machine Learning Research
Apple Machine Learning Research
The Cloudflare Blog
博客园 - 【当耐特】
D
Docker
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
P
Privacy & Cybersecurity Law Blog
G
Google Developers Blog
Hacker News: Ask HN
Hacker News: Ask HN
The GitHub Blog
The GitHub Blog
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
大猫的无限游戏
大猫的无限游戏
NISL@THU
NISL@THU
M
MIT News - Artificial intelligence
Schneier on Security
Schneier on Security
The Last Watchdog
The Last Watchdog
月光博客
月光博客
S
Securelist
Y
Y Combinator Blog
量子位
Security Archives - TechRepublic
Security Archives - TechRepublic
Microsoft Security Blog
Microsoft Security Blog
Security Latest
Security Latest

jobcher on 打工人日志

2023-12-21 打工人日报 2023-12-20 打工人日报 2023-12-19 打工人日报 2023-12-18 打工人日报 2023-12-17 打工人日报 2023-12-16 打工人日报 2023-12-15 打工人日报 2023-12-14 打工人日报 2023-12-13 打工人日报 2023-12-12 打工人日报 2023-12-11 打工人日报 2023-12-10 打工人日报 2023-12-09 打工人日报 2023-12-08 打工人日报 2023-12-07 打工人日报 2023-12-06 打工人日报 2023-12-05 打工人日报 2023-12-04 打工人日报 2023-12-03 打工人日报 2023-12-02 打工人日报 2023-12-01 打工人日报 2023-11-30 打工人日报 2023-11-29 打工人日报 2023-11-28 打工人日报 2023-11-27 打工人日报 2023-11-26 打工人日报 2023-11-25 打工人日报 2023-11-24 打工人日报 2023-11-23 打工人日报 2023-11-22 打工人日报 2023-11-21 打工人日报 2023-11-20 打工人日报 2023-11-19 打工人日报 2023-11-17 打工人日报 2023-11-16 打工人日报 2023-11-15 打工人日报 2023-11-14 打工人日报 2023-11-13 打工人日报 2023-11-12 打工人日报 2023-11-11 打工人日报 2023-11-10 打工人日报 2023-11-09 打工人日报 2023-11-08 打工人日报 2023-11-07 打工人日报 2023-11-06 打工人日报 2023-11-05 打工人日报 2023-11-04 打工人日报 2023-11-03 打工人日报 2023-11-02 打工人日报 2023-11-01 打工人日报 2023-10-31 打工人日报 2023-10-30 打工人日报 2023-10-29 打工人日报 2023-10-28 打工人日报 2023-10-27 打工人日报 2023-10-26 打工人日报 2023-10-25 打工人日报 2023-10-24 打工人日报 2023-10-23 打工人日报 2023-10-22 打工人日报 2023-10-21 打工人日报 2023-10-20 打工人日报 2023-10-19 打工人日报 2023-10-18 打工人日报 2023-10-17 打工人日报 2023-10-16 打工人日报 2023-10-15 打工人日报 2023-10-14 打工人日报 2023-10-13 打工人日报 2023-10-12 打工人日报 2023-10-11 打工人日报 2023-10-10 打工人日报 2023-10-09 打工人日报 2023-10-07 打工人日报 2023-10-06 打工人日报 2023-10-05 打工人日报 2023-10-04 打工人日报 2023-10-03 打工人日报 2023-10-02 打工人日报 2023-10-01 打工人日报 2023-09-30 打工人日报 2023-09-29 打工人日报 2023-09-28 打工人日报 2023-09-27 打工人日报 2023-09-26 打工人日报 2023-09-25 打工人日报 2023-09-24 打工人日报 2023-09-23 打工人日报 2023-09-22 打工人日报 2023-09-21 打工人日报 2023-09-20 打工人日报 2023-09-19 打工人日报 2023-09-18 打工人日报 2023-09-17 打工人日报 2023-09-16 打工人日报 2023-09-15 打工人日报 2023-09-14 打工人日报 2023-09-13 打工人日报 2023-09-12 打工人日报 2023-09-11 打工人日报
Ansible部署ceph集群
2023-07-18 · via jobcher on 打工人日志

基础配置

三台环境为centos7.9,以下配置需要在每台机器上执行

配置hosts解析

1cat >> /etc/hosts <<EOF
2192.168.2.23 node1
3192.168.2.24 node2
4192.168.2.25 node3
5EOF

关闭防火墙和selinux

1systemctl stop firewalld && systemctl disable firewalld
2setenforce 0 && sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

分别在三个节点设置主机名

1hostnamectl set-hostname node1
2hostnamectl set-hostname node2
3hostnamectl set-hostname node3

配置主机时间同步

1systemctl restart chronyd.service && systemctl enable chronyd.service

配置免密登录

1ssh-keygen
2ssh-copy-id -i .ssh/id_rsa.pub node1
3ssh-copy-id -i .ssh/id_rsa.pub node2
4ssh-copy-id -i .ssh/id_rsa.pub node3

安装pip和ansible、git

1yum install python-pip ansible git -y

部署ceph集群

克隆存储库

这里我选择安装的是ceph nautilus版本

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

安装ansible依赖包

1pip install --upgrade pip
2pip install -r requirements.txt

修改hosts文件,添加安装的节点

 1cat >> /etc/ansible/hosts <<EOF
 2[mons]
 3node1
 4node2
 5node3
 6
 7[osds]
 8node1
 9node2
10node3
11
12[mgrs]
13node1
14
15[mdss]
16node1
17node2
18node3
19
20[clients]
21node1
22node2
23node3
24
25[rgws]
26node1
27node2
28node3
29
30[grafana-server]
31node1
32
33EOF

备份group_vars下的yml文件

1cd ceph-ansible/group_vars
2for file in *;do cp $file ${file%.*};done

修改group_vars/all.yml配置

 1---
 2dummy:
 3mon_group_name: mons
 4osd_group_name: osds
 5rgw_group_name: rgws
 6mds_group_name: mdss
 7client_group_name: clients
 8mgr_group_name: mgrs
 9grafana_server_group_name: grafana-server
10configure_firewall: False
11ceph_origin: repository
12ceph_origin: repository
13ceph_repository: community
14ceph_mirror: http://mirrors.aliyun.com/ceph
15ceph_stable_key: http://mirrors.aliyun.com/ceph/keys/release.asc
16ceph_stable_release: nautilus
17ceph_stable_repo: "{{ ceph_mirror }}/rpm-{{ ceph_stable_release }}"
18public_network: "192.168.2.0/24"
19cluster_network: "192.168.2.0/24"
20monitor_interface: ens33
21osd_auto_discovery: true
22osd_objectstore: filestore
23radosgw_interface: ens33
24dashboard_admin_password: asd123456
25grafana_admin_password: admin
26pg_autoscale_mode: True

修改group_vars/osds.yml配置

修改site.yml配置
ceph-site

开始进行安装

剩下的交给时间吧,十分钟左右就装好了

1ansible-playbook -i /etc/ansible/hosts site.yml

查看安装状态,发现有一个警告,这是因为在之前的all.yml配置没有开启允许自动调整pool中的pg数 pg_autoscale_mode: False ,手动设置下即可

1ceph osd pool set <pool-name> pg_autoscale_mode on