Puppet Class: profile::openstack::base::wikitech::web

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

Overview

Parameters:

  • osm_host (Any) (defaults to: hiera('profile::openstack::base::wikitech::web::osm_host'))
  • webserver_hostname_aliases (Any) (defaults to: hiera('profile::openstack::base::wikitech::webserver_hostname_aliases'))
  • wikidb (Any) (defaults to: hiera('profile::openstack::base::wikitech::db_name'))
  • wikitech_nova_ldap_proxyagent_pass (Any) (defaults to: hiera('profile::openstack::base::ldap_proxyuser_pass'))
  • wikitech_nova_ldap_user_pass (Any) (defaults to: hiera('profile::openstack::base::ldap_user_pass'))
  • phabricator_api_token (Any) (defaults to: hiera('profile::openstack::base::wikitech::web::phabricator_api_token'))
  • gerrit_api_user (Any) (defaults to: hiera('profile::openstack::base::wikitech::web::gerrit_api_user'))
  • gerrit_api_password (Any) (defaults to: hiera('profile::openstack::base::wikitech::web::gerrit_api_password'))


1
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'modules/profile/manifests/openstack/base/wikitech/web.pp', line 1

class profile::openstack::base::wikitech::web(
    $osm_host = hiera('profile::openstack::base::wikitech::web::osm_host'),
    $webserver_hostname_aliases = hiera('profile::openstack::base::wikitech::webserver_hostname_aliases'),
    $wikidb = hiera('profile::openstack::base::wikitech::db_name'),
    $wikitech_nova_ldap_proxyagent_pass = hiera('profile::openstack::base::ldap_proxyuser_pass'),
    $wikitech_nova_ldap_user_pass = hiera('profile::openstack::base::ldap_user_pass'),
    $phabricator_api_token = hiera('profile::openstack::base::wikitech::web::phabricator_api_token'),
    $gerrit_api_user = hiera('profile::openstack::base::wikitech::web::gerrit_api_user'),
    $gerrit_api_password = hiera('profile::openstack::base::wikitech::web::gerrit_api_password'),
) {

    require profile::mediawiki::common
    require ::profile::services_proxy::envoy

    class {'::mediawiki::packages::fonts': }
    class {'::profile::backup::host':}

    class { '::scap::scripts': }

    # Wikitech needs to talk to LDAP directories
    php::extension { 'ldap':
        package_name => 'php7.2-ldap',
    }

    # Packages (potentially) used for local image scaling, this can be removed once
    # Thumbor has been setup for labweb:
    package { [
        'fontconfig-config',
        'libimage-exiftool-perl',
        'libjpeg-turbo-progs',
        'netpbm',
    ]:
        ensure => present,
    }

    httpd::conf { 'server_header':
        content  => template('mediawiki/apache/server-header.conf.erb'),
    }

    # Add headers lost by mod_proxy_fastcgi
    httpd::conf { 'fcgi_headers':
        source   => 'puppet:///modules/mediawiki/apache/configs/fcgi_headers.conf',
        priority => 0,
    }

    # Remove old common snippets
    file { '/etc/apache2/sites-enabled/wikimedia-common.incl':
        ensure  => absent,
    }

    file { '/etc/apache2/sites-enabled/wikimedia-legacy.incl':
        ensure => absent,
    }

    file { '/etc/apache2/sites-enabled/public-wiki-rewrites.incl':
        ensure => absent
    }

    file { '/etc/apache2/sites-enabled/api-rewrites.incl':
        ensure => absent,
    }

    file { '/etc/apache2/sites-enabled/wikidata-uris.incl':
        ensure => absent,
    }

    # For Math extensions file (T126628)
    file { '/srv/math-images':
        ensure => 'directory',
        owner  => 'www-data',
        group  => 'www-data',
        mode   => '0755',
    }

    class { '::openstack::wikitech::web':
        webserver_hostname                 => $osm_host,
        webserver_hostname_aliases         => $webserver_hostname_aliases,
        wikidb                             => $wikidb,
        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,
    }

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