Merge "Run keystone under Apache wsgi"
This commit is contained in:
commit
90c885edad
@ -126,7 +126,7 @@ class openstack::keystone (
|
||||
debug => $debug,
|
||||
catalog_type => 'sql',
|
||||
admin_token => $admin_token,
|
||||
enabled => $enabled,
|
||||
enabled => false,
|
||||
database_connection => $database_connection,
|
||||
public_bind_host => $public_bind_host,
|
||||
admin_bind_host => $admin_bind_host,
|
||||
|
@ -60,7 +60,7 @@ $syslog_log_facility_ceph = hiera('syslog_log_facility_ceph','LOG_LOCAL0')
|
||||
|
||||
$nova_report_interval = hiera('nova_report_interval', 60)
|
||||
$nova_service_down_time = hiera('nova_service_down_time', 180)
|
||||
$apache_ports = hiera_array('apache_ports', ['80', '8888'])
|
||||
$apache_ports = hiera_array('apache_ports', ['80', '8888', '5000', '35357'])
|
||||
|
||||
$openstack_version = hiera('openstack_version',
|
||||
{
|
||||
|
@ -126,30 +126,30 @@ class { 'openstack::keystone':
|
||||
|
||||
####### WSGI ###########
|
||||
|
||||
#class { 'osnailyfacter::apache':
|
||||
# listen_ports => hiera_array('apache_ports', ['80', '8888']),
|
||||
#}
|
||||
class { 'osnailyfacter::apache':
|
||||
listen_ports => hiera_array('apache_ports', ['80', '8888', '5000', '35357']),
|
||||
}
|
||||
|
||||
# TODO: (adidenko) use file from package for Debian, when
|
||||
# https://review.fuel-infra.org/6251 is merged.
|
||||
#class { 'keystone::wsgi::apache':
|
||||
# priority => '05',
|
||||
# threads => 1,
|
||||
# workers => min(max($::processorcount,2), 24),
|
||||
# ssl => $ssl,
|
||||
class { 'keystone::wsgi::apache':
|
||||
priority => '05',
|
||||
threads => 1,
|
||||
workers => min(max($::processorcount,2), 24),
|
||||
ssl => $ssl,
|
||||
|
||||
# wsgi_script_ensure => $::osfamily ? {
|
||||
# 'RedHat' => 'link',
|
||||
# default => 'file',
|
||||
# },
|
||||
# wsgi_script_source => $::osfamily ? {
|
||||
# # 'Debian' => '/usr/share/keystone/wsgi.py',
|
||||
# 'RedHat' => '/usr/share/keystone/keystone.wsgi',
|
||||
# default => undef,
|
||||
# },
|
||||
#}
|
||||
wsgi_script_ensure => $::osfamily ? {
|
||||
'RedHat' => 'link',
|
||||
default => 'file',
|
||||
},
|
||||
wsgi_script_source => $::osfamily ? {
|
||||
# TODO: (adidenko) use file from package for Debian, when
|
||||
# https://bugs.launchpad.net/fuel/+bug/1476688 is fixed.
|
||||
# 'Debian' => '/usr/share/keystone/wsgi.py',
|
||||
'RedHat' => '/usr/share/keystone/keystone.wsgi',
|
||||
default => undef,
|
||||
},
|
||||
}
|
||||
|
||||
#include ::tweaks::apache_wrappers
|
||||
include ::tweaks::apache_wrappers
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
@ -64,45 +64,55 @@ describe manifest do
|
||||
should contain_keystone_config('token/caching').with(:value => 'false')
|
||||
end
|
||||
|
||||
# it 'should declare keystone::wsgi::apache class with 4 workers on 4 CPU system' do
|
||||
# should contain_class('keystone::wsgi::apache').with(
|
||||
# 'threads' => '1',
|
||||
# 'workers' => '4',
|
||||
# )
|
||||
# end
|
||||
#
|
||||
# it 'should declare keystone::wsgi::apache class with 24 workers on 48 CPU system' do
|
||||
# facts[:processorcount] = 48
|
||||
# should contain_class('keystone::wsgi::apache').with(
|
||||
# 'threads' => '1',
|
||||
# 'workers' => '24',
|
||||
# )
|
||||
# end
|
||||
#
|
||||
# it 'should setup keystone_wsgi_admin file properly' do
|
||||
# case facts[:operatingsystem]
|
||||
# when 'CentOS'
|
||||
# should contain_file('keystone_wsgi_admin').with(
|
||||
# 'ensure' => 'link',
|
||||
# 'path' => "/var/www/cgi-bin/keystone/admin",
|
||||
# 'target' => '/usr/share/keystone/keystone.wsgi',
|
||||
# 'owner' => 'keystone',
|
||||
# 'group' => 'keystone',
|
||||
# 'mode' => '0644',
|
||||
# 'require' => "File[/var/www/cgi-bin/keystone]"
|
||||
# )
|
||||
# when 'Ubuntu'
|
||||
# should contain_file('keystone_wsgi_admin').with(
|
||||
# 'ensure' => 'file',
|
||||
# 'path' => "/usr/lib/cgi-bin/keystone/admin",
|
||||
# 'source' => 'puppet:///modules/keystone/httpd/keystone.py',
|
||||
# 'owner' => 'keystone',
|
||||
# 'group' => 'keystone',
|
||||
# 'mode' => '0644',
|
||||
# 'require' => "File[/usr/lib/cgi-bin/keystone]"
|
||||
# )
|
||||
# end
|
||||
# end
|
||||
it 'should declare keystone::wsgi::apache class with 4 workers on 4 CPU system' do
|
||||
should contain_class('keystone::wsgi::apache').with(
|
||||
'threads' => '1',
|
||||
'workers' => '4',
|
||||
)
|
||||
end
|
||||
|
||||
it 'should declare keystone::wsgi::apache class with 24 workers on 48 CPU system' do
|
||||
facts[:processorcount] = 48
|
||||
should contain_class('keystone::wsgi::apache').with(
|
||||
'threads' => '1',
|
||||
'workers' => '24',
|
||||
)
|
||||
end
|
||||
|
||||
it 'should setup keystone_wsgi_admin file properly' do
|
||||
case facts[:operatingsystem]
|
||||
when 'CentOS'
|
||||
should contain_file('keystone_wsgi_admin').with(
|
||||
'ensure' => 'link',
|
||||
'path' => "/var/www/cgi-bin/keystone/admin",
|
||||
'target' => '/usr/share/keystone/keystone.wsgi',
|
||||
'owner' => 'keystone',
|
||||
'group' => 'keystone',
|
||||
'mode' => '0644',
|
||||
)
|
||||
when 'Ubuntu'
|
||||
should contain_file('keystone_wsgi_admin').with(
|
||||
'ensure' => 'file',
|
||||
'path' => "/usr/lib/cgi-bin/keystone/admin",
|
||||
'source' => 'puppet:///modules/keystone/httpd/keystone.py',
|
||||
'owner' => 'keystone',
|
||||
'group' => 'keystone',
|
||||
'mode' => '0644',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
it 'should not run keystone service' do
|
||||
should contain_service('keystone').with(
|
||||
'ensure' => 'stopped',
|
||||
)
|
||||
end
|
||||
it 'should configure apache to listen 5000 keystone port' do
|
||||
should contain_apache__listen('5000')
|
||||
end
|
||||
it 'should configure apache to listen 35357 keystone port' do
|
||||
should contain_apache__listen('35357')
|
||||
end
|
||||
|
||||
end # end of shared_examples
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user