]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/keystone/README.md
try with modules from master
[dsa-puppet.git] / 3rdparty / modules / keystone / README.md
1 keystone
2 =======
3
4 5.1.0 - 2014.2 - Juno
5
6 #### Table of Contents
7
8 1. [Overview - What is the keystone module?](#overview)
9 2. [Module Description - What does the module do?](#module-description)
10 3. [Setup - The basics of getting started with keystone](#setup)
11 4. [Implementation - An under-the-hood peek at what the module is doing](#implementation)
12 5. [Limitations - OS compatibility, etc.](#limitations)
13 6. [Development - Guide for contributing to the module](#development)
14 7. [Contributors - Those with commits](#contributors)
15
16 Overview
17 --------
18
19 The keystone module is a part of [OpenStack](https://github.com/openstack), an effort by the Openstack infrastructure team to provide continuous integration testing and code review for Openstack and Openstack community projects as part of the core software.  The module its self is used to flexibly configure and manage the identify service for Openstack.
20
21 Module Description
22 ------------------
23
24 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.
25
26 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](https://github.com/stackfoge/puppet-openstack).
27
28 Setup
29 -----
30
31 **What the keystone module affects**
32
33 * keystone, the identify service for Openstack.
34
35 ### Installing keystone
36
37     example% puppet module install puppetlabs/keystone
38
39 ### Beginning with keystone
40
41 To utilize the keystone module's functionality you will need to declare multiple resources.  The following is a modified excerpt from the [openstack module](https://github.com/stackfoge/puppet-openstack).  This is not an exhaustive list of all the components needed, we recommend you consult and understand the [openstack module](https://github.com/stackforge/puppet-openstack) and the [core openstack](http://docs.openstack.org) documentation.
42
43 **Define a keystone node**
44
45 ```puppet
46 class { 'keystone':
47   verbose             => True,
48   catalog_type        => 'sql',
49   admin_token         => 'random_uuid',
50   database_connection => 'mysql://keystone_admin:super_secret_db_password@openstack-controller.example.com/keystone',
51 }
52
53 # Adds the admin credential to keystone.
54 class { 'keystone::roles::admin':
55   email        => 'admin@example.com',
56   password     => 'super_secret',
57 }
58
59 # Installs the service user endpoint.
60 class { 'keystone::endpoint':
61   public_url   => 'http://10.16.0.101:5000/v2.0',
62   admin_url    => 'http://10.16.1.101:35357/v2.0',
63   internal_url => 'http://10.16.2.101:5000/v2.0',
64   region       => 'example-1',
65 }
66 ```
67
68 **Leveraging the Native Types**
69
70 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.
71
72 ```puppet
73 keystone_tenant { 'openstack':
74   ensure  => present,
75   enabled => True,
76 }
77 keystone_user { 'openstack':
78   ensure  => present,
79   enabled => True,
80 }
81 keystone_role { 'admin':
82   ensure => present,
83 }
84 keystone_user_role { 'admin@openstack':
85   roles => ['admin', 'superawesomedude'],
86   ensure => present
87 }
88 ```
89
90 These two will seldom be used outside openstack related classes, like nova or cinder.  These are modified examples form Class['nova::keystone::auth'].
91
92 ```puppet
93 # Setup the nova keystone service
94 keystone_service { 'nova':
95   ensure      => present,
96   type        => 'compute',
97   description => 'Openstack Compute Service',
98 }
99
100 # Setup nova keystone endpoint
101 keystone_endpoint { 'example-1-west/nova':
102    ensure       => present,
103    public_url   => "http://127.0.0.1:8774/v2/%(tenant_id)s",
104    admin_url    => "http://127.0.0.1:8774/v2/%(tenant_id)s",
105    internal_url => "http://127.0.0.1:8774/v2/%(tenant_id)s",
106 }
107 ```
108
109 **Setting up a database for keystone**
110
111 A keystone database can be configured separately from the keystone services.
112
113 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.
114
115 * For mysql
116
117 ```puppet
118 class { 'mysql::server': }
119
120 class { 'keystone::db::mysql':
121   password      => 'super_secret_db_password',
122   allowed_hosts => '%',
123 }
124 ```
125
126 * For postgresql
127
128 ```puppet
129 class { 'postgresql::server': }
130
131 class { 'keystone::db::postgresql': password => 'super_secret_db_password', }
132 ```
133
134 Implementation
135 --------------
136
137 ### keystone
138
139 keystone is a combination of Puppet manifest and ruby code to delivery configuration and extra functionality through types and providers.
140
141 Limitations
142 ------------
143
144 * All the keystone types use the CLI tools and so need to be ran on the keystone node.
145
146 ### Upgrade warning
147
148 * 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.
149
150 Beaker-Rspec
151 ------------
152
153 This module has beaker-rspec tests
154
155 To run:
156
157 ``shell
158 bundle install
159 bundle exec rspec spec/acceptance
160 ``
161
162 Development
163 -----------
164
165 Developer documentation for the entire puppet-openstack project.
166
167 * https://wiki.openstack.org/wiki/Puppet-openstack#Developer_documentation
168
169 Contributors
170 ------------
171
172 * https://github.com/openstack/puppet-keystone/graphs/contributors