Puppet Class: profile::toolforge::grid::node::web::lighttpd

Defined in:
modules/profile/manifests/toolforge/grid/node/web/lighttpd.pp

Overview

Class: profile::toolforge::grid::node::web::lighttpd

This configures the compute node as a lighttpd web server

Parameters:

Actions:

Requires:

Sample Usage:

Parameters:

  • collectors (Any) (defaults to: lookup('profile::toolforge::grid::base::collectors'))


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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'modules/profile/manifests/toolforge/grid/node/web/lighttpd.pp', line 13

class profile::toolforge::grid::node::web::lighttpd(
    $collectors = lookup('profile::toolforge::grid::base::collectors'),
) {
    include profile::toolforge::grid::node::web

    $php_cgi_package = debian::codename() ? {
        'buster'  => 'php7.3-cgi',
        default   => fail('unsupported debian version'),
    }

    package { $php_cgi_package:
        ensure => latest,
    }

    package { [
        'lighttpd',
        'lighttpd-mod-magnet',        #T70614
        ]:
        ensure  => latest,
        require => File['/var/run/lighttpd'],
    }

    service { 'lighttpd':
        ensure  => stopped,
        require => Package['lighttpd'],
    }

    sonofgridengine::join { "queues-${facts['fqdn']}":
        sourcedir => "${collectors}/queues",
        list      => [ 'webgrid-lighttpd' ],
    }

    file { '/var/run/lighttpd':
        ensure => directory,
        owner  => 'www-data',
        group  => 'www-data',
        mode   => '1777',
    }

    # Override dpkg to specify mode 1777 for /var/run/lighttpd
    #
    #  Without this, lighttpd's init script recreates the directory
    #  on startup with the wrong permissions.
    #
    #  TT142932
    exec { 'var-run-lighttpd-permissions':
        command => '/usr/bin/dpkg-statoverride --add www-data www-data 1777 /var/run/lighttpd',
        unless  => '/usr/bin/dpkg-statoverride --list /var/run/lighttpd',
    }
}