OpenStack Keystone Puppet Module
Go to file
Jeremy Stanley 0019e917ce Update .gitreview file for project rename
Change-Id: I4ae432149d97cd723e874a65c864891e3f4024e9
2015-06-13 00:53:51 +00:00
ext level up keystone testing script 2013-01-11 16:01:48 -08:00
lib/puppet Refactor keystone_user_role to be lazier 2014-01-07 14:10:17 -05:00
manifests Add syslog support to the keystone module 2013-09-04 15:28:21 +02:00
spec Fix duplicated keystone endpoints 2013-10-23 12:42:20 -04:00
tests Prepare repository for a Puppet Forge release 2013-06-17 17:05:47 -07:00
.fixtures.yml pin to posgresql 2.5 module 2013-09-20 19:22:20 -07:00
.gitignore added pkg to .gitignore 2012-11-02 12:28:28 -07:00
.gitreview Update .gitreview file for project rename 2015-06-13 00:53:51 +00:00
Gemfile Add puppet-lint to Gemfile 2013-05-21 19:39:31 -04:00
LICENSE Added explicit license 2012-08-23 15:00:52 -07:00
Modulefile Preparing for 2.2.0 release. 2013-10-08 14:03:30 -07:00
README.md Preparing for 2.2.0 release. 2013-10-08 14:03:30 -07:00
Rakefile Fail puppet-lint on warnings 2013-08-28 18:01:50 -04:00

README.md

keystone

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:secret_identity_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

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.