
This patch is adding the configuration of the number of workers, threads, and the size of the listen queue in Debian, which uses uwsgi to run Placement API. Therefore, this patch adds a new placement_api_uwsgi_config provider as well as a new placement::wsgi::uwsgi class. Change-Id: I6e340f551d11e3c003f7873a4ccffba262411e52
42 lines
926 B
Puppet
42 lines
926 B
Puppet
#
|
|
# Copyright 2021 Thomas Goirand <zigo@debian.org>
|
|
#
|
|
# Author: Thomas Goirand <zigo@debian.org>
|
|
#
|
|
# == Class: placement::wsgi::uwsgi
|
|
#
|
|
# Configure the UWSGI service for Placement.
|
|
#
|
|
# == Parameters
|
|
#
|
|
# [*processes*]
|
|
# (Optional) Number of processes.
|
|
# Defaults to $::os_workers.
|
|
#
|
|
# [*threads*]
|
|
# (Optional) Number of threads.
|
|
# Defaults to 32.
|
|
#
|
|
# [*listen_queue_size*]
|
|
# (Optional) Socket listen queue size.
|
|
# Defaults to 100
|
|
#
|
|
class placement::wsgi::uwsgi (
|
|
$processes = $::os_workers,
|
|
$threads = 32,
|
|
$listen_queue_size = 100,
|
|
){
|
|
|
|
include placement::deps
|
|
|
|
if $::os_package_type != 'debian'{
|
|
warning('This class is only valid for Debian, as other operating systems are not using uwsgi by default.')
|
|
}
|
|
|
|
placement_api_uwsgi_config {
|
|
'uwsgi/processes': value => $processes;
|
|
'uwsgi/threads': value => $threads;
|
|
'uwsgi/listen': value => $listen_queue_size;
|
|
}
|
|
}
|