Puppet Class: openstack::wikitech::web

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

Overview

Parameters:

  • webserver_hostname (String)
  • webserver_hostname_aliases (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)


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
73
74
# File 'modules/openstack/manifests/wikitech/web.pp', line 2

class openstack::wikitech::web(
    String $webserver_hostname,
    String $webserver_hostname_aliases,
    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,
) {

    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,
    }

    require_package([
        'python-mysqldb',
        'python-keystone',
        'php-ldap']
    )

    backup::set {'a-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';
    }

    # TODO: Remove after change is applied
    cron { 'db-bak':
        ensure => absent,
    }

    cron { 'backup-cleanup':
        ensure => absent,
    }

    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        => true,
        monitoring_contact_groups => 'wmcs-team',
        user                      => $::mediawiki::users::web,
    }
}