Cephadm for ubuntu cluster

Installing main host

First we need curl in order to fetch the cephadm application

sudo apt install -y curl

Then we download the application and make it executable.

curl --silent --remote-name --location https://github.com/ceph/ceph/raw/pacific/src/cephadm/cephadm
chmod +x cephadm

CephAdm could be used to set which version we want to install. In this case we choose Pacific as this is the first version that has full support for cephadm install. We also will run the command to install the tooling locally.

sudo ./cephadm add-repo --release pacific
sudo ./cephadm install

Bootstraping a cluster means to install the packages required to run the cluster from this administration host. After that is done you will have a cluster with one host, not something you could run any services on but something that you could administrate and work with your cluster. Supplying the IP address is important for the cluster to know where to connect, when done you’ll get an address, username and password to reach the administration GUI.

sudo cephadm bootstrap --mon-ip "MONITOR IP"

In the administration GUI you could later add additional hosts and services but first we need to prepare those hosts.

Preparing additional hosts.

First we need to install packages required to set keys in our keystore.

on controller:

sudo cat /etc/ceph/ceph.pub

copy to node 2, node 3, …….., node N.

sudo su
cd && nano .ssh/authorized_keys

paste the public key to the files.

install dependencies on another machine

sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common

Downloading and installing the gpg key for docker into this local host.

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –

We will then add the package repository to our system so we can download the packages required to install Docker.

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"

Update the repository and install packages required to run docker containers.

sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io

Last but not least we will install tooling to setup local volumes on this host, this will be used when making Object Storage Devices(OSD) on this host.

sudo apt install -y lvm2

next login to the ceph GUI

the user and password is on cli after you bootstrap the monitor

on the first time you login, you can expand the cluster.

THIS MENU ONLY SHOW ONCE!!!

add the host and labels

create the osd > add disk > use filter to attach

create service

review and expand the cluster

Leave a Reply

Your email address will not be published. Required fields are marked *