Add customization for wsgi process display name
Change-Id: I86495b73f386ff69bacd972947d702ea6861f94c Related-Bug: #1626550
This commit is contained in:
parent
2025907cc5
commit
29e54fbb8d
@ -58,6 +58,10 @@
|
||||
# (Optional) The number of threads for the vhost.
|
||||
# Defaults to $::os_workers.
|
||||
#
|
||||
# [*wsgi_process_display_name*]
|
||||
# (optional) Name of the WSGI process display-name.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*ssl_cert*]
|
||||
# [*ssl_key*]
|
||||
# [*ssl_chain*]
|
||||
@ -79,21 +83,22 @@
|
||||
# class { 'ceilometer::wsgi::apache': }
|
||||
#
|
||||
class ceilometer::wsgi::apache (
|
||||
$servername = $::fqdn,
|
||||
$port = 8777,
|
||||
$bind_host = undef,
|
||||
$path = '/',
|
||||
$ssl = true,
|
||||
$workers = 1,
|
||||
$ssl_cert = undef,
|
||||
$ssl_key = undef,
|
||||
$ssl_chain = undef,
|
||||
$ssl_ca = undef,
|
||||
$ssl_crl_path = undef,
|
||||
$ssl_crl = undef,
|
||||
$ssl_certs_dir = undef,
|
||||
$threads = $::os_workers,
|
||||
$priority = '10',
|
||||
$servername = $::fqdn,
|
||||
$port = 8777,
|
||||
$bind_host = undef,
|
||||
$path = '/',
|
||||
$ssl = true,
|
||||
$workers = 1,
|
||||
$ssl_cert = undef,
|
||||
$ssl_key = undef,
|
||||
$ssl_chain = undef,
|
||||
$ssl_ca = undef,
|
||||
$ssl_crl_path = undef,
|
||||
$ssl_crl = undef,
|
||||
$ssl_certs_dir = undef,
|
||||
$wsgi_process_display_name = undef,
|
||||
$threads = $::os_workers,
|
||||
$priority = '10',
|
||||
) {
|
||||
|
||||
include ::ceilometer::deps
|
||||
@ -105,27 +110,28 @@ class ceilometer::wsgi::apache (
|
||||
}
|
||||
|
||||
::openstacklib::wsgi::apache { 'ceilometer_wsgi':
|
||||
bind_host => $bind_host,
|
||||
bind_port => $port,
|
||||
group => 'ceilometer',
|
||||
path => $path,
|
||||
priority => $priority,
|
||||
servername => $servername,
|
||||
ssl => $ssl,
|
||||
ssl_ca => $ssl_ca,
|
||||
ssl_cert => $ssl_cert,
|
||||
ssl_certs_dir => $ssl_certs_dir,
|
||||
ssl_chain => $ssl_chain,
|
||||
ssl_crl => $ssl_crl,
|
||||
ssl_crl_path => $ssl_crl_path,
|
||||
ssl_key => $ssl_key,
|
||||
threads => $threads,
|
||||
user => 'ceilometer',
|
||||
workers => $workers,
|
||||
wsgi_daemon_process => 'ceilometer',
|
||||
wsgi_process_group => 'ceilometer',
|
||||
wsgi_script_dir => $::ceilometer::params::ceilometer_wsgi_script_path,
|
||||
wsgi_script_file => 'app',
|
||||
wsgi_script_source => $::ceilometer::params::ceilometer_wsgi_script_source,
|
||||
bind_host => $bind_host,
|
||||
bind_port => $port,
|
||||
group => 'ceilometer',
|
||||
path => $path,
|
||||
priority => $priority,
|
||||
servername => $servername,
|
||||
ssl => $ssl,
|
||||
ssl_ca => $ssl_ca,
|
||||
ssl_cert => $ssl_cert,
|
||||
ssl_certs_dir => $ssl_certs_dir,
|
||||
ssl_chain => $ssl_chain,
|
||||
ssl_crl => $ssl_crl,
|
||||
ssl_crl_path => $ssl_crl_path,
|
||||
ssl_key => $ssl_key,
|
||||
threads => $threads,
|
||||
user => 'ceilometer',
|
||||
workers => $workers,
|
||||
wsgi_daemon_process => 'ceilometer',
|
||||
wsgi_process_display_name => $wsgi_process_display_name,
|
||||
wsgi_process_group => 'ceilometer',
|
||||
wsgi_script_dir => $::ceilometer::params::ceilometer_wsgi_script_path,
|
||||
wsgi_script_file => 'app',
|
||||
wsgi_script_source => $::ceilometer::params::ceilometer_wsgi_script_source,
|
||||
}
|
||||
}
|
||||
|
@ -49,6 +49,13 @@ describe 'ceilometer::wsgi::apache' do
|
||||
'docroot_group' => 'ceilometer',
|
||||
'ssl' => 'true',
|
||||
'wsgi_daemon_process' => 'ceilometer',
|
||||
'wsgi_daemon_process_options' => {
|
||||
'user' => 'ceilometer',
|
||||
'group' => 'ceilometer',
|
||||
'processes' => 1,
|
||||
'threads' => "#{global_facts[:os_workers]}",
|
||||
'display-name' => 'ceilometer_wsgi',
|
||||
},
|
||||
'wsgi_process_group' => 'ceilometer',
|
||||
'wsgi_script_aliases' => { '/' => "#{platform_parameters[:wsgi_script_path]}/app" },
|
||||
'require' => 'File[ceilometer_wsgi]'
|
||||
@ -59,11 +66,12 @@ describe 'ceilometer::wsgi::apache' do
|
||||
describe 'when overriding parameters using different ports' do
|
||||
let :params do
|
||||
{
|
||||
:servername => 'dummy.host',
|
||||
:bind_host => '10.42.51.1',
|
||||
:port => 12345,
|
||||
:ssl => false,
|
||||
:workers => 37,
|
||||
:servername => 'dummy.host',
|
||||
:bind_host => '10.42.51.1',
|
||||
:port => 12345,
|
||||
:ssl => false,
|
||||
:wsgi_process_display_name => 'ceilometer',
|
||||
:workers => 37,
|
||||
}
|
||||
end
|
||||
|
||||
@ -76,6 +84,13 @@ describe 'ceilometer::wsgi::apache' do
|
||||
'docroot_group' => 'ceilometer',
|
||||
'ssl' => 'false',
|
||||
'wsgi_daemon_process' => 'ceilometer',
|
||||
'wsgi_daemon_process_options' => {
|
||||
'user' => 'ceilometer',
|
||||
'group' => 'ceilometer',
|
||||
'processes' => '37',
|
||||
'threads' => "#{global_facts[:os_workers]}",
|
||||
'display-name' => 'ceilometer',
|
||||
},
|
||||
'wsgi_process_group' => 'ceilometer',
|
||||
'wsgi_script_aliases' => { '/' => "#{platform_parameters[:wsgi_script_path]}/app" },
|
||||
'require' => 'File[ceilometer_wsgi]'
|
||||
@ -91,7 +106,9 @@ describe 'ceilometer::wsgi::apache' do
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts({
|
||||
:fqdn => 'some.host.tld'
|
||||
:os_workers => 8,
|
||||
:concat_basedir => '/var/lib/puppet/concat',
|
||||
:fqdn => 'some.host.tld'
|
||||
}))
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user