Charm Interface - Ceph MDS
Go to file
Doug Hellmann 9670ff34f6 import zuul job settings from project-config
This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project
repository.

Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.

Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are
normalized.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I37a1b94803084e95b5d4e74c2452f8dd0f53ce22
Story: #2002586
Task: #24317
2018-10-04 12:45:14 +00:00
.gitignore Lint Rules 2017-03-20 14:38:54 -07:00
.gitreview Lint Rules 2017-03-20 14:38:54 -07:00
.zuul.yaml import zuul job settings from project-config 2018-10-04 12:45:14 +00: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 Properly format IPv6 monitor address. 2017-03-21 12:45:32 +00:00
test-requirements.txt Lint Rules 2017-03-20 14:38:54 -07:00
tox.ini Update tox to remove deprecated pip option 2018-10-04 12:13:10 +02: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)