Ceph-deploy

Alternately, one may use the ceph-deploy tool to perform Ceph management tasks at a smaller granularity. If your Ceph infrastructure does not already have ceph-deploy enabled, below are succinct instructions on installation and configuration. We discuss the actions to be taken; you will need to apply them across your Ceph nodes via your usual server management practices.

First, create a dedicated user for ceph-deploy on all systems to be managed. Popular documentation creates the ceph-server user for this task, though you may choose a different name.

$ sudo useradd -d /home/ceph-server -m ceph
$ sudo passwd ceph-server

Installation of software packages, access to devices, and management of system services require root privileges. Ceph-deploy runs and connects to remote systems as our new dedicated user and escalates via sudo as it needs to, an approach that avoids having to enable password-less SSH trusts on your cluster nodes. We next enable password-less sudo for the unprivileged ceph-server user on all nodes to be managed.

$ echo "ceph-server ALL = (ALL) NOPASSWD: ALL" | sudo tee 
/etc/sudoers.d/ceph-server
$ sudo chmod 0440 /etc/sudoers.d/ceph-server

Next set up password-less SSH trust from your admin host to each of your Ceph production systems for the ceph-server user.

$ sudo -i -u ceph-server
ceph-server$ ssh-keygen
Generating public/private key pair.
Enter file in which to save the key (/home/ceph-server/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/ceph-server/.ssh/id_rsa.
Your public key has been saved in /home/ceph-server/.ssh/id_rsa.pub.
  

Distribute the new key to each production node (or use your usual method).

$ ssh-copy-id [email protected]   
# apt-get install -y ceph-deploy

Now install ceph-deploy itself on your admin node. Your Linux distribution may already provide this package, or you can download prebuilt packages from https://download.ceph.com/. Those so inclined can use the source at https://github.com/ceph/ceph-deploy.

# yum install -y ceph-deploy

That's all it takes! Remember that it is customary to sudo to the ceph-server user before running ceph-deploy, rather than running as the root user.

When invoking ceph-deploy, especially when creating OSDs, it's important to have an up-to-date copy of your ceph.conf configuration file in the ceph-server user's home directory. ceph-deploy will compare this to that present on the other side, and if differences are found may require the --override-conf flag to continue, which will overwrite ceph.conf on the remote system. This is handy when deploying the first OSD on a new node if ceph.conf is not distributed via other means. Be sure that if you automate the distribution of ceph.conf to your cluster nodes you must maintain the ceph-server user's copy as well.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset