Ceph cluster deployment using the ceph-deploy tool

Ceph comes with a vey powerful deployment tool known as ceph-deploy. The ceph-deploy tool relies on SSH for deploying Ceph software on cluster nodes, so it has the basic requirement that node should be installed with OS and it should be reachable on the network. The ceph-deploy tool does not demand additional system resources and it can perform well on a regular workstation machine that should have access to cluster nodes.

You can also consider using any of your monitor nodes as a ceph-deploy node. The ceph-deploy tool makes Ceph deployment easy with initial default configuration that can be modified later based on your use case. The ceph-deploy tool provides features such as installing Ceph packages, cluster creation, monitor and OSD addition, Ceph key management, MDS creation, configuring admin hosts, and tearing down the Ceph cluster.

Earlier in this book, in Chapter 2, Ceph Instant Deployment, we have seen how to deploy a Ceph cluster using the ceph-deploy tool. We will now briefly go through steps for deploying the Ceph cluster using ceph-deploy:

  1. Set up an SSH-based login to all your ceph nodes. If possible, make them passwordless logins. You should always follow security practices of your environments while setting up passwordless SSH logins.
  2. Set up the Ceph software repository file for your Linux package manager. This repository file should be present on all nodes in the cluster.
  3. Install ceph-deploy on any one-cluster node. This is typically an admin node that you should use for Ceph management.
  4. Create a new cluster, the default cluster name would be ceph:
    # ceph-deploy new ceph-node1
    
  5. Install Ceph software on cluster nodes:
    # ceph-deploy install ceph-node1 ceph-node2 ceph-node3
    

    Note

    By default, ceph-deploy will install the latest release of Ceph, if you want to install any specific release of Ceph, use the --release {Ceph-release-name} option with ceph-deploy.

  6. Create initial monitors and gather the keys:
    # ceph-deploy mon create ceph-node1
    # ceph-deploy gatherkeys ceph-node1
    

    Starting from ceph-deploy Version 1.1.3, you no longer require multiple commands for creating initial monitors and gathering keys. This can be achieved in one step using the following command. Before running this command, initial monitors should be configured in your ceph.conf file.

    # ceph-deploy mon create-initial
    
  7. For a high availability, set up more monitor machines. An odd number of monitors are recommended. Make sure you add firewall rules for monitor ports 6789 so that they can connect to each other. If you are performing this just for testing, you can consider disabling firewall.
    # ceph-deploy mon create ceph-node2
    # ceph-deploy mon create ceph-node3
    
  8. If you are using disks that have old filesystem, clear the partitions so that it can be used with Ceph. This operation will destroy all the data on disk.
    # ceph-deploy disk zap ceph-node1:sdb ceph-node1:sdc ceph-node1:sdd
    

    Create OSDs for your Ceph cluster. Repeat the step to add more OSDs. To achieve a clean state for your Ceph cluster, you should add OSDs on machines that are physically separated.

    # ceph-deploy osd create ceph-node1:sdb ceph-node1:sdc ceph-node1:sdd
    
  9. Finally, check the status of your Ceph cluster. It should be healthy.

The ceph-deploy tool is a stable and amazing tool for easy Ceph cluster deployment. It is rapidly getting developed with new features and bug fixes. Now, most of the Ceph clusters are getting deployments using the ceph-deploy tool.

..................Content has been hidden....................

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