Charm Interface - Keystone Admin
Go to file
Doug Hellmann f17118ef4f 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: I73a3606600556175febdd5e281456c922ce22f13
Story: #2002586
Task: #24317
2018-10-04 12:42:12 +00:00
.gitignore Enable Keystone v3 2017-10-13 13:19:27 -07:00
.gitreview Enable Keystone v3 2017-10-13 13:19:27 -07:00
.zuul.yaml import zuul job settings from project-config 2018-10-04 12:42:12 +00:00
README.md README included 2016-03-16 11:19:20 +01:00
copyright requires keystone-admin:identity-admin 2016-03-08 13:58:25 +01:00
interface.yaml requires keystone-admin:identity-admin 2016-03-08 13:58:25 +01:00
requires.py Enable Keystone v3 2017-10-13 13:19:27 -07:00
test-requirements.txt requires keystone-admin:identity-admin 2016-03-08 13:58:25 +01:00
tox.ini Update tox to remove deprecated pip option 2018-10-04 12:20:25 +02:00

README.md

keystone-admin interface

Use this interface to use keystone credentials in your charm layers.

Purpose

By relating you charm layer (keystone-admin:identity-admin) with keystone service, keystone's API endpoint as well as username, password and region name will be shared.

How to use in your layers

The event handler for identity-admin.connected is called when a relation is established between your charm layer and keystone.

In case there are no unset shared data (ie: service_password), a new event handler will be set: identity-admin.available.

This object provides a method,

credentials()

returing a dict of:

        {u'service_password': u'XXXXXXXX',
         u'service_port': u'5000',
         u'service_hostname': u'10.XX.XX.XXX',
         u'service_username': u'admin',
         u'service_tenant_name': u'Admin',
         u'service_region': u'RegionOne'}

metadata.yaml

requires:
  identity-admin:
    interface: keystone-admin

layer.yaml,

includes: ['layer:basic', 'interface:keystone-admin']

charm layer example,

@when('identity-admin.available')
def setup_openstack_plugin(kst_data):
    creds = kst_data.credentials()
    if data_changed('identity-admin.config', creds):
        settings = {'keystone_vip': creds['service_hostname'],
                    'keystone_port': creds['service_port'],
                    'username': creds['service_username'],
                    'password': creds['service_password'],
                    'tenant_name': creds['service_tenant_name'],
        }

Example deployment

$ juju deploy your-awesome-charm
$ juju deploy keystone --config keystone-creds.yaml
$ juju deploy mysql
$ juju add-relation keystone mysql
$ juju add-relation your-awesome-charm keystone

where keystone-creds.yaml has the necessary configuration settings for your awesome charm to connect to keystone.