Puppet Class: openstack::wikitech::web

Defined in:
modules/openstack/manifests/wikitech/web.pp

Overview

Parameters:

  • webserver_hostname (String)
  • wikidb (String)
  • wikitech_nova_ldap_proxyagent_pass (String)
  • wikitech_nova_ldap_user_pass (String)
  • phabricator_api_token (String)
  • gerrit_api_user (String)
  • gerrit_api_password (String)
  • gitlab_api_token (String)
  • public_rewrites (Boolean) (defaults to: true)
  • php_fpm_fcgi_endpoint (String) (defaults to: 'unix:/run/php/fpm-www-7.4.sock|fcgi://localhost')


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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'modules/openstack/manifests/wikitech/web.pp', line 2

class openstack::wikitech::web(
    String $webserver_hostname,
    String $wikidb,
    String $wikitech_nova_ldap_proxyagent_pass,
    String $wikitech_nova_ldap_user_pass,
    String $phabricator_api_token,
    String $gerrit_api_user,
    String $gerrit_api_password,
    String $gitlab_api_token,
    Boolean $public_rewrites = true,
    String $php_fpm_fcgi_endpoint = 'unix:/run/php/fpm-www-7.4.sock|fcgi://localhost',
) {

    class {'::openstack::wikitech::wikitechprivatesettings':
        wikitech_nova_ldap_proxyagent_pass => $wikitech_nova_ldap_proxyagent_pass,
        wikitech_nova_ldap_user_pass       => $wikitech_nova_ldap_user_pass,
        phabricator_api_token              => $phabricator_api_token,
        gerrit_api_user                    => $gerrit_api_user,
        gerrit_api_password                => $gerrit_api_password,
        gitlab_api_token                   => $gitlab_api_token,
    }

    backup::set {'cloudweb-srv-backup': }

    httpd::site { $webserver_hostname:
        content => template('openstack/wikitech/wikitech-web.wikimedia.org.erb'),
    }

    file {
        '/var/www/robots.txt':
            ensure => 'present',
            owner  => 'root',
            group  => 'root',
            mode   => '0644',
            source => 'puppet:///modules/openstack/wikitech/wikitech-robots.txt';
        '/usr/local/apache':
            ensure => 'directory',
            owner  => 'root',
            group  => 'root';
        '/usr/local/apache/common':
            ensure => link,
            target => '/usr/local/apache/common-local';
        '/usr/local/apache/common-local':
            ensure => link,
            target => '/srv/mediawiki';
    }

    systemd::timer::job { 'wikitech_run_jobs':
        ensure             => present,
        description        => 'Run Wikitech runJobs.php maintenance script',
        command            => "/usr/local/bin/mwscript maintenance/runJobs.php --wiki=${wikidb}",
        interval           => {
        'start'    => 'OnCalendar',
        'interval' => '*-*-* *:*:00', # Every minute
        },
        logging_enabled    => false,
        monitoring_enabled => false,
        user               => $::mediawiki::users::web,
    }

    file { '/etc/wikitech-logoutd.ini':
        content => "[logoutd]\ndbname=${wikidb}\n",
        owner   => 'root',
        group   => 'root',
        mode    => '0444',
    }

    profile::logoutd::script { 'wikitech':
        source => 'puppet:///modules/openstack/wikitech/wikitech-logout.py',
    }
}