fuel-library/deployment/puppet/osnailyfacter/manifests/apache_api_proxy.pp
Stanislaw Bogatkin bbd082b140 Change apache api proxy config to disallow keepalives for OSTF
Sahara API does not support keepalive connections correctly, so it is
necessary to disable this feature. It is already disabled for HAProxy,
but in case with OSTF tests there is Apache working as another proxy
between admin and public network, so we should disable keepalives for
it too. In other case there is cases when client tries to reuse
connection for HTTPS request and fails to do it.

Closes-Bug: #1533218
Change-Id: I9cb4f69e49c8aa71b861e2cc1ee285f6d23dc4c1
Co-Authored-By: Dmitry Bilunov <dbilunov@mirantis.com>
2016-01-16 17:23:07 +00:00

43 lines
1.2 KiB
Puppet

# == Class osnailyfacter::apache_api_proxy
#
# Class for proxy realization using apache
#
# [*master_ip*]
# (required) String. IP address of master node.
#
# [*max_header_size*]
# (optional) String. Set the limit on the allowed size
# of an HTTP request header field.
#
class osnailyfacter::apache_api_proxy(
$master_ip,
$max_header_size = '8190',
) {
# Allow connection to the apache for ostf tests
firewall {'007 tinyproxy':
dport => [ 8888 ],
source => $master_ip,
proto => 'tcp',
action => 'accept',
}
class {"::apache::mod::proxy": }
class {"::apache::mod::proxy_connect": }
class {"::apache::mod::proxy_http": }
class {"::apache::mod::headers": }
$apache_api_proxy_address = hiera('apache_api_proxy_address', '0.0.0.0')
apache::vhost { 'apache_api_proxy':
docroot => '/var/www/html',
custom_fragment => template('osnailyfacter/api_proxy.conf.erb'),
port => '8888',
ip => $apache_api_proxy_address,
add_listen => false,
error_log_syslog => 'syslog:local0',
log_level => 'notice',
ip_based => true, # Do not setup outdated 'NameVirtualHost' option
}
}