puppet-murano/manifests/cfapi.pp
Nikolay Starodubtsev c4fc5b2dd5 Switch murano to use keystone API v3 by default
Murano has been supported keystone v3 for a while, and community
decide to make it a default authentication method. Murano itself has
enchancements which provide it a possibility to use admin_user,
admin_tenant and admin_password instead of username, project and
password. These enchancements also makes parameters as domain_* and
keystone_auth_plugin unnescessary.

Change-Id: I198f0388764605083e9272645d2b9cffd6fe5cfa
2016-03-04 15:02:27 +03:00

82 lines
1.9 KiB
Puppet

# == Class: murano::cfapi
#
# murano service broker package & service
#
# === Parameters
#
# [*manage_service*]
# (Optional) Whether the service should be managed by Puppet
# Defaults to true
#
# [*enabled*]
# (Optional) Should the service be enabled
# Defaults to true
#
# [*package_ensure*]
# (Optional) Ensure state for package
# Defaults to 'present'
#
# [*tenant*]
# (Required) Tenant for cloudfoundry api
#
# [*bind_host*]
# (Optional) Host on which murano cloudfoundry api should listen
# Defaults to $::os_service_default.
#
# [*bind_port*]
# (Optional) Port on which murano cloudfoundry api should listen
# Defaults to $::os_service_default.
#
# [*auth_url*]
# (Optional) Public identity endpoint
# Defaults to 'http://127.0.0.1:5000'.
#
class murano::cfapi(
$tenant,
$manage_service = true,
$enabled = true,
$package_ensure = 'present',
$bind_host = $::os_service_default,
$bind_port = $::os_service_default,
$auth_url = 'http://127.0.0.1:5000',
) {
include ::murano::params
include ::murano::policy
Murano_config<||> ~> Service['murano-cfapi']
Class['murano::policy'] -> Service['murano-cfapi']
if $manage_service {
if $enabled {
$service_ensure = 'running'
} else {
$service_ensure = 'stopped'
}
}
murano_config {
'cfapi/tenant': value => $tenant;
'cfapi/bind_host': value => $bind_host;
'cfapi/bind_port': value => $bind_port;
'cfapi/auth_url': value => $auth_url;
}
package { 'murano-cfapi':
ensure => $package_ensure,
name => $::murano::params::cfapi_package_name,
tag => ['openstack', 'murano-package'],
}
service { 'murano-cfapi':
ensure => $service_ensure,
name => $::murano::params::cfapi_service_name,
enable => $enabled,
require => Package['murano-cfapi'],
tag => 'murano-service',
}
Package['murano-cfapi'] ~> Service['murano-cfapi']
Murano_paste_ini_config<||> ~> Service['murano-cfapi']
}