/
heat.pp
86 lines (75 loc) · 3.71 KB
/
heat.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# == Class: contrail::profile::openstack::heat
# The puppet module to set up openstack::heat for contrail
#
#
class contrail::profile::openstack::heat (
$heat_auth_encryption_key = $::openstack::config::heat_encryption_key
) {
openstack::resources::database { 'heat': }
$controller_management_address = $::openstack::config::controller_address_management
$openstack_rabbit_servers = $::contrail::params::openstack_rabbit_servers
$internal_vip = $::contrail::params::internal_vip
if ($internal_vip != '' and $internal_vip != undef) {
$heat_api_bind_host = '0.0.0.0'
$heat_api_bind_port = '8005'
$heat_api_cfn_bind_host = '0.0.0.0'
$heat_api_cfn_bind_port = '8001'
}
else {
$heat_api_bind_host = $::openstack::config::controller_address_api
$heat_api_bind_port = '8004'
$heat_api_cfn_bind_host = $::openstack::config::controller_address_api
$heat_api_cfn_bind_port = '8000'
}
class { '::heat::keystone::auth':
password => $::openstack::config::heat_password,
public_address => $::openstack::config::controller_address_api,
admin_address => $::openstack::config::controller_address_management,
internal_address => $::openstack::config::controller_address_management,
region => $::openstack::config::region,
}
class { '::heat::keystone::auth_cfn':
password => $::openstack::config::heat_password,
public_address => $::openstack::config::controller_address_api,
admin_address => $::openstack::config::controller_address_management,
internal_address => $::openstack::config::controller_address_management,
region => $::openstack::config::region,
}
class { '::heat':
sql_connection => $::openstack::resources::connectors::heat,
rabbit_hosts => $openstack_rabbit_servers,
rabbit_userid => $::openstack::config::rabbitmq_user,
rabbit_password => $::openstack::config::rabbitmq_password,
debug => $::openstack::config::debug,
verbose => $::openstack::config::verbose,
keystone_host => $::openstack::config::controller_address_management,
keystone_password => $::openstack::config::heat_password,
mysql_module => '2.2',
}
class { '::heat::api':
bind_host => $heat_api_bind_host,
bind_port => $heat_api_bind_port,
}
class { '::heat::api_cfn':
bind_host => $heat_api_cfn_bind_host,
bind_port => $heat_api_cfn_bind_port,
}
class { '::heat::engine':
auth_encryption_key => $heat_auth_encryption_key
}
$contrail_api_server = $::contrail::params::config_ip_to_use
heat_config {
'DEFAULT/plugin_dirs': value => "${::python_dist}/vnc_api/gen/heat/resources,${::python_dist}/contrail_heat/resources";
'clients_contrail/user': value => 'admin';
'clients_contrail/password': value => 'contrail123';
'clients_contrail/tenent': value => 'admin';
'clients_contrail/api_server': value => $contrail_api_server;
'clients_contrail/api_base_url': value => '/';
}
notify { "contrail::profile::openstack::heat - heat_api_bind_host = ${heat_api_bind_host}":; }
notify { "contrail::profile::openstack::heat - heat_api_bind_port = ${heat_api_bind_port}":; }
notify { "contrail::profile::openstack::heat - sql_connection = ${::openstack::resources::connectors::heat}":; }
notify { "contrail::profile::openstack::heat - rabbit_hosts = ${openstack_rabbit_servers}":; }
notify { "contrail::profile::openstack::heat - contrail_api_server = ${contrail_api_server}":; }
notify { "contrail::profile::openstack::heat - keystone_auth_public_url = ${::heat::keystone::auth::public_url}":; }
}