Skip to content

rkachach/ceph-cluster-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ceph-cluster-setup

Simple Ceph cluster setup by using kcli

Prerequisites: install kcli (https://github.com/karmab/kcli)

Or just use the following alias:

alias kcli='podman run --net host -it --rm --security-opt label=disable -v $HOME/.ssh:/root/.ssh -v $HOME/.kcli:/root/.kcli -v /var/lib/libvirt/images:/var/lib/libvirt/images -v /var/run/libvirt:/var/run/libvirt -v $PWD:/workdir -v /var/tmp:/ignitiondir quay.io/karmab/kcli:2543a61'

Change SELinux policy to permessive:

sudo setenforce 0

Make sure root can perform ssh login:

sudo nano /etc/ssh/sshd_config (and set PermitRootLogin to yes)
sudo systemctl restart sshd

To create a 3-node ceph cluster:

# Delete any previous installation
kcli delete plan ceph -y
kcli delete network ceph-orch -y && kcli create network -c 192.168.100.0/24 ceph-orch

Install the new cluster:

kcli create plan -f ./ceph_cluster.yml -P expanded_cluster=true ceph

Or for development:

kcli create plan -f ./ceph_cluster.yml -P ceph_dev_folder=<path-to-your-ceph-src> -P expanded_cluster=true ceph

This will create a new 3-nodes ceph cluster which has teh following nodes:

  • ceph-node-0 (192.168.100.100)
  • ceph-node-1 (192.168.100.101)
  • ceph-node-2 (192.168.100.102)

Now user can enter to any node by using (where X is the # of the node):

kcli ssh -u root ceph-node-X

And launch the cephadm shell to manage the cluster:

cephadm shell

About

Simple Ceph cluster setup by using kcli

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages