Skip to content

Instantly share code, notes, and snippets.

@gilangvperdana
Last active August 5, 2024 12:43
Show Gist options
  • Save gilangvperdana/e6371ebf4f6c5164707e41146c371834 to your computer and use it in GitHub Desktop.
Save gilangvperdana/e6371ebf4f6c5164707e41146c371834 to your computer and use it in GitHub Desktop.
Ceph References

Installation with Cephadm

apt update -y && apt-get full-upgrade -y
apt install cephadm

 cephadm add-repo --release quincy
 cephadm install
 cephadm install  ceph-common

Bootstraping

if you want to create on lab/1 VM you can add --single-host-defaults

cephadm bootstrap --mon-ip 172.90.0.30 --initial-dashboard-user "ceph-admin" --initial-dashboard-password "ADMIN_123" --dashboard-password-noupdate --cluster-network=172.91.0.0/24 --allow-fqdn-hostname


ssh-copy-id -f -i /etc/ceph/ceph.pub root@ceph1
ssh-copy-id -f -i /etc/ceph/ceph.pub root@ceph2


ceph orch host add ceph1.kdinesh.in 172.90.0.31
ceph orch host add ceph2.kdinesh.in 172.90.0.32


ceph orch apply mon --placement="ceph0.kdinesh.in,ceph1.kdinesh.in,ceph2.kdinesh.in"
ceph orch apply mgr --placement="ceph0.kdinesh.in,ceph1.kdinesh.in,ceph2.kdinesh.in"


ceph orch host label add ceph0.kdinesh.in osd-node
ceph orch host label add ceph1.kdinesh.in osd-node
ceph orch host label add ceph2.kdinesh.in osd-node


ceph orch host label add ceph0.kdinesh.in mon
ceph orch host label add ceph1.kdinesh.in mon
ceph orch host label add ceph2.kdinesh.in mon


ceph orch host label add ceph0.kdinesh.in mgr
ceph orch host label add ceph1.kdinesh.in mgr
ceph orch host label add ceph2.kdinesh.in mgr


ceph orch apply osd --all-available-devices

iSCSI

ceph osd pool create iscsi
rbd pool init iscsi
apt install targetcli-fb ceph-iscsi python3-rtslib-fb tcmu-runner -y

nano /etc/ceph/iscsi-gateway.cfg
---
[config]
cluster_name = ceph
gateway_keyring = ceph.client.admin.keyring
pool = iscsi

api_secure = false

trusted_ip_list = 0.0.0.0
---

systemctl daemon-reload
systemctl start rbd-target-gw
systemctl enable rbd-target-gw
systemctl status rbd-target-gw

ceph osd blacklist ls
ceph osd blacklist clear

systemctl enable rbd-target-api
systemctl start rbd-target-api
systemctl status rbd-target-api

ceph dashboard set-iscsi-api-ssl-verification false
ceph dashboard iscsi-gateway-list

nano gw1
---
http://admin:admin@ceph0.kdinesh.in:5000
---

nano gw2
---
http://admin:admin@ceph1.kdinesh.in:5000
---

nano gw3
---
http://admin:admin@ceph2.kdinesh.in:5000
---

ceph dashboard iscsi-gateway-add -i gw1
ceph dashboard iscsi-gateway-add -i gw2
ceph dashboard iscsi-gateway-add -i gw3

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment