Add customization for wsgi process display name
Change-Id: I09f96ad4e08c9091ffeb4c850e6ec81baa58a5b5 Related-Bug: #1626550
This commit is contained in:
@@ -57,6 +57,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*]
|
||||
@@ -80,21 +84,22 @@
|
||||
# Note: we can't transform this class in a define for backward compatibility.
|
||||
# though this class might become a define in the future.
|
||||
class nova::wsgi::apache (
|
||||
$servername = $::fqdn,
|
||||
$api_port = 8774,
|
||||
$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,
|
||||
$api_port = 8774,
|
||||
$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 ::nova::params
|
||||
@@ -111,21 +116,22 @@ class nova::wsgi::apache (
|
||||
warning('nova::wsgi::apache is deprecated and will be removed in a future release, please use nova::wsgi::apache::api')
|
||||
|
||||
class { '::nova::wsgi::apache_api':
|
||||
servername => $servername,
|
||||
api_port => $api_port,
|
||||
bind_host => $bind_host,
|
||||
path => $path,
|
||||
ssl => $ssl,
|
||||
workers => $workers,
|
||||
ssl_cert => $ssl_cert,
|
||||
ssl_key => $ssl_key,
|
||||
ssl_chain => $ssl_chain,
|
||||
ssl_ca => $ssl_ca,
|
||||
ssl_crl_path => $ssl_crl_path,
|
||||
ssl_crl => $ssl_crl,
|
||||
ssl_certs_dir => $ssl_certs_dir,
|
||||
threads => $threads,
|
||||
priority => $priority,
|
||||
servername => $servername,
|
||||
api_port => $api_port,
|
||||
bind_host => $bind_host,
|
||||
path => $path,
|
||||
ssl => $ssl,
|
||||
workers => $workers,
|
||||
ssl_cert => $ssl_cert,
|
||||
ssl_key => $ssl_key,
|
||||
ssl_chain => $ssl_chain,
|
||||
ssl_ca => $ssl_ca,
|
||||
ssl_crl_path => $ssl_crl_path,
|
||||
ssl_crl => $ssl_crl,
|
||||
ssl_certs_dir => $ssl_certs_dir,
|
||||
wsgi_process_display_name => $wsgi_process_display_name,
|
||||
threads => $threads,
|
||||
priority => $priority,
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -56,6 +56,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*]
|
||||
@@ -77,21 +81,22 @@
|
||||
# class { 'nova::wsgi::apache': }
|
||||
#
|
||||
class nova::wsgi::apache_api (
|
||||
$servername = $::fqdn,
|
||||
$api_port = 8774,
|
||||
$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,
|
||||
$api_port = 8774,
|
||||
$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 ::nova::params
|
||||
@@ -106,28 +111,29 @@ class nova::wsgi::apache_api (
|
||||
}
|
||||
|
||||
::openstacklib::wsgi::apache { 'nova_api_wsgi':
|
||||
bind_host => $bind_host,
|
||||
bind_port => $api_port,
|
||||
group => 'nova',
|
||||
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 => 'nova',
|
||||
workers => $workers,
|
||||
wsgi_daemon_process => 'nova-api',
|
||||
wsgi_process_group => 'nova-api',
|
||||
wsgi_script_dir => $::nova::params::nova_wsgi_script_path,
|
||||
wsgi_script_file => 'nova-api',
|
||||
wsgi_script_source => $::nova::params::nova_api_wsgi_script_source,
|
||||
bind_host => $bind_host,
|
||||
bind_port => $api_port,
|
||||
group => 'nova',
|
||||
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 => 'nova',
|
||||
workers => $workers,
|
||||
wsgi_daemon_process => 'nova-api',
|
||||
wsgi_process_display_name => $wsgi_process_display_name,
|
||||
wsgi_process_group => 'nova-api',
|
||||
wsgi_script_dir => $::nova::params::nova_wsgi_script_path,
|
||||
wsgi_script_file => 'nova-api',
|
||||
wsgi_script_source => $::nova::params::nova_api_wsgi_script_source,
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -54,6 +54,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
|
||||
#
|
||||
# [*ensure_package*]
|
||||
# (optional) Control the ensure parameter for the Nova Placement API package ressource.
|
||||
# Defaults to 'present'
|
||||
@@ -79,22 +83,23 @@
|
||||
# class { 'nova::wsgi::apache': }
|
||||
#
|
||||
class nova::wsgi::apache_placement (
|
||||
$servername = $::fqdn,
|
||||
$api_port = 8778,
|
||||
$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',
|
||||
$ensure_package = 'present',
|
||||
$servername = $::fqdn,
|
||||
$api_port = 8778,
|
||||
$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',
|
||||
$ensure_package = 'present',
|
||||
) {
|
||||
|
||||
include ::nova::params
|
||||
@@ -117,28 +122,29 @@ class nova::wsgi::apache_placement (
|
||||
Package<| title == 'nova-placement-api'|> -> Package<| title == 'httpd'|>
|
||||
|
||||
::openstacklib::wsgi::apache { 'placement_wsgi':
|
||||
bind_host => $bind_host,
|
||||
bind_port => $api_port,
|
||||
group => 'nova',
|
||||
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 => 'nova',
|
||||
workers => $workers,
|
||||
wsgi_daemon_process => 'placement-api',
|
||||
wsgi_process_group => 'placement-api',
|
||||
wsgi_script_dir => $::nova::params::nova_wsgi_script_path,
|
||||
wsgi_script_file => 'nova-placement-api',
|
||||
wsgi_script_source => $::nova::params::placement_wsgi_script_source,
|
||||
bind_host => $bind_host,
|
||||
bind_port => $api_port,
|
||||
group => 'nova',
|
||||
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 => 'nova',
|
||||
workers => $workers,
|
||||
wsgi_daemon_process => 'placement-api',
|
||||
wsgi_process_display_name => $wsgi_process_display_name,
|
||||
wsgi_process_group => 'placement-api',
|
||||
wsgi_script_dir => $::nova::params::nova_wsgi_script_path,
|
||||
wsgi_script_file => 'nova-placement-api',
|
||||
wsgi_script_source => $::nova::params::placement_wsgi_script_source,
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -65,6 +65,13 @@ describe 'nova::wsgi::apache_api' do
|
||||
'docroot_group' => 'nova',
|
||||
'ssl' => 'true',
|
||||
'wsgi_daemon_process' => 'nova-api',
|
||||
'wsgi_daemon_process_options' => {
|
||||
'user' => 'nova',
|
||||
'group' => 'nova',
|
||||
'processes' => 1,
|
||||
'threads' => '42',
|
||||
'display-name' => 'nova_api_wsgi',
|
||||
},
|
||||
'wsgi_process_group' => 'nova-api',
|
||||
'wsgi_script_aliases' => { '/' => "#{platform_params[:wsgi_script_path]}/nova-api" },
|
||||
'require' => 'File[nova_api_wsgi]'
|
||||
@@ -97,11 +104,12 @@ describe 'nova::wsgi::apache_api' do
|
||||
|
||||
let :params do
|
||||
{
|
||||
:servername => 'dummy.host',
|
||||
:bind_host => '10.42.51.1',
|
||||
:api_port => 12345,
|
||||
:ssl => false,
|
||||
:workers => 37,
|
||||
:servername => 'dummy.host',
|
||||
:bind_host => '10.42.51.1',
|
||||
:api_port => 12345,
|
||||
:ssl => false,
|
||||
:wsgi_process_display_name => 'nova-api',
|
||||
:workers => 37,
|
||||
}
|
||||
end
|
||||
|
||||
@@ -114,6 +122,13 @@ describe 'nova::wsgi::apache_api' do
|
||||
'docroot_group' => 'nova',
|
||||
'ssl' => 'false',
|
||||
'wsgi_daemon_process' => 'nova-api',
|
||||
'wsgi_daemon_process_options' => {
|
||||
'user' => 'nova',
|
||||
'group' => 'nova',
|
||||
'processes' => 37,
|
||||
'threads' => '42',
|
||||
'display-name' => 'nova-api',
|
||||
},
|
||||
'wsgi_process_group' => 'nova-api',
|
||||
'wsgi_script_aliases' => { '/' => "#{platform_params[:wsgi_script_path]}/nova-api" },
|
||||
'require' => 'File[nova_api_wsgi]'
|
||||
|
@@ -71,6 +71,13 @@ describe 'nova::wsgi::apache_placement' do
|
||||
'docroot_group' => 'nova',
|
||||
'ssl' => 'true',
|
||||
'wsgi_daemon_process' => 'placement-api',
|
||||
'wsgi_daemon_process_options' => {
|
||||
'user' => 'nova',
|
||||
'group' => 'nova',
|
||||
'processes' => 1,
|
||||
'threads' => '42',
|
||||
'display-name' => 'placement_wsgi',
|
||||
},
|
||||
'wsgi_process_group' => 'placement-api',
|
||||
'wsgi_script_aliases' => { '/' => "#{platform_params[:wsgi_script_path]}/nova-placement-api" },
|
||||
'require' => 'File[placement_wsgi]'
|
||||
@@ -103,11 +110,12 @@ describe 'nova::wsgi::apache_placement' do
|
||||
|
||||
let :params do
|
||||
{
|
||||
:servername => 'dummy.host',
|
||||
:bind_host => '10.42.51.1',
|
||||
:api_port => 12345,
|
||||
:ssl => false,
|
||||
:workers => 37,
|
||||
:servername => 'dummy.host',
|
||||
:bind_host => '10.42.51.1',
|
||||
:api_port => 12345,
|
||||
:ssl => false,
|
||||
:wsgi_process_display_name => 'placement-api',
|
||||
:workers => 37,
|
||||
}
|
||||
end
|
||||
|
||||
@@ -120,6 +128,13 @@ describe 'nova::wsgi::apache_placement' do
|
||||
'docroot_group' => 'nova',
|
||||
'ssl' => 'false',
|
||||
'wsgi_daemon_process' => 'placement-api',
|
||||
'wsgi_daemon_process_options' => {
|
||||
'user' => 'nova',
|
||||
'group' => 'nova',
|
||||
'processes' => 37,
|
||||
'threads' => '42',
|
||||
'display-name' => 'placement-api',
|
||||
},
|
||||
'wsgi_process_group' => 'placement-api',
|
||||
'wsgi_script_aliases' => { '/' => "#{platform_params[:wsgi_script_path]}/nova-placement-api" },
|
||||
'require' => 'File[placement_wsgi]'
|
||||
|
@@ -58,6 +58,13 @@ describe 'nova::wsgi::apache' do
|
||||
'docroot_group' => 'nova',
|
||||
'ssl' => 'true',
|
||||
'wsgi_daemon_process' => 'nova-api',
|
||||
'wsgi_daemon_process_options' => {
|
||||
'user' => 'nova',
|
||||
'group' => 'nova',
|
||||
'processes' => 1,
|
||||
'threads' => '8',
|
||||
'display-name' => 'nova_api_wsgi',
|
||||
},
|
||||
'wsgi_process_group' => 'nova-api',
|
||||
'wsgi_script_aliases' => { '/' => "#{platform_params[:wsgi_script_path]}/nova-api" },
|
||||
'require' => 'File[nova_api_wsgi]'
|
||||
@@ -90,11 +97,12 @@ describe 'nova::wsgi::apache' do
|
||||
|
||||
let :params do
|
||||
{
|
||||
:servername => 'dummy.host',
|
||||
:bind_host => '10.42.51.1',
|
||||
:api_port => 12345,
|
||||
:ssl => false,
|
||||
:workers => 37,
|
||||
:servername => 'dummy.host',
|
||||
:bind_host => '10.42.51.1',
|
||||
:api_port => 12345,
|
||||
:ssl => false,
|
||||
:wsgi_process_display_name => 'nova-api',
|
||||
:workers => 37,
|
||||
}
|
||||
end
|
||||
|
||||
@@ -107,6 +115,13 @@ describe 'nova::wsgi::apache' do
|
||||
'docroot_group' => 'nova',
|
||||
'ssl' => 'false',
|
||||
'wsgi_daemon_process' => 'nova-api',
|
||||
'wsgi_daemon_process_options' => {
|
||||
'user' => 'nova',
|
||||
'group' => 'nova',
|
||||
'processes' => '37',
|
||||
'threads' => '8',
|
||||
'display-name' => 'nova-api',
|
||||
},
|
||||
'wsgi_process_group' => 'nova-api',
|
||||
'wsgi_script_aliases' => { '/' => "#{platform_params[:wsgi_script_path]}/nova-api" },
|
||||
'require' => 'File[nova_api_wsgi]'
|
||||
@@ -129,7 +144,10 @@ describe 'nova::wsgi::apache' do
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts({ :fqdn => 'some.host.tld'}))
|
||||
facts.merge!(OSDefaults.get_facts({
|
||||
:os_workers => 8,
|
||||
:fqdn => 'some.host.tld'
|
||||
}))
|
||||
end
|
||||
|
||||
let (:platform_params) do
|
||||
|
Reference in New Issue
Block a user