Add wsgi_processes and wsgi_threads to horizon init
The wsgi_processes and wsgi_threads needs to be configureable from the horizon init class and then passed to horizon::wsgi::apache. Change-Id: Ic428214d7c84d33272becdb3675252318e8fd1bd
This commit is contained in:
parent
bb54858824
commit
f24699beee
|
@ -207,8 +207,16 @@
|
||||||
# [*horizon_ca*]
|
# [*horizon_ca*]
|
||||||
# (required with listen_ssl) CA certificate to use for SSL support.
|
# (required with listen_ssl) CA certificate to use for SSL support.
|
||||||
#
|
#
|
||||||
|
# [*wsgi_processes*]
|
||||||
|
# (optional) Number of Horizon processes to spawn
|
||||||
|
# Defaults to $::os_workers
|
||||||
|
#
|
||||||
|
# [*wsgi_threads*]
|
||||||
|
# (optional) Number of thread to run in a Horizon process
|
||||||
|
# Defaults to '1'
|
||||||
|
#
|
||||||
# [*vhost_extra_params*]
|
# [*vhost_extra_params*]
|
||||||
# (optionnal) extra parameter to pass to the apache::vhost class
|
# (optional) extra parameter to pass to the apache::vhost class
|
||||||
# Defaults to undef
|
# Defaults to undef
|
||||||
#
|
#
|
||||||
# [*file_upload_temp_dir*]
|
# [*file_upload_temp_dir*]
|
||||||
|
@ -477,6 +485,8 @@ class horizon(
|
||||||
$horizon_cert = undef,
|
$horizon_cert = undef,
|
||||||
$horizon_key = undef,
|
$horizon_key = undef,
|
||||||
$horizon_ca = undef,
|
$horizon_ca = undef,
|
||||||
|
$wsgi_processes = $::os_workers,
|
||||||
|
$wsgi_threads = '1',
|
||||||
$compress_offline = true,
|
$compress_offline = true,
|
||||||
$hypervisor_options = {},
|
$hypervisor_options = {},
|
||||||
$cinder_options = {},
|
$cinder_options = {},
|
||||||
|
@ -647,6 +657,8 @@ class horizon(
|
||||||
horizon_cert => $horizon_cert,
|
horizon_cert => $horizon_cert,
|
||||||
horizon_key => $horizon_key,
|
horizon_key => $horizon_key,
|
||||||
horizon_ca => $horizon_ca,
|
horizon_ca => $horizon_ca,
|
||||||
|
wsgi_processes => $wsgi_processes,
|
||||||
|
wsgi_threads => $wsgi_threads,
|
||||||
extra_params => $vhost_extra_params,
|
extra_params => $vhost_extra_params,
|
||||||
redirect_type => $redirect_type,
|
redirect_type => $redirect_type,
|
||||||
root_url => $root_url,
|
root_url => $root_url,
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The wsgi_processes and wsgi_threads options that is passed to horizon::wsgi::apache
|
||||||
|
can now be set in ::horizon class.
|
|
@ -43,10 +43,12 @@ describe 'horizon' do
|
||||||
|
|
||||||
it 'configures apache' do
|
it 'configures apache' do
|
||||||
is_expected.to contain_class('horizon::wsgi::apache').with({
|
is_expected.to contain_class('horizon::wsgi::apache').with({
|
||||||
:servername => 'some.host.tld',
|
:servername => 'some.host.tld',
|
||||||
:listen_ssl => false,
|
:listen_ssl => false,
|
||||||
:extra_params => {},
|
:wsgi_processes => facts[:os_workers],
|
||||||
:redirect_type => 'permanent',
|
:wsgi_threads => '1',
|
||||||
|
:extra_params => {},
|
||||||
|
:redirect_type => 'permanent',
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -116,6 +118,8 @@ describe 'horizon' do
|
||||||
'supported_provider_types' => ['flat', 'vxlan'], 'supported_vnic_types' => ['*'], 'default_ipv4_subnet_pool_label' => 'None', },
|
'supported_provider_types' => ['flat', 'vxlan'], 'supported_vnic_types' => ['*'], 'default_ipv4_subnet_pool_label' => 'None', },
|
||||||
:instance_options => {'disable_image' => true, 'disable_instance_snapshot' => true, 'disable_volume' => true, 'disable_volume_snapshot' => true, 'create_volume' => false },
|
:instance_options => {'disable_image' => true, 'disable_instance_snapshot' => true, 'disable_volume' => true, 'disable_volume_snapshot' => true, 'create_volume' => false },
|
||||||
:file_upload_temp_dir => '/var/spool/horizon',
|
:file_upload_temp_dir => '/var/spool/horizon',
|
||||||
|
:wsgi_processes => '30',
|
||||||
|
:wsgi_threads => '5',
|
||||||
:secure_cookies => true,
|
:secure_cookies => true,
|
||||||
:api_versions => {'identity' => 2.0},
|
:api_versions => {'identity' => 2.0},
|
||||||
:keystone_multidomain_support => true,
|
:keystone_multidomain_support => true,
|
||||||
|
@ -276,6 +280,18 @@ describe 'horizon' do
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with custom wsgi options' do
|
||||||
|
before do
|
||||||
|
params.merge!( :wsgi_processes => '30',
|
||||||
|
:wsgi_threads => '5' )
|
||||||
|
end
|
||||||
|
|
||||||
|
it { should contain_class('horizon::wsgi::apache').with(
|
||||||
|
:wsgi_processes => '30',
|
||||||
|
:wsgi_threads => '5',
|
||||||
|
)}
|
||||||
|
end
|
||||||
|
|
||||||
context 'with vhost_extra_params' do
|
context 'with vhost_extra_params' do
|
||||||
before do
|
before do
|
||||||
params.merge!({
|
params.merge!({
|
||||||
|
@ -692,7 +708,8 @@ describe 'horizon' do
|
||||||
let (:facts) do
|
let (:facts) do
|
||||||
facts.merge!(OSDefaults.get_facts({
|
facts.merge!(OSDefaults.get_facts({
|
||||||
:fqdn => 'some.host.tld',
|
:fqdn => 'some.host.tld',
|
||||||
:concat_basedir => '/var/lib/puppet/concat'
|
:concat_basedir => '/var/lib/puppet/concat',
|
||||||
|
:os_workers => '6'
|
||||||
}))
|
}))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue