For Puppet on Fedora, we have Packstack and The Foreman. But if you are doing development, you need to know what is going on at the nuts and bolts level. I need to do some work on the Puppet modules for Keystone. This is a developers setup, running out of git repositories.
Started by installing a new virtual machine and running yum update. Then, make sure git, puppet and facter are installed:
2 sudo yum install puppet
3 sudo yum install facter
From https://github.com/stackforge/puppet-openstack#setup
2 gem install librarian-puppet
3 librarian-puppet install --path ./
Add in the clones for keystone, mysql, and postgresql.
You can see the additional dependendcies for Keystone in the file keystone.Modulefile
1 dependency 'puppetlabs/inifile', '>=1.0.0 <2.0.0'
2 dependency 'puppetlabs/mysql', '>=0.6.1 <1.0.0'
3 dependency 'puppetlabs/stdlib', '>= 2.5.0'
Get those from Git as well.
I’m going to make one .pp file per thing I need to configure. For mysql:
1 class { 'mysql::server': }
5 password => 'keystone',
For postgresql
01 class { 'postgresql::server':
03 'listen_addresses' => '*',
07 postgresql::db{ 'keystone':
09 password => 'keystone',
These can be applied to your system with:
1 sudo puppet apply ~/mysql.pp
or
1 sudo puppet apply ~/postgresql.pp
To test Mysql
1 mysql -h localhost -u keystone keystone --password=keystone
To test Postgresql
1 psql -h localhost -d keystone -U keystone
Now to set up Keystone. This is a modified version of keystone.pp from openstack-puppet git://github.com/stackforge/puppet-openstack.git openstack
01 class { 'openstack::keystone':
02 db_host => '127.0.0.1',
03 db_password => 'keystone',
04 admin_token => '12345',
05 admin_email => 'keystone@localhost',
06 admin_password => 'keystone',
07 glance_user_password => 'glance',
08 nova_user_password => 'nova',
09 cinder_user_password => 'cinder',
10 neutron_user_password => 'neutron',
11 public_address => '127.0.0.1',
12 internal_address => '127.0.0.1',
13 admin_address => '127.0.0.1',
21 class openstack::keystone (
26 $glance_user_password,
28 $cinder_user_password,
29 $neutron_user_password,
31 $public_protocol = 'http',
32 $db_host = '127.0.0.1',
33 $idle_timeout = '200',
35 $db_user = 'keystone',
36 $db_name = 'keystone',
37 $admin_tenant = 'admin',
40 $bind_host = '0.0.0.0',
41 $region = 'RegionOne',
42 $internal_address = false,
43 $admin_address = false,
48 if $db_type == 'mysql' {
49 $sql_conn ="mysql:// ${db_user}:${db_password}@${db_host}/${db_name}"
51 fail("db_type ${db_type} is not supported")
56 if($internal_address) {
57 $internal_real = $internal_address
59 $internal_real = $public_address
62 $admin_real = $admin_address
64 $admin_real = $internal_real
70 bind_host => $bind_host,
71 idle_timeout => $idle_timeout,
72 catalog_type => 'sql',
73 admin_token => $admin_token,
75 sql_connection => $sql_conn,
80 class { 'keystone::roles::admin':
81 email => $admin_email,
82 password => $admin_password,
83 admin_tenant => $admin_tenant,
87 class { 'keystone::endpoint':
88 public_address => $public_address,
89 public_protocol => $public_protocol,
90 admin_address => $admin_real,
91 internal_address => $internal_real,
run it with
1 sudo puppet apply ~/keystone.pp
Once it runs, test that Keystone is running with: