Charm Interface - Ceph MDS
Go to file
James Page 7144989ac4 Switch to using mds_bootstrap_key 2016-10-20 11:40:20 -07:00
.gitignore Add fsid and mon_hosts. Also add a simple README 2016-08-25 09:39:23 -07:00
README.md Update readme 2016-09-19 15:40:26 -07:00
interface.yaml Add admin key 2016-09-19 15:35:36 -07:00
requires.py Switch to using mds_bootstrap_key 2016-10-20 11:40:20 -07:00

README.md

Overview

This interface layer handles the communication between the Ceph Monitor and a client that requires an admin key.

Usage

Requires

This interface layer will set the following states, as appropriate:

  • {relation_name}.available The ceph client has been related to a provider. The following accessors will be available:
  • key - The mds cephx key
  • admin_key - The cephx admin key
  • auth - Whether or not strict auth is supported
  • mon_hosts - The public addresses list of the monitor cluster

Client example:

@when('ceph-mds.available')
def ceph_connected(ceph_info):
  charm_ceph_conf = os.path.join(os.sep, 'etc', 'ceph', 'ceph.conf')
  cephx_key = os.path.join(os.sep, 'etc', 'ceph', 'ceph.client.admin.keyring')

  ceph_context = {
      'auth_supported': ceph_client.auth,
      'mon_hosts': ceph_client.mon_hosts,
  }

  with open(charm_ceph_conf, 'w') as cephconf:
    cephconf.write(render_template('ceph.conf', ceph_context))

  # Write out the cephx_key also
  with open(cephx_key, 'w') as cephconf:
    cephconf.write(ceph_client.key)