Puppet Class: profile::meet::accountmanager

Defined in:
modules/profile/manifests/meet/accountmanager.pp

Overview

Sets up the account manager for Wikimedia Meet (T251034)

Parameters:

  • clone_path (Any) (defaults to: lookup('profile::meet::accountmanager::clone_path'))
  • nodes (Array[Stdlib::IP::Address]) (defaults to: lookup('cache_hosts'))


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'modules/profile/manifests/meet/accountmanager.pp', line 2

class profile::meet::accountmanager(
    $clone_path = lookup('profile::meet::accountmanager::clone_path'),
    Array[Stdlib::IP::Address] $nodes = lookup('cache_hosts'),
) {

    group { 'meet-auth':
        ensure => present,
        name   => 'meet-auth',
        system => true,
    }

    user { 'meet-auth':
        home       => $clone_path,
        groups     => 'meet-auth',
        managehome => true,
        system     => true,
    }

    git::clone { 'wikimedia/meet-accountmanager':
        ensure    => present,
        directory => $clone_path,
        branch    => 'master',
        owner     => 'meet-auth',
        group     => 'meet-auth',
        require   => [User['meet-auth'], Group['meet-auth']]
    }
    ferm::service { 'meet-auth-accountmanager':
        proto  => 'tcp',
        port   => 5000,
        srange => inline_template("@resolve((<%= @nodes.join(' ') %>))"),
    }
    uwsgi::app { 'meet-accountmanager':
        settings         => {
            uwsgi => {
                'plugins'     => 'python3',
                'http-socket' => '0.0.0.0:5000',
                'wsgi-file'   => "${clone_path}/server.py",
                'callable'    => 'app',
                'master'      => true,
                'processes'   => 2,
            },
        },
    }

    base::service_auto_restart { 'meet-accountmanager': }
}