Install Ceph 15.2.8 on Debian 10.7

出自ChevyneWiki
於 2021年1月8日 (五) 14:05 由 Chevyne留言 | 貢獻 所做的修訂
跳至導覽 跳至搜尋
  • 時間: 2020-12-31
  • 安裝 Ceph 15.2.8 在 Debian 10.7
    • Debian 10.7
    • Podman 2.2.1
    • Ceph 15.2.8
    • 部署套件 Cephadm

叢集規劃

編輯 /etc/hosts

192.168.31.71 mon1
192.168.31.72 mon2
192.168.31.73 mon3
192.168.31.74 mon4
192.168.31.75 mon5
192.168.31.76 mds1
192.168.31.77 mds2
192.168.31.78 mds3
192.168.31.79 mds4
192.168.31.80 mds5
192.168.31.81 osd11
192.168.31.82 osd12
192.168.31.83 osd13
192.168.31.84 osd14
192.168.31.85 osd21
192.168.31.86 osd22
192.168.31.87 osd23
192.168.31.88 osd24
192.168.31.89 osd25
192.168.31.90 osd26
192.168.31.91 rgw1
192.168.31.92 rgw2
192.168.31.93 rgw3
192.168.31.94 cephfs1
192.168.31.95 cephfs2
192.168.31.96 cephfs3
192.168.31.97 rbd1
192.168.31.98 rbd2
192.168.31.99 rbd3

先決條件

已完成 Debian 安裝後步驟

  • 安裝叢集需要時間同步 所以安裝 Chrony
  • 部署套件會使用 SSH 所以安裝 sshd
  • 部署時SSH

安裝 Podman

用 cephadm 部署會在容器運行 我們選擇 Podman

echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list
echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/Release.key | apt-key add -
apt-get update
apt-get -y -t buster-backports install libseccomp2
apt-get -y install podman

安裝套件

curl --silent --remote-name --location https://github.com/ceph/ceph/raw/octopus/src/cephadm/cephadm
chmod +x cephadm
wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add -
echo deb https://download.ceph.com/debian-octopus/ $(lsb_release -sc) main | tee /etc/apt/sources.list.d/ceph.list
apt-get update
./cephadm install cephadm ceph-common
mkdir -p /etc/ceph

Bootstrap

編輯 /etc/ceph/cephx.conf

[global]
public network = 192.168.31.0/24
cluster network = 192.168.31.0/24
osd pool default size = 2
osd pool default pg autoscale mode = on
[mon]
[mgr]
[osd]
osd client watch timeout = 15
osd heartbeat grace = 20
osd heartbeat interval = 5
[mds]
[client]
cephadm bootstrap --config /etc/ceph/cephx.conf --mon-ip 192.168.31.71 --allow-fqdn-hostname
ceph telemetry on --license sharing-1-0