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.
|
# (optional) The number of threads for the vhost.
|
||||||
# Defaults to $::os_workers
|
# Defaults to $::os_workers
|
||||||
#
|
#
|
||||||
|
# [*wsgi_process_display_name*]
|
||||||
|
# (optional) Name of the WSGI process display-name.
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
# [*ssl_cert*]
|
# [*ssl_cert*]
|
||||||
# [*ssl_key*]
|
# [*ssl_key*]
|
||||||
# [*ssl_chain*]
|
# [*ssl_chain*]
|
||||||
@@ -80,21 +84,22 @@
|
|||||||
# Note: we can't transform this class in a define for backward compatibility.
|
# Note: we can't transform this class in a define for backward compatibility.
|
||||||
# though this class might become a define in the future.
|
# though this class might become a define in the future.
|
||||||
class nova::wsgi::apache (
|
class nova::wsgi::apache (
|
||||||
$servername = $::fqdn,
|
$servername = $::fqdn,
|
||||||
$api_port = 8774,
|
$api_port = 8774,
|
||||||
$bind_host = undef,
|
$bind_host = undef,
|
||||||
$path = '/',
|
$path = '/',
|
||||||
$ssl = true,
|
$ssl = true,
|
||||||
$workers = 1,
|
$workers = 1,
|
||||||
$ssl_cert = undef,
|
$ssl_cert = undef,
|
||||||
$ssl_key = undef,
|
$ssl_key = undef,
|
||||||
$ssl_chain = undef,
|
$ssl_chain = undef,
|
||||||
$ssl_ca = undef,
|
$ssl_ca = undef,
|
||||||
$ssl_crl_path = undef,
|
$ssl_crl_path = undef,
|
||||||
$ssl_crl = undef,
|
$ssl_crl = undef,
|
||||||
$ssl_certs_dir = undef,
|
$ssl_certs_dir = undef,
|
||||||
$threads = $::os_workers,
|
$wsgi_process_display_name = undef,
|
||||||
$priority = '10',
|
$threads = $::os_workers,
|
||||||
|
$priority = '10',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::nova::params
|
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')
|
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':
|
class { '::nova::wsgi::apache_api':
|
||||||
servername => $servername,
|
servername => $servername,
|
||||||
api_port => $api_port,
|
api_port => $api_port,
|
||||||
bind_host => $bind_host,
|
bind_host => $bind_host,
|
||||||
path => $path,
|
path => $path,
|
||||||
ssl => $ssl,
|
ssl => $ssl,
|
||||||
workers => $workers,
|
workers => $workers,
|
||||||
ssl_cert => $ssl_cert,
|
ssl_cert => $ssl_cert,
|
||||||
ssl_key => $ssl_key,
|
ssl_key => $ssl_key,
|
||||||
ssl_chain => $ssl_chain,
|
ssl_chain => $ssl_chain,
|
||||||
ssl_ca => $ssl_ca,
|
ssl_ca => $ssl_ca,
|
||||||
ssl_crl_path => $ssl_crl_path,
|
ssl_crl_path => $ssl_crl_path,
|
||||||
ssl_crl => $ssl_crl,
|
ssl_crl => $ssl_crl,
|
||||||
ssl_certs_dir => $ssl_certs_dir,
|
ssl_certs_dir => $ssl_certs_dir,
|
||||||
threads => $threads,
|
wsgi_process_display_name => $wsgi_process_display_name,
|
||||||
priority => $priority,
|
threads => $threads,
|
||||||
|
priority => $priority,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -56,6 +56,10 @@
|
|||||||
# (optional) The number of threads for the vhost.
|
# (optional) The number of threads for the vhost.
|
||||||
# Defaults to $::os_workers
|
# Defaults to $::os_workers
|
||||||
#
|
#
|
||||||
|
# [*wsgi_process_display_name*]
|
||||||
|
# (optional) Name of the WSGI process display-name.
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
# [*ssl_cert*]
|
# [*ssl_cert*]
|
||||||
# [*ssl_key*]
|
# [*ssl_key*]
|
||||||
# [*ssl_chain*]
|
# [*ssl_chain*]
|
||||||
@@ -77,21 +81,22 @@
|
|||||||
# class { 'nova::wsgi::apache': }
|
# class { 'nova::wsgi::apache': }
|
||||||
#
|
#
|
||||||
class nova::wsgi::apache_api (
|
class nova::wsgi::apache_api (
|
||||||
$servername = $::fqdn,
|
$servername = $::fqdn,
|
||||||
$api_port = 8774,
|
$api_port = 8774,
|
||||||
$bind_host = undef,
|
$bind_host = undef,
|
||||||
$path = '/',
|
$path = '/',
|
||||||
$ssl = true,
|
$ssl = true,
|
||||||
$workers = 1,
|
$workers = 1,
|
||||||
$ssl_cert = undef,
|
$ssl_cert = undef,
|
||||||
$ssl_key = undef,
|
$ssl_key = undef,
|
||||||
$ssl_chain = undef,
|
$ssl_chain = undef,
|
||||||
$ssl_ca = undef,
|
$ssl_ca = undef,
|
||||||
$ssl_crl_path = undef,
|
$ssl_crl_path = undef,
|
||||||
$ssl_crl = undef,
|
$ssl_crl = undef,
|
||||||
$ssl_certs_dir = undef,
|
$ssl_certs_dir = undef,
|
||||||
$threads = $::os_workers,
|
$wsgi_process_display_name = undef,
|
||||||
$priority = '10',
|
$threads = $::os_workers,
|
||||||
|
$priority = '10',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::nova::params
|
include ::nova::params
|
||||||
@@ -106,28 +111,29 @@ class nova::wsgi::apache_api (
|
|||||||
}
|
}
|
||||||
|
|
||||||
::openstacklib::wsgi::apache { 'nova_api_wsgi':
|
::openstacklib::wsgi::apache { 'nova_api_wsgi':
|
||||||
bind_host => $bind_host,
|
bind_host => $bind_host,
|
||||||
bind_port => $api_port,
|
bind_port => $api_port,
|
||||||
group => 'nova',
|
group => 'nova',
|
||||||
path => $path,
|
path => $path,
|
||||||
priority => $priority,
|
priority => $priority,
|
||||||
servername => $servername,
|
servername => $servername,
|
||||||
ssl => $ssl,
|
ssl => $ssl,
|
||||||
ssl_ca => $ssl_ca,
|
ssl_ca => $ssl_ca,
|
||||||
ssl_cert => $ssl_cert,
|
ssl_cert => $ssl_cert,
|
||||||
ssl_certs_dir => $ssl_certs_dir,
|
ssl_certs_dir => $ssl_certs_dir,
|
||||||
ssl_chain => $ssl_chain,
|
ssl_chain => $ssl_chain,
|
||||||
ssl_crl => $ssl_crl,
|
ssl_crl => $ssl_crl,
|
||||||
ssl_crl_path => $ssl_crl_path,
|
ssl_crl_path => $ssl_crl_path,
|
||||||
ssl_key => $ssl_key,
|
ssl_key => $ssl_key,
|
||||||
threads => $threads,
|
threads => $threads,
|
||||||
user => 'nova',
|
user => 'nova',
|
||||||
workers => $workers,
|
workers => $workers,
|
||||||
wsgi_daemon_process => 'nova-api',
|
wsgi_daemon_process => 'nova-api',
|
||||||
wsgi_process_group => 'nova-api',
|
wsgi_process_display_name => $wsgi_process_display_name,
|
||||||
wsgi_script_dir => $::nova::params::nova_wsgi_script_path,
|
wsgi_process_group => 'nova-api',
|
||||||
wsgi_script_file => 'nova-api',
|
wsgi_script_dir => $::nova::params::nova_wsgi_script_path,
|
||||||
wsgi_script_source => $::nova::params::nova_api_wsgi_script_source,
|
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.
|
# (optional) The number of threads for the vhost.
|
||||||
# Defaults to $::os_workers
|
# Defaults to $::os_workers
|
||||||
#
|
#
|
||||||
|
# [*wsgi_process_display_name*]
|
||||||
|
# (optional) Name of the WSGI process display-name.
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
# [*ensure_package*]
|
# [*ensure_package*]
|
||||||
# (optional) Control the ensure parameter for the Nova Placement API package ressource.
|
# (optional) Control the ensure parameter for the Nova Placement API package ressource.
|
||||||
# Defaults to 'present'
|
# Defaults to 'present'
|
||||||
@@ -79,22 +83,23 @@
|
|||||||
# class { 'nova::wsgi::apache': }
|
# class { 'nova::wsgi::apache': }
|
||||||
#
|
#
|
||||||
class nova::wsgi::apache_placement (
|
class nova::wsgi::apache_placement (
|
||||||
$servername = $::fqdn,
|
$servername = $::fqdn,
|
||||||
$api_port = 8778,
|
$api_port = 8778,
|
||||||
$bind_host = undef,
|
$bind_host = undef,
|
||||||
$path = '/',
|
$path = '/',
|
||||||
$ssl = true,
|
$ssl = true,
|
||||||
$workers = 1,
|
$workers = 1,
|
||||||
$ssl_cert = undef,
|
$ssl_cert = undef,
|
||||||
$ssl_key = undef,
|
$ssl_key = undef,
|
||||||
$ssl_chain = undef,
|
$ssl_chain = undef,
|
||||||
$ssl_ca = undef,
|
$ssl_ca = undef,
|
||||||
$ssl_crl_path = undef,
|
$ssl_crl_path = undef,
|
||||||
$ssl_crl = undef,
|
$ssl_crl = undef,
|
||||||
$ssl_certs_dir = undef,
|
$ssl_certs_dir = undef,
|
||||||
$threads = $::os_workers,
|
$wsgi_process_display_name = undef,
|
||||||
$priority = '10',
|
$threads = $::os_workers,
|
||||||
$ensure_package = 'present',
|
$priority = '10',
|
||||||
|
$ensure_package = 'present',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::nova::params
|
include ::nova::params
|
||||||
@@ -117,28 +122,29 @@ class nova::wsgi::apache_placement (
|
|||||||
Package<| title == 'nova-placement-api'|> -> Package<| title == 'httpd'|>
|
Package<| title == 'nova-placement-api'|> -> Package<| title == 'httpd'|>
|
||||||
|
|
||||||
::openstacklib::wsgi::apache { 'placement_wsgi':
|
::openstacklib::wsgi::apache { 'placement_wsgi':
|
||||||
bind_host => $bind_host,
|
bind_host => $bind_host,
|
||||||
bind_port => $api_port,
|
bind_port => $api_port,
|
||||||
group => 'nova',
|
group => 'nova',
|
||||||
path => $path,
|
path => $path,
|
||||||
priority => $priority,
|
priority => $priority,
|
||||||
servername => $servername,
|
servername => $servername,
|
||||||
ssl => $ssl,
|
ssl => $ssl,
|
||||||
ssl_ca => $ssl_ca,
|
ssl_ca => $ssl_ca,
|
||||||
ssl_cert => $ssl_cert,
|
ssl_cert => $ssl_cert,
|
||||||
ssl_certs_dir => $ssl_certs_dir,
|
ssl_certs_dir => $ssl_certs_dir,
|
||||||
ssl_chain => $ssl_chain,
|
ssl_chain => $ssl_chain,
|
||||||
ssl_crl => $ssl_crl,
|
ssl_crl => $ssl_crl,
|
||||||
ssl_crl_path => $ssl_crl_path,
|
ssl_crl_path => $ssl_crl_path,
|
||||||
ssl_key => $ssl_key,
|
ssl_key => $ssl_key,
|
||||||
threads => $threads,
|
threads => $threads,
|
||||||
user => 'nova',
|
user => 'nova',
|
||||||
workers => $workers,
|
workers => $workers,
|
||||||
wsgi_daemon_process => 'placement-api',
|
wsgi_daemon_process => 'placement-api',
|
||||||
wsgi_process_group => 'placement-api',
|
wsgi_process_display_name => $wsgi_process_display_name,
|
||||||
wsgi_script_dir => $::nova::params::nova_wsgi_script_path,
|
wsgi_process_group => 'placement-api',
|
||||||
wsgi_script_file => 'nova-placement-api',
|
wsgi_script_dir => $::nova::params::nova_wsgi_script_path,
|
||||||
wsgi_script_source => $::nova::params::placement_wsgi_script_source,
|
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',
|
'docroot_group' => 'nova',
|
||||||
'ssl' => 'true',
|
'ssl' => 'true',
|
||||||
'wsgi_daemon_process' => 'nova-api',
|
'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_process_group' => 'nova-api',
|
||||||
'wsgi_script_aliases' => { '/' => "#{platform_params[:wsgi_script_path]}/nova-api" },
|
'wsgi_script_aliases' => { '/' => "#{platform_params[:wsgi_script_path]}/nova-api" },
|
||||||
'require' => 'File[nova_api_wsgi]'
|
'require' => 'File[nova_api_wsgi]'
|
||||||
@@ -97,11 +104,12 @@ describe 'nova::wsgi::apache_api' do
|
|||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
:servername => 'dummy.host',
|
:servername => 'dummy.host',
|
||||||
:bind_host => '10.42.51.1',
|
:bind_host => '10.42.51.1',
|
||||||
:api_port => 12345,
|
:api_port => 12345,
|
||||||
:ssl => false,
|
:ssl => false,
|
||||||
:workers => 37,
|
:wsgi_process_display_name => 'nova-api',
|
||||||
|
:workers => 37,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -114,6 +122,13 @@ describe 'nova::wsgi::apache_api' do
|
|||||||
'docroot_group' => 'nova',
|
'docroot_group' => 'nova',
|
||||||
'ssl' => 'false',
|
'ssl' => 'false',
|
||||||
'wsgi_daemon_process' => 'nova-api',
|
'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_process_group' => 'nova-api',
|
||||||
'wsgi_script_aliases' => { '/' => "#{platform_params[:wsgi_script_path]}/nova-api" },
|
'wsgi_script_aliases' => { '/' => "#{platform_params[:wsgi_script_path]}/nova-api" },
|
||||||
'require' => 'File[nova_api_wsgi]'
|
'require' => 'File[nova_api_wsgi]'
|
||||||
|
@@ -71,6 +71,13 @@ describe 'nova::wsgi::apache_placement' do
|
|||||||
'docroot_group' => 'nova',
|
'docroot_group' => 'nova',
|
||||||
'ssl' => 'true',
|
'ssl' => 'true',
|
||||||
'wsgi_daemon_process' => 'placement-api',
|
'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_process_group' => 'placement-api',
|
||||||
'wsgi_script_aliases' => { '/' => "#{platform_params[:wsgi_script_path]}/nova-placement-api" },
|
'wsgi_script_aliases' => { '/' => "#{platform_params[:wsgi_script_path]}/nova-placement-api" },
|
||||||
'require' => 'File[placement_wsgi]'
|
'require' => 'File[placement_wsgi]'
|
||||||
@@ -103,11 +110,12 @@ describe 'nova::wsgi::apache_placement' do
|
|||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
:servername => 'dummy.host',
|
:servername => 'dummy.host',
|
||||||
:bind_host => '10.42.51.1',
|
:bind_host => '10.42.51.1',
|
||||||
:api_port => 12345,
|
:api_port => 12345,
|
||||||
:ssl => false,
|
:ssl => false,
|
||||||
:workers => 37,
|
:wsgi_process_display_name => 'placement-api',
|
||||||
|
:workers => 37,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -120,6 +128,13 @@ describe 'nova::wsgi::apache_placement' do
|
|||||||
'docroot_group' => 'nova',
|
'docroot_group' => 'nova',
|
||||||
'ssl' => 'false',
|
'ssl' => 'false',
|
||||||
'wsgi_daemon_process' => 'placement-api',
|
'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_process_group' => 'placement-api',
|
||||||
'wsgi_script_aliases' => { '/' => "#{platform_params[:wsgi_script_path]}/nova-placement-api" },
|
'wsgi_script_aliases' => { '/' => "#{platform_params[:wsgi_script_path]}/nova-placement-api" },
|
||||||
'require' => 'File[placement_wsgi]'
|
'require' => 'File[placement_wsgi]'
|
||||||
|
@@ -58,6 +58,13 @@ describe 'nova::wsgi::apache' do
|
|||||||
'docroot_group' => 'nova',
|
'docroot_group' => 'nova',
|
||||||
'ssl' => 'true',
|
'ssl' => 'true',
|
||||||
'wsgi_daemon_process' => 'nova-api',
|
'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_process_group' => 'nova-api',
|
||||||
'wsgi_script_aliases' => { '/' => "#{platform_params[:wsgi_script_path]}/nova-api" },
|
'wsgi_script_aliases' => { '/' => "#{platform_params[:wsgi_script_path]}/nova-api" },
|
||||||
'require' => 'File[nova_api_wsgi]'
|
'require' => 'File[nova_api_wsgi]'
|
||||||
@@ -90,11 +97,12 @@ describe 'nova::wsgi::apache' do
|
|||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
:servername => 'dummy.host',
|
:servername => 'dummy.host',
|
||||||
:bind_host => '10.42.51.1',
|
:bind_host => '10.42.51.1',
|
||||||
:api_port => 12345,
|
:api_port => 12345,
|
||||||
:ssl => false,
|
:ssl => false,
|
||||||
:workers => 37,
|
:wsgi_process_display_name => 'nova-api',
|
||||||
|
:workers => 37,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -107,6 +115,13 @@ describe 'nova::wsgi::apache' do
|
|||||||
'docroot_group' => 'nova',
|
'docroot_group' => 'nova',
|
||||||
'ssl' => 'false',
|
'ssl' => 'false',
|
||||||
'wsgi_daemon_process' => 'nova-api',
|
'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_process_group' => 'nova-api',
|
||||||
'wsgi_script_aliases' => { '/' => "#{platform_params[:wsgi_script_path]}/nova-api" },
|
'wsgi_script_aliases' => { '/' => "#{platform_params[:wsgi_script_path]}/nova-api" },
|
||||||
'require' => 'File[nova_api_wsgi]'
|
'require' => 'File[nova_api_wsgi]'
|
||||||
@@ -129,7 +144,10 @@ describe 'nova::wsgi::apache' do
|
|||||||
}).each do |os,facts|
|
}).each do |os,facts|
|
||||||
context "on #{os}" do
|
context "on #{os}" do
|
||||||
let (:facts) 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
|
end
|
||||||
|
|
||||||
let (:platform_params) do
|
let (:platform_params) do
|
||||||
|
Reference in New Issue
Block a user