Debian Codegraph @

manifests/wsgi/uwsgi.pp

raw
1 #
2 # Copyright 2021 Thomas Goirand <[email protected]>
3 #
4 # Author: Thomas Goirand <[email protected]>
5 #
6 # == Class: vmms::wsgi::uwsgi
7 #
8 # Configure the UWSGI service for Designate API.
9 #
10 # == Parameters
11 #
12 # [*processes*]
13 # (Optional) Number of processes.
14 # Defaults to $facts['os_workers'].
15 #
16 # [*threads*]
17 # (Optional) Number of threads.
18 # Defaults to 32.
19 #
20 # [*listen_queue_size*]
21 # (Optional) Socket listen queue size.
22 # Defaults to 100
23 #
24 class vmms::wsgi::uwsgi (
25 $processes = $facts['os_workers'],
26 $threads = 1,
27 $listen_queue_size = 100,
28 ){
29
30 include vmms::deps
31
32 if $facts['os']['name'] != 'Debian' {
33 warning('This class is only valid for Debian, as other operating systems are not using uwsgi by default.')
34 }
35
36 vmms_api_uwsgi_config {
37 'uwsgi/processes': value => $processes;
38 'uwsgi/threads': value => $threads;
39 'uwsgi/listen': value => $listen_queue_size;
40 }
41
42 Vmms_api_uwsgi_config<||> ~> Service<| tag == 'vmms-service' |>
43 }