Puppet: lots of fixes & improvements
- resource_provider became a general provider for git/zip/whatever data - library-puppet is used to install & manage all dependencies - keystone_puppet resource is added, with manifests from openstack git
This commit is contained in:
parent
96066f652c
commit
ccaadaf5f7
4
resources/keystone_puppet/actions/remove.pp
Normal file
4
resources/keystone_puppet/actions/remove.pp
Normal file
@ -0,0 +1,4 @@
|
||||
class {'keystone':
|
||||
admin_token => '{{ admin_token }}',
|
||||
package_ensure => 'absent'
|
||||
}
|
25
resources/keystone_puppet/actions/run.pp
Normal file
25
resources/keystone_puppet/actions/run.pp
Normal file
@ -0,0 +1,25 @@
|
||||
$resource = hiera('{{ resource_name }}')
|
||||
|
||||
$ip = $resource['input']['ip']['value']
|
||||
$admin_token = $resource['input']['admin_token']['value']
|
||||
$db_user = $resource['input']['db_user']['value']
|
||||
$db_password = $resource['input']['db_password']['value']
|
||||
$db_name = $resource['input']['db_name']['value']
|
||||
$admin_port = $resource['input']['admin_port']['value']
|
||||
$port = $resource['input']['port']['value']
|
||||
|
||||
class {'keystone':
|
||||
package_ensure => 'present',
|
||||
verbose => True,
|
||||
catalog_type => 'sql',
|
||||
admin_token => $admin_token,
|
||||
database_connection => "mysql://$db_user:$db_password@$ip/$db_name",
|
||||
public_port => "$port",
|
||||
token_driver => 'keystone.token.backends.kvs.Token'
|
||||
}
|
||||
|
||||
#file { '/etc/keystone/keystone-exports':
|
||||
# owner => 'root',
|
||||
# group => 'root',
|
||||
# content => template('keystone/exports.erb')
|
||||
#}
|
7
resources/keystone_puppet/actions/update.pp
Normal file
7
resources/keystone_puppet/actions/update.pp
Normal file
@ -0,0 +1,7 @@
|
||||
class {'keystone':
|
||||
verbose => True,
|
||||
catalog_type => 'sql',
|
||||
admin_token => '{{ admin_token }}',
|
||||
sql_connection => 'mysql://{{ db_user }}:{{ db_password }}@{{ ip }}/{{ db_name }}',
|
||||
public_port => '{{ port }}'
|
||||
}
|
44
resources/keystone_puppet/meta.yaml
Normal file
44
resources/keystone_puppet/meta.yaml
Normal file
@ -0,0 +1,44 @@
|
||||
id: keystone_puppet
|
||||
handler: puppet
|
||||
puppet_module: keystone
|
||||
version: 1.0.0
|
||||
input:
|
||||
admin_token:
|
||||
schema: str!
|
||||
value: admin_token
|
||||
db_user:
|
||||
schema: str!
|
||||
value: keystone
|
||||
db_password:
|
||||
schema: str!
|
||||
value: keystone
|
||||
db_name:
|
||||
schema: str!
|
||||
value: keystone
|
||||
|
||||
admin_port:
|
||||
schema: int!
|
||||
value: 35357
|
||||
port:
|
||||
schema: int!
|
||||
value: 5000
|
||||
|
||||
git:
|
||||
schema: {repository: str!, branch: str!}
|
||||
value: {repository: 'https://github.com/openstack/puppet-keystone', branch: 'stable/juno'}
|
||||
|
||||
# forge:
|
||||
# schema: str!
|
||||
# value: 'stackforge-keystone'
|
||||
|
||||
ip:
|
||||
schema: str!
|
||||
value:
|
||||
ssh_key:
|
||||
schema: str!
|
||||
value:
|
||||
ssh_user:
|
||||
schema: str!
|
||||
value:
|
||||
|
||||
tags: [resource/keystone_service, resources/keystone]
|
Loading…
Reference in New Issue
Block a user