Configure Ceph Cluster in UBUNTU 18.0

 Pre-requisites:

1. In this case, 3 mon and 3 mgr node (node01, node02, node03) will available.
2. OSD will be placed on a different node (node04 node05 node06)
3. Install Ceph to all Nodes from the Admin Node and copy keyrings to all nodes
4. For PG CALC use https://ceph.io/pgcalc/

STEPS TO CONFIGURE CEPH CLUSTER

  1. Add a user for Ceph admin on all Nodes and Grant root privilege to Ceph admin user just added above with sudo settings. And also install required packages to all
    #apt -y install openssh-server python-ceph
    #
    echo -e ‘Defaults:ubuntu !requiretty\nubuntu ALL = (root) NOPASSWD:ALL’ | tee /etc/sudoers.d/ceph
    #
    chmod 440 /etc/sudoers.d/ceph
  2. Passwordless between each node:
    #ssh-keygen
    #ssh-copy-id node01
    #ssh-copy-id node02
    #ssh-copy-id node03
    #ssh-copy-id node04
    #ssh-copy-id node05
  3. Install Ceph to all Nodes from Admin Node (node01). So install below commands to Admin node (node1)
    #sudo apt -y install ceph-deploy ceph-common ceph-mds
    #
    mkdir ceph
    #
    cd ceph
  4. Below command will run on Admin node and in this command add mon nodes
    #ceph-deploy new node01 node02 node03
  5. Settings for monitoring and keys
    #ceph-deploy mon create-initial
  6. Configure manager node
    #ceph-deploy mgr create node01 node02 node03
  7. Install ceph on each nodes Node
    #ceph-deploy install node01 node02 node03 node04 node05
  8. Check status and heath
    #ceph -s
    #ceph health
  9. Copy ceph keys to all nodes from Admin node (node01)
    #scp /etc/ceph/* node02:/etc/ceph/
    #scp /etc/ceph/* node03:/etc/ceph/
    #scp /etc/ceph/* node04:/etc/ceph/
    #scp /etc/ceph/* node05:/etc/ceph/
  10. Create OSD node from Admin node
    #ceph-deploy disk zap node04:sdb node04:sdc
    #ceph-deploy disk zap node05:sdb node05:sdc
    #ceph-deploy osd create node04:sdb node04:sdc
    #ceph-deploy osd create node05:sdb node05:sdc
  11. By the way, if you’d like to clean settings and re-configure again, do like follows(for example node04 node05).
    remove package
    #ceph-deploy purge node04 node05
    remove settings
    #ceph-deploy purgedata node04 node05
    #ceph-deploy forgetkeys
  12. Configure dashboard
    #ceph mgr module enable dashboard
    #ceph mgr services
  13. Change dashboard port (By default port is 7000)
    #ceph config-key set mgr/dashboard/server_addr ::
    #ceph config-key set mgr/dashboard/server_port 8443
    Disable ssl
    #ceph config-key set mgr/dashboard/ssl false
  14. ENJOY

Comments

Popular posts from this blog

Convert .iso Image to .qcow2 Image

How to reset password in single user mode in Ubuntu 18.04

How to set Grub Password in UBUNTU 18.03 (Password protect Boot Loader)