add parameter to overwrite/add wsgi process options
Add parameter to apache_wsgi to allow overwrite and/or add additional wsgi process options. This possibility was added to openstacklib with Change-Id: I41914ce3361988d5db1695f09d21209772fdf548 Change-Id: I1d50ee01ebfdfaeb2ac02bc5b944f5b996cbc2db
This commit is contained in:
@@ -70,6 +70,14 @@
|
|||||||
# apache::vhost ssl parameters.
|
# apache::vhost ssl parameters.
|
||||||
# Optional. Default to apache::vhost 'ssl_*' defaults.
|
# Optional. Default to apache::vhost 'ssl_*' defaults.
|
||||||
#
|
#
|
||||||
|
# [*custom_wsgi_process_options*]
|
||||||
|
# (optional) gives you the oportunity to add custom process options or to
|
||||||
|
# overwrite the default options for the WSGI main process.
|
||||||
|
# eg. to use a virtual python environment for the WSGI process
|
||||||
|
# you could set it to:
|
||||||
|
# { python-path => '/my/python/virtualenv' }
|
||||||
|
# Defaults to {}
|
||||||
|
#
|
||||||
# == Dependencies
|
# == Dependencies
|
||||||
#
|
#
|
||||||
# requires Class['apache'] & Class['nova'] & Class['nova::api']
|
# requires Class['apache'] & Class['nova'] & Class['nova::api']
|
||||||
@@ -97,6 +105,7 @@ class nova::wsgi::apache_api (
|
|||||||
$wsgi_process_display_name = undef,
|
$wsgi_process_display_name = undef,
|
||||||
$threads = $::os_workers,
|
$threads = $::os_workers,
|
||||||
$priority = '10',
|
$priority = '10',
|
||||||
|
$custom_wsgi_process_options = {},
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::nova::params
|
include ::nova::params
|
||||||
@@ -134,6 +143,7 @@ class nova::wsgi::apache_api (
|
|||||||
wsgi_script_dir => $::nova::params::nova_wsgi_script_path,
|
wsgi_script_dir => $::nova::params::nova_wsgi_script_path,
|
||||||
wsgi_script_file => 'nova-api',
|
wsgi_script_file => 'nova-api',
|
||||||
wsgi_script_source => $::nova::params::nova_api_wsgi_script_source,
|
wsgi_script_source => $::nova::params::nova_api_wsgi_script_source,
|
||||||
|
custom_wsgi_process_options => $custom_wsgi_process_options,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -72,6 +72,14 @@
|
|||||||
# apache::vhost ssl parameters.
|
# apache::vhost ssl parameters.
|
||||||
# Optional. Default to apache::vhost 'ssl_*' defaults.
|
# Optional. Default to apache::vhost 'ssl_*' defaults.
|
||||||
#
|
#
|
||||||
|
# [*custom_wsgi_process_options*]
|
||||||
|
# (optional) gives you the oportunity to add custom process options or to
|
||||||
|
# overwrite the default options for the WSGI main process.
|
||||||
|
# eg. to use a virtual python environment for the WSGI process
|
||||||
|
# you could set it to:
|
||||||
|
# { python-path => '/my/python/virtualenv' }
|
||||||
|
# Defaults to {}
|
||||||
|
#
|
||||||
# == Examples
|
# == Examples
|
||||||
#
|
#
|
||||||
# include apache
|
# include apache
|
||||||
@@ -96,6 +104,7 @@ class nova::wsgi::apache_placement (
|
|||||||
$threads = $::os_workers,
|
$threads = $::os_workers,
|
||||||
$priority = '10',
|
$priority = '10',
|
||||||
$ensure_package = 'present',
|
$ensure_package = 'present',
|
||||||
|
$custom_wsgi_process_options = {},
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::nova::params
|
include ::nova::params
|
||||||
@@ -150,6 +159,7 @@ class nova::wsgi::apache_placement (
|
|||||||
wsgi_script_dir => $::nova::params::nova_wsgi_script_path,
|
wsgi_script_dir => $::nova::params::nova_wsgi_script_path,
|
||||||
wsgi_script_file => 'nova-placement-api',
|
wsgi_script_file => 'nova-placement-api',
|
||||||
wsgi_script_source => $::nova::params::placement_wsgi_script_source,
|
wsgi_script_source => $::nova::params::placement_wsgi_script_source,
|
||||||
|
custom_wsgi_process_options => $custom_wsgi_process_options,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Add parameter to apacher_wsgi to allow overwrite
|
||||||
|
and/or add additional wsgi process options.
|
@@ -31,6 +31,7 @@ describe 'nova::wsgi::apache_api' do
|
|||||||
:wsgi_script_dir => platform_params[:wsgi_script_path],
|
:wsgi_script_dir => platform_params[:wsgi_script_path],
|
||||||
:wsgi_script_file => 'nova-api',
|
:wsgi_script_file => 'nova-api',
|
||||||
:wsgi_script_source => platform_params[:api_wsgi_script_source],
|
:wsgi_script_source => platform_params[:api_wsgi_script_source],
|
||||||
|
:custom_wsgi_process_options => {},
|
||||||
)}
|
)}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -53,6 +54,9 @@ describe 'nova::wsgi::apache_api' do
|
|||||||
:ssl => false,
|
:ssl => false,
|
||||||
:wsgi_process_display_name => 'nova-api',
|
:wsgi_process_display_name => 'nova-api',
|
||||||
:workers => 37,
|
:workers => 37,
|
||||||
|
:custom_wsgi_process_options => {
|
||||||
|
'python_path' => '/my/python/path',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -76,6 +80,9 @@ describe 'nova::wsgi::apache_api' do
|
|||||||
:wsgi_script_dir => platform_params[:wsgi_script_path],
|
:wsgi_script_dir => platform_params[:wsgi_script_path],
|
||||||
:wsgi_script_file => 'nova-api',
|
:wsgi_script_file => 'nova-api',
|
||||||
:wsgi_script_source => platform_params[:api_wsgi_script_source],
|
:wsgi_script_source => platform_params[:api_wsgi_script_source],
|
||||||
|
:custom_wsgi_process_options => {
|
||||||
|
'python_path' => '/my/python/path',
|
||||||
|
},
|
||||||
)}
|
)}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -36,6 +36,7 @@ describe 'nova::wsgi::apache_placement' do
|
|||||||
:wsgi_script_dir => platform_params[:wsgi_script_path],
|
:wsgi_script_dir => platform_params[:wsgi_script_path],
|
||||||
:wsgi_script_file => 'nova-placement-api',
|
:wsgi_script_file => 'nova-placement-api',
|
||||||
:wsgi_script_source => platform_params[:placement_wsgi_script_source],
|
:wsgi_script_source => platform_params[:placement_wsgi_script_source],
|
||||||
|
:custom_wsgi_process_options => {},
|
||||||
)}
|
)}
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -57,6 +58,9 @@ describe 'nova::wsgi::apache_placement' do
|
|||||||
:ssl => false,
|
:ssl => false,
|
||||||
:wsgi_process_display_name => 'placement-api',
|
:wsgi_process_display_name => 'placement-api',
|
||||||
:workers => 37,
|
:workers => 37,
|
||||||
|
:custom_wsgi_process_options => {
|
||||||
|
'python_path' => '/my/python/path',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -86,6 +90,9 @@ describe 'nova::wsgi::apache_placement' do
|
|||||||
:wsgi_script_dir => platform_params[:wsgi_script_path],
|
:wsgi_script_dir => platform_params[:wsgi_script_path],
|
||||||
:wsgi_script_file => 'nova-placement-api',
|
:wsgi_script_file => 'nova-placement-api',
|
||||||
:wsgi_script_source => platform_params[:placement_wsgi_script_source],
|
:wsgi_script_source => platform_params[:placement_wsgi_script_source],
|
||||||
|
:custom_wsgi_process_options => {
|
||||||
|
'python_path' => '/my/python/path',
|
||||||
|
},
|
||||||
)}
|
)}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user