Files
puppet-nova/manifests/wsgi/uwsgi_api.pp
Thomas Goirand 8334bd3666 Add support for nova_api_{metadata_,}uwsgi_config in Debian
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 Nova API and api-metadata. Therefore, this patch adds
two new nova_api_uwsgi_config and nova_api_metadata_uwsgi_config
providers as well as two new nova::wsgi::uwsgi_api and
nova::wsgi::uwsgi_api_metadata classes.

Change-Id: Idd141edc5cddcfd79cf23e2041dbd1ce6a8252a8
2021-04-11 00:19:00 +02:00

42 lines
913 B
Puppet

#
# Copyright 2021 Thomas Goirand <zigo@debian.org>
#
# Author: Thomas Goirand <zigo@debian.org>
#
# == Class: nova::wsgi::uwsgi_api
#
# Configure the UWSGI service for Nova API.
#
# == 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 nova::wsgi::uwsgi_api (
$processes = $::os_workers,
$threads = 32,
$listen_queue_size = 100,
){
include nova::deps
if $::os_package_type != 'debian'{
warning('This class is only valid for Debian, as other operating systems are not using uwsgi by default.')
}
nova_api_uwsgi_config {
'uwsgi/processes': value => $processes;
'uwsgi/threads': value => $threads;
'uwsgi/listen': value => $listen_queue_size;
}
}