Puppet Class: profile::microsites::peopleweb

Defined in:
modules/profile/manifests/microsites/peopleweb.pp

Overview

let users publish their own HTML in their home dirs

Parameters:

  • deployment_server (Any) (defaults to: hiera('deployment_server'))


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
48
49
50
51
52
# File 'modules/profile/manifests/microsites/peopleweb.pp', line 2

class profile::microsites::peopleweb (
    $deployment_server = hiera('deployment_server'),
){

    include ::profile::waf::apache2::administrative

    ferm::service { 'people-http':
        proto  => 'tcp',
        port   => '80',
        srange => '$CACHES',
    }

    ferm::service { 'people-http-deployment':
        proto  => 'tcp',
        port   => '80',
        srange => "(@resolve((${deployment_server})) @resolve((${deployment_server}), AAAA))"
    }

    if os_version('debian == jessie') {
        $php_version = '5'
    } else {
        $php_version = '7.0'
    }

    require_package("libapache2-mod-php${php_version}")

    class { '::httpd':
        modules => ['userdir', 'cgi', "php${php_version}", 'rewrite', 'headers'],
    }

    class { '::httpd::mpm':
        mpm => 'prefork'
    }

    class { '::publichtml':
        sitename     => 'people.wikimedia.org',
        server_admin => 'noc@wikimedia.org',
    }

    motd::script { 'people-motd':
        ensure  => present,
        content => "#!/bin/sh\necho '\nThis is people.wikimedia.org.\nFiles you put in 'public_html' in your home dir will be accessible on the web.\nMore info on https://wikitech.wikimedia.org/wiki/People.wikimedia.org.\n'",
    }

    backup::set {'home': }

    rsyslog::input::file { 'apache2-error':
        path => '/var/log/apache2/*error*.log',
    }

}