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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
# File 'manifests/profile/base/nova/api.pp', line 61
class tripleo::profile::base::nova::api (
$bootstrap_node = lookup('nova_api_short_bootstrap_node_name', undef, undef, undef),
$certificates_specs = lookup('apache_certificates_specs', undef, undef, {}),
$enable_internal_tls = lookup('enable_internal_tls', undef, undef, false),
$nova_api_network = lookup('nova_api_network', undef, undef, undef),
$step = Integer(lookup('step')),
$nova_enable_db_archive = lookup('nova_enable_db_archive', undef, undef, true),
$nova_enable_db_purge = lookup('nova_enable_db_purge', undef, undef, true),
$configure_apache = lookup('configure_apache', undef, undef, true),
) {
if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
$sync_db = true
} else {
$sync_db = false
}
include tripleo::profile::base::nova
include tripleo::profile::base::nova::authtoken
if $step >= 4 or ($step >= 3 and $sync_db) {
class { 'nova::api':
sync_db => $sync_db,
sync_db_api => $sync_db,
nova_metadata_wsgi_enabled => true
}
include nova::cors
include nova::quota
include nova::keystone
include nova::network::neutron
include nova::pci
include nova::vendordata
}
if $enable_internal_tls {
if !$nova_api_network {
fail('nova_api_network is not set in the hieradata.')
}
$tls_certfile = $certificates_specs["httpd-${nova_api_network}"]['service_certificate']
$tls_keyfile = $certificates_specs["httpd-${nova_api_network}"]['service_key']
} else {
$tls_certfile = undef
$tls_keyfile = undef
}
if $step >= 4 or ($step >= 3 and $sync_db) {
if $configure_apache {
include tripleo::profile::base::apache
class { 'nova::wsgi::apache_api':
ssl_cert => $tls_certfile,
ssl_key => $tls_keyfile,
}
}
}
if $step >= 5 {
if $nova_enable_db_archive {
include nova::cron::archive_deleted_rows
if $nova_enable_db_purge {
include nova::cron::purge_shadow_tables
}
}
}
}
|