Forge Home

keystone

Puppet module for OpenStack Keystone

67,603 downloads

60,820 latest version

3.1 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 5.2.0 (latest)
  • 5.1.0
  • 5.0.0
released Oct 2nd 2015
This version is compatible with:
  • Puppet Enterprise 3.x
  • Puppet 3.x
  • , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'stackforge-keystone', '5.2.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add stackforge-keystone
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install stackforge-keystone --version 5.2.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

stackforge/keystone — version 5.2.0 Oct 2nd 2015

keystone

5.2.0 - 2014.2 - Juno

Table of Contents

  1. Overview - What is the keystone module?
  2. Module Description - What does the module do?
  3. Setup - The basics of getting started with keystone
  4. Implementation - An under-the-hood peek at what the module is doing
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module
  7. Contributors - Those with commits
  8. Release Notes - Notes on the most recent updates to the module

Overview

The keystone module is a part of Stackforge, an effort by the Openstack infrastructure team to provide continuous integration testing and code review for Openstack and Openstack community projects not part of the core software. The module its self is used to flexibly configure and manage the identify service for Openstack.

Module Description

The keystone module is a thorough attempt to make Puppet capable of managing the entirety of keystone. This includes manifests to provision region specific endpoint and database connections. Types are shipped as part of the keystone module to assist in manipulation of configuration files.

This module is tested in combination with other modules needed to build and leverage an entire Openstack software stack. These modules can be found, all pulled together in the openstack module.

Setup

What the keystone module affects

  • keystone, the identify service for Openstack.

Installing keystone

example% puppet module install puppetlabs/keystone

Beginning with keystone

To utilize the keystone module's functionality you will need to declare multiple resources. The following is a modified excerpt from the openstack module. This is not an exhaustive list of all the components needed, we recommend you consult and understand the openstack module and the core openstack documentation.

Define a keystone node

class { 'keystone':
  verbose        => True,
  catalog_type   => 'sql',
  admin_token    => 'random_uuid',
  sql_connection => 'mysql://keystone_admin:super_secret_db_password@openstack-controller.example.com/keystone',
}

# Adds the admin credential to keystone.
class { 'keystone::roles::admin':
  email        => 'admin@example.com',
  password     => 'super_secret',
}

# Installs the service user endpoint.
class { 'keystone::endpoint':
  public_address   => '10.16.0.101',
  admin_address    => '10.16.1.101',
  internal_address => '10.16.2.101',
  region           => 'example-1',
}

Leveraging the Native Types

Keystone ships with a collection of native types that can be used to interact with the data stored in keystone. The following, related to user management could live throughout your Puppet code base. They even support puppet's ability to introspect the current environment much the same as puppet resource user, puppet resouce keystone_tenant will print out all the currently stored tenants and their parameters.

keystone_tenant { 'openstack':
  ensure  => present,
  enabled => True,
}
keystone_user { 'openstack':
  ensure  => present,
  enabled => True,
}
keystone_role { 'admin':
  ensure => present,
}
keystone_user_role { 'admin@openstack':
  roles => ['admin', 'superawesomedude'],
  ensure => present
}

These two will seldom be used outside openstack related classes, like nova or cinder. These are modified examples form Class['nova::keystone::auth'].

# Setup the nova keystone service
keystone_service { 'nova':
  ensure      => present,
  type        => 'compute',
  description => 'Openstack Compute Service',
}

# Setup nova keystone endpoint
keystone_endpoint { 'example-1-west/nova':
   ensure       => present,
   public_url   => "http://127.0.0.1:8774/v2/%(tenant_id)s",
   admin_url    => "http://127.0.0.1:8774/v2/%(tenant_id)s",
   internal_url => "http://127.0.0.1:8774/v2/%(tenant_id)s",
}

Setting up a database for keystone

A keystone database can be configured separately from the keystone services.

If one needs to actually install a fresh database they have the choice of mysql or postgres. Use the mysql::server or postgreql::server classes to do this setup then the Class['keystone::db::mysql'] or Class['keystone::db::postgresql'] for adding the needed databases and users that will be needed by keystone.

  • For mysql
class { 'mysql::server': }

class { 'keystone::db::mysql':
  password      => 'super_secret_db_password',
  allowed_hosts => '%',
}
  • For postgresql
class { 'postgresql::server': }

class { 'keystone::db::postgresql': password => 'super_secret_db_password', }

Implementation

keystone

keystone is a combination of Puppet manifest and ruby code to delivery configuration and extra functionality through types and providers.

Limitations

  • All the keystone types use the CLI tools and so need to be ran on the keystone node.

Upgrade warning

  • If you've setup Openstack using previous versions of this module you need to be aware that it used UUID as the dedault to the token_format parameter but now defaults to PKI. If you're using this module to manage a Grizzly Openstack deployment that was set up using a development release of the modules or are attempting an upgrade from Folsom then you'll need to make sure you set the token_format to UUID at classification time.

Development

Developer documentation for the entire puppet-openstack project.

Contributors

Release Notes

5.2.0

  • Add an ability to manage use_stderr parameter
  • Remove utf-8 characters
  • Use an Anchor when service is managed

5.1.0

  • Allow disabling or delaying the token_flush cron
  • crontab: ensure the script is run with shell
  • Use openstackclient for keystone_* providers
  • Add lib directories to $LOAD_PATH if not present
  • Remove keystone.rb provider for keystone_endpoint
  • Add timeout to API requests
  • Test keystone_user password with Net::HTTP
  • service_identity: add user/role ordering
  • Fix password check for SSL endpoints
  • add require json for to_json dependency
  • spec: pin rspec-puppet to 1.0.1
  • Switch to TLSv1
  • handle missing project/tenant when using ldap backend
  • Add support for LDAP connection pools
  • Sync keystone.py with upstream to function with Juno
  • Create resource cache upon creation
  • Implement caching lookup for keystone_user_role
  • Remove warnings from openstack responses
  • Properly handle embedded newlines in csv
  • support the ldap user_enabled_invert parameter
  • Shorten HTTP request timeout length
  • Tag packages with 'openstack'
  • Allow Keystone to be queried when using IPv6 ::0
  • Add ::keystone::policy class for policy management
  • New option replace_password for keystone_user
  • Pin puppetlabs-concat to 1.2.1 in fixtures
  • Set WSGI process display-name
  • Rename resource instance variable
  • Add native types for keystone paste configuration
  • Update .gitreview file for project rename

5.0.0

  • Stable Juno release
  • Updated token driver, logging, and ldap config parameters for Juno
  • Changed admin_roles parameter to accept an array in order to configure multiple admin roles
  • Installs python-ldappool package for ldap
  • Added new parameters to keystone class to configure pki signing
  • Changed keystone class to inherit from keystone::params
  • Changed pki_setup to run regardless of token provider
  • Made UUID the default token provider
  • Made keystone_user_role idempotent
  • Added parameters to control whether to configure users
  • Stopped managing member role since it is created automatically
  • Stopped overriding token_flush log file
  • Changed the usage of admin_endpoint to not include the API version
  • Allowed keystone_user_role to accept email as username
  • Added ability to set up keystone using Apache mod_wsgi
  • Migrated the keystone::db::mysql class to use openstacklib::db::mysql and deprecated the mysql_module parameter
  • Installs python-memcache when using token driver memcache
  • Enabled setting cert and key paths for PKI token signing
  • Added parameters for SSL communication between keystone and rabbitmq
  • Added parameter ignore_default_tenant to keystone::role::admin
  • Added parameter service_provider to keystone class
  • Added parameters for service validation to keystone class

4.2.0

  • Added class for extended logging options
  • Fixed rabbit password leaking
  • Added parameters to set tenant descriptions
  • Fixed keystone user authorization error handling

4.1.0

  • Added token flushing with cron.
  • Updated database api for consistency with other projects.
  • Fixed admin_token with secret parameter.
  • Fixed deprecated catalog driver.

4.0.0

  • Stable Icehouse release.
  • Added template_file parameter to specify catalog.
  • Added keystone::config to handle additional custom options.
  • Added notification parameters.
  • Added support for puppetlabs-mysql 2.2 and greater.
  • Fixed deprecated sql section header in keystone.conf.
  • Fixed deprecated bind_host parameter.
  • Fixed example for native type keystone_service.
  • Fixed LDAP module bugs.
  • Fixed variable for host_access dependency.
  • Reduced default token duration to one hour.

3.2.0

  • Added ability to configure any catalog driver.
  • Ensures log_file is absent when using syslog.

3.1.1

  • Fixed inconsistent variable for mysql allowed hosts.

3.1.0

  • Added ability to disable pki_setup.
  • Load tenant un-lazily if needed.
  • Add log_dir param, with option to disable.
  • Updated endpoint argument.
  • Added support to enable SSL.
  • Removes setting of Keystone endpoint by default.
  • Relaxed regex when keystone refuses connections.

3.0.0

  • Major release for OpenStack Havana.
  • Fixed duplicated keystone endpoints.
  • Refactored keystone_endpoint to use prefetch and flush paradigm.
  • Switched from signing/format to token/provider.
  • Created memcache_servers option to allow for multiple cache servers.
  • Enabled serving Keystone from Apache mod_wsgi.
  • Moved db_sync to its own class.
  • Removed creation of Member role.
  • Improved performance of Keystone providers.
  • Updated endpoints to support paths and ssl.
  • Added support for token expiration parameter.

2.2.0

  • Optimized tenant and user queries.
  • Added syslog support.
  • Added support for token driver backend.
  • Various bug and lint fixes.

2.1.0

  • Tracks release of puppet-quantum
  • Fixed allowed_hosts contitional statement
  • Pinned depedencies
  • Select keystone endpoint based on SSL setting
  • Improved tenant_hash usage in keystone_tenant
  • Various cleanup and bug fixes.

2.0.0

  • Upstream is now part of stackfoge.
  • keystone_user can be used to change passwords.
  • service tenant name now configurable.
  • keystone_user is now idempotent.
  • Various cleanups and bug fixes.