From 46a3d7cb43211f6ab812071c1992a399722b0339 Mon Sep 17 00:00:00 2001 From: Florian Haas Date: Thu, 17 Oct 2013 18:00:18 +0200 Subject: [PATCH] Add Heat engine --- manifests/heat/api.pp | 13 +++++++++++++ manifests/heat/engine.pp | 26 ++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 manifests/heat/engine.pp diff --git a/manifests/heat/api.pp b/manifests/heat/api.pp index 59ffdbd..b1fad6d 100644 --- a/manifests/heat/api.pp +++ b/manifests/heat/api.pp @@ -15,6 +15,13 @@ class kickstack::heat::api inherits kickstack { service_password => $heat_admin_password, require => Class['::heat::api'] } + + kickstack::exportfact::export { 'heat_metadata_server': + value => $hostname, + tag => 'heat', + require => Class['::heat::api'] + } + } if 'cfn' in $apis { @@ -38,6 +45,12 @@ class kickstack::heat::api inherits kickstack { enabled => true, } + kickstack::exportfact::export { 'heat_watch_server': + value => $hostname, + tag => 'heat', + require => Class['::heat::api_cloudwatch'] + } + # The puppet-heat module has no facility for setting up the # CloudWatch Keystone endpoint. } diff --git a/manifests/heat/engine.pp b/manifests/heat/engine.pp new file mode 100644 index 0000000..f5830a2 --- /dev/null +++ b/manifests/heat/engine.pp @@ -0,0 +1,26 @@ +class kickstack::heat::engine inherits kickstack { + + include ::kickstack::heat::config + + $apis = split($::kickstack::heat_apis,',') + + if 'heat' in $apis { + $metadata_server = getvar("${fact_prefix}heat_metadata_server") + $metadata_server_url = "http://${metadata_server}:8000" + $waitcondition_server_url = "http://${metadata_server}:8000/v1/waitcondition" + } + + if 'cloudwatch' in $apis { + $watch_server = getvar("${fact_prefix}heat_watch_server") + $watch_server_url = "http://${watch_server}:8003" + } + + if $apis { + class { '::heat::engine': + heat_metadata_server_url => $metadata_server_url, + heat_waitcondition_server_url => $waitcondition_server_url, + heat_watch_server_url => $watch_server_url, + } + } + +}