O'Reilly logo

Ceph Cookbook - Second Edition by Karan Singh, Michael Hackett, Vikhyat Umrao

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

Let's configure and use the Ceph REST API to check some cluster states:

  1. Create a user, client.restapi, on the Ceph cluster with appropriate access to mon, osd, and mds:
        # ceph auth get-or-create client.restapi           mds 'allow *' osd 'allow *'         mon 'allow *' > /etc/ceph/ceph.client.restapi.keyring

 

  1. Add the following section to the ceph.conf file:
        [client.restapi]        log file = /var/log/ceph/ceph.restapi.log        keyring = /etc/ceph/ceph.client.restapi.keyring
  1. Execute the following command to start the ceph-rest-api as a standalone web server in the background:
        # nohup ceph-rest-api > /var/log/ceph-rest-api &> /var/log/        ceph-rest-api-error.log &
You can also run the ceph-rest-api without nohup, suppressing it to the background. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required