![Dmitry Ilyin](/assets/img/avatar_default.png)
* New task to deploy Apache and configure MPM * Run keystone as Apache vhost * Pull wsgi threads and priority configuration from upstream change-id: Ib05ac81381e169845b44b2ef7cb810a4d5db17de * Pull custom file source for wsgi scripts from upstream change-id: I941bf8804982e9081812e076f7a736f413220047 * Fix for keystone spec tests (use concat 1.2.1 in fixtures) * Use keystone.py wsgi script from packages instead of downloading it from puppet module. Requires deb package with this patch: https://review.fuel-infra.org/6251 Until it's megred, we'll use upstream wsgi script for Debian Change-Id: I85008079b0e922a4518c696a097238500132fa04 Closes-Bug: 1313662
40 lines
1.1 KiB
Puppet
40 lines
1.1 KiB
Puppet
# Configure apache MPM
|
|
class osnailyfacter::apache_mpm {
|
|
|
|
# Performance optimization for Apache mpm
|
|
if $::memorysize_mb < 4100 {
|
|
$maxclients = 100
|
|
} else {
|
|
$maxclients = inline_template('<%= Integer(@memorysize_mb.to_i / 10) %>')
|
|
}
|
|
|
|
if $::processorcount <= 2 {
|
|
$startservers = 2
|
|
} else {
|
|
$startservers = $::processorcount
|
|
}
|
|
|
|
$maxrequestsperchild = 0
|
|
$threadsperchild = 25
|
|
$minsparethreads = 25
|
|
$serverlimit = inline_template('<%= Integer(@maxclients.to_i / @threadsperchild.to_i) %>')
|
|
$maxsparethreads = inline_template('<%= Integer(@maxclients.to_i / 2) %>')
|
|
|
|
# Define apache mpm
|
|
if $::osfamily == 'RedHat' {
|
|
$mpm_module = 'event'
|
|
} else {
|
|
$mpm_module = 'worker'
|
|
}
|
|
|
|
class { "::apache::mod::$mpm_module":
|
|
startservers => $startservers,
|
|
maxclients => $maxclients,
|
|
minsparethreads => $minsparethreads,
|
|
maxsparethreads => $maxsparethreads,
|
|
threadsperchild => $threadsperchild,
|
|
maxrequestsperchild => $maxrequestsperchild,
|
|
serverlimit => $serverlimit,
|
|
}
|
|
}
|