Add Heat APIs
Add support for native Heat, CloudFormation, and CloudWatch APIs.
This commit is contained in:
parent
2c2c8653cb
commit
88f92f9b9e
45
manifests/heat/api.pp
Normal file
45
manifests/heat/api.pp
Normal file
@ -0,0 +1,45 @@
|
||||
class kickstack::heat::api inherits kickstack {
|
||||
|
||||
include pwgen
|
||||
include ::kickstack::heat::config
|
||||
|
||||
$apis = split($::kickstack::heat_apis,',')
|
||||
|
||||
if 'heat' in $apis {
|
||||
$heat_admin_password = pick(getvar("${fact_prefix}heat_keystone_password"),pwgen())
|
||||
class { '::heat::api':
|
||||
enabled => true,
|
||||
}
|
||||
|
||||
kickstack::endpoint { 'heat':
|
||||
service_password => $heat_admin_password,
|
||||
require => Class['::heat::api']
|
||||
}
|
||||
}
|
||||
|
||||
if 'cfn' in $apis {
|
||||
$cfn_admin_password = pick(getvar("${fact_prefix}heat_cfn_keystone_password"),pwgen())
|
||||
|
||||
class { '::heat::api_cfn':
|
||||
enabled => true,
|
||||
}
|
||||
|
||||
kickstack::endpoint { 'heat_cfn':
|
||||
servicename => 'heat',
|
||||
classname => 'auth_cfn',
|
||||
factname => "heat_cfn_keystone_password",
|
||||
service_password => $cfn_admin_password,
|
||||
require => Class['::heat::api_cfn']
|
||||
}
|
||||
}
|
||||
|
||||
if 'cloudwatch' in $apis {
|
||||
class { '::heat::api_cloudwatch':
|
||||
enabled => true,
|
||||
}
|
||||
|
||||
# The puppet-heat module has no facility for setting up the
|
||||
# CloudWatch Keystone endpoint.
|
||||
}
|
||||
|
||||
}
|
52
manifests/heat/config.pp
Normal file
52
manifests/heat/config.pp
Normal file
@ -0,0 +1,52 @@
|
||||
class kickstack::heat::config inherits kickstack {
|
||||
include pwgen
|
||||
|
||||
$admin_password = getvar("${fact_prefix}heat_keystone_password")
|
||||
$auth_host = getvar("${fact_prefix}keystone_internal_address")
|
||||
$auth_uri = "http://${auth_host}:5000/v2.0"
|
||||
|
||||
$sql_conn = getvar("${fact_prefix}heat_sql_connection")
|
||||
|
||||
case "$::kickstack::rpc" {
|
||||
'rabbitmq': {
|
||||
$rabbit_host = getvar("${::kickstack::fact_prefix}rabbit_host")
|
||||
$rabbit_password = getvar("${fact_prefix}rabbit_password")
|
||||
class { '::heat':
|
||||
package_ensure => $::kickstack::package_version,
|
||||
auth_uri => $auth_uri,
|
||||
sql_connection => $sql_conn,
|
||||
rpc_backend => 'heat.openstack.common.rpc.impl_kombu',
|
||||
rabbit_host => $rabbit_host,
|
||||
rabbit_password => $rabbit_password,
|
||||
rabbit_virtualhost => $::kickstack::rabbit_virtual_host,
|
||||
rabbit_userid => $::kickstack::rabbit_userid,
|
||||
keystone_host => $auth_host,
|
||||
keystone_tenant => $kickstack::keystone_service_tenant,
|
||||
keystone_user => 'heat',
|
||||
keystone_password => $admin_password,
|
||||
verbose => $::kickstack::verbose,
|
||||
debug => $::kickstack::debug,
|
||||
}
|
||||
}
|
||||
'qpid': {
|
||||
$qpid_hostname = getvar("${::kickstack::fact_prefix}qpid_hostname")
|
||||
$qpid_password = getvar("${fact_prefix}qpid_password")
|
||||
class { '::heat':
|
||||
package_ensure => $::kickstack::package_version,
|
||||
sql_connection => $sql_conn,
|
||||
auth_uri => $auth_uri,
|
||||
rpc_backend => 'heat.openstack.common.rpc.impl_qpid',
|
||||
qpid_hostname => $qpid_hostname,
|
||||
qpid_password => $qpid_password,
|
||||
qpid_realm => $::kickstack::qpid_realm,
|
||||
qpid_user => $::kickstack::qpid_user,
|
||||
keystone_host => $auth_host,
|
||||
keystone_tenant => $kickstack::keystone_service_tenant,
|
||||
keystone_user => 'heat',
|
||||
keystone_password => $admin_password,
|
||||
verbose => $::kickstack::verbose,
|
||||
debug => $::kickstack::debug,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -45,4 +45,8 @@ class kickstack::node::api inherits kickstack {
|
||||
include kickstack::nova::neutronclient
|
||||
}
|
||||
}
|
||||
|
||||
if $keystone_internal_address and $heat_sql_conn and $amqp_host and $amqp_password {
|
||||
include kickstack::heat::api
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user