Update Heat API manifest
This commit is contained in:
parent
90257778a3
commit
57a4863a0b
|
@ -1,4 +1,4 @@
|
|||
# Installs & configure the heat CloudFormation api service
|
||||
# Installs & configure the heat API service
|
||||
#
|
||||
# == Parameters
|
||||
# [*enabled*]
|
||||
|
@ -22,7 +22,7 @@
|
|||
# [*keystone_password*] password to authenticate with
|
||||
# Mandatory.
|
||||
#
|
||||
class heat::api-cloudwatch (
|
||||
class heat::api (
|
||||
$enabled = true,
|
||||
$keystone_host = '127.0.0.1',
|
||||
$keystone_port = '35357',
|
||||
|
@ -30,17 +30,19 @@ class heat::api-cloudwatch (
|
|||
$keystone_user = 'heat',
|
||||
$keystone_tenant = 'services',
|
||||
$keystone_password = false,
|
||||
$keystone_ec2_uri = 'http://127.0.0.1:5000/v2.0/ec2tokens',
|
||||
$auth_uri = 'http://127.0.0.1:5000/v2.0',
|
||||
) {
|
||||
|
||||
include heat::params
|
||||
|
||||
validate_string($keystone_password)
|
||||
|
||||
heat_api_cloudwatch_config<||> ~> Service['heat-api-cloudwatch']
|
||||
heat_api_config<||> ~> Service['heat-api']
|
||||
|
||||
Package['heat-api-cloudwatch'] -> heat_api_cloudwatch_config<||>
|
||||
Package['heat-api-cloudwatch'] -> Service['heat-api-cloudwatch']
|
||||
package { 'heat-api-cloudwatch':
|
||||
Package['heat-api'] -> heat_api_config<||>
|
||||
Package['heat-api'] -> Service['heat-api']
|
||||
package { 'heat-api':
|
||||
ensure => installed,
|
||||
name => $::heat::params::api_package_name,
|
||||
}
|
||||
|
@ -51,29 +53,29 @@ class heat::api-cloudwatch (
|
|||
$service_ensure = 'stopped'
|
||||
}
|
||||
|
||||
Package['heat-common'] -> Service['heat-api-cloudwatch']
|
||||
Package['heat-common'] -> Service['heat-api']
|
||||
|
||||
if $rabbit_hosts {
|
||||
heat_api_cloudwatch_config { 'DEFAULT/rabbit_host': ensure => absent }
|
||||
heat_api_cloudwatch_config { 'DEFAULT/rabbit_port': ensure => absent }
|
||||
heat_api_cloudwatch_config { 'DEFAULT/rabbit_hosts':
|
||||
heat_api_config { 'DEFAULT/rabbit_host': ensure => absent }
|
||||
heat_api_config { 'DEFAULT/rabbit_port': ensure => absent }
|
||||
heat_api_config { 'DEFAULT/rabbit_hosts':
|
||||
value => join($rabbit_hosts, ',')
|
||||
}
|
||||
} else {
|
||||
heat_api_cloudwatch_config { 'DEFAULT/rabbit_host': value => $rabbit_host }
|
||||
heat_api_cloudwatch_config { 'DEFAULT/rabbit_port': value => $rabbit_port }
|
||||
heat_api_cloudwatch_config { 'DEFAULT/rabbit_hosts':
|
||||
heat_api_config { 'DEFAULT/rabbit_host': value => $rabbit_host }
|
||||
heat_api_config { 'DEFAULT/rabbit_port': value => $rabbit_port }
|
||||
heat_api_config { 'DEFAULT/rabbit_hosts':
|
||||
value => "${rabbit_host}:${rabbit_port}"
|
||||
}
|
||||
}
|
||||
|
||||
if size($rabbit_hosts) > 1 {
|
||||
heat_api_cloudwatch_config { 'DEFAULT/rabbit_ha_queues': value => true }
|
||||
heat_api_config { 'DEFAULT/rabbit_ha_queues': value => true }
|
||||
} else {
|
||||
heat_api_cloudwatch_config { 'DEFAULT/rabbit_ha_queues': value => false }
|
||||
heat_api_config { 'DEFAULT/rabbit_ha_queues': value => false }
|
||||
}
|
||||
|
||||
service { 'heat-api-cloudwatch':
|
||||
service { 'heat-api':
|
||||
ensure => $service_ensure,
|
||||
name => $::heat::params::api_service_name,
|
||||
enable => $enabled,
|
||||
|
@ -83,13 +85,15 @@ class heat::api-cloudwatch (
|
|||
subscribe => Exec['heat-dbsync']
|
||||
}
|
||||
|
||||
heat_api_cloudwatch_config {
|
||||
heat_api_config {
|
||||
'DEFAULT/rabbit_userid' : value => $rabbit_userid;
|
||||
'DEFAULT/rabbit_password' : value => $rabbit_password;
|
||||
'DEFAULT/rabbit_virtualhost' : value => $rabbit_virtualhost;
|
||||
'DEFAULT/debug' : value => $debug;
|
||||
'DEFAULT/verbose' : value => $verbose;
|
||||
'DEFAULT/log_dir' : value => $::heat::params::log_dir;
|
||||
'ec2authtoken/keystone_ec2_uri' : value => $keystone_ec2_uri;
|
||||
'ec2authtoken/auth_uri' : value => $auth_uri;
|
||||
'keystone_authtoken/auth_host' : value => $keystone_host;
|
||||
'keystone_authtoken/auth_port' : value => $keystone_port;
|
||||
'keystone_authtoken/auth_protocol' : value => $keystone_protocol;
|
||||
|
|
Loading…
Reference in New Issue