Puppet Class: profile::releases::mediawiki

Defined in:
modules/profile/manifests/releases/mediawiki.pp

Overview

server hosting MediaWiki releases releases.wikimedia.org/mediawiki/

Parameters:

  • sitename (Stdlib::Fqdn) (defaults to: lookup('profile::releases::mediawiki::sitename'))
  • sitename_jenkins (Stdlib::Fqdn) (defaults to: lookup('profile::releases::mediawiki::sitename_jenkins'))
  • prefix (Stdlib::Unixpath) (defaults to: lookup('profile::releases::mediawiki::prefix'))
  • http_port (Stdlib::Port) (defaults to: lookup('profile::releases::mediawiki::http_port'))
  • server_admin (String) (defaults to: lookup('profile::releases::mediawiki::server_admin'))
  • jenkins_agent_username (String) (defaults to: lookup('jenkins_agent_username'))
  • jenkins_agent_key (String) (defaults to: lookup('profile::releases::mediawiki::jenkins_agent_key'))


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
# File 'modules/profile/manifests/releases/mediawiki.pp', line 3

class profile::releases::mediawiki (
    Stdlib::Fqdn $sitename = lookup('profile::releases::mediawiki::sitename'),
    Stdlib::Fqdn $sitename_jenkins = lookup('profile::releases::mediawiki::sitename_jenkins'),
    Stdlib::Unixpath $prefix = lookup('profile::releases::mediawiki::prefix'),
    Stdlib::Port $http_port = lookup('profile::releases::mediawiki::http_port'),
    String $server_admin = lookup('profile::releases::mediawiki::server_admin'),
    String $jenkins_agent_username = lookup('jenkins_agent_username'),
    String $jenkins_agent_key = lookup('profile::releases::mediawiki::jenkins_agent_key'),
){
    class { '::jenkins':
        access_log => true,
        http_port  => $http_port,
        prefix     => $prefix,
        umask      => '0002',
    }

    base::service_auto_restart { 'jenkins': }

    # Master connect to itself via the fqdn / primary IP ipaddress
    class { 'jenkins::slave':
        ssh_key => $jenkins_agent_key,
        user    => $jenkins_agent_username,
        workdir => '/srv/jenkins-slave',
    }

    class { '::releases':
        sitename         => $sitename,
        sitename_jenkins => $sitename_jenkins,
        http_port        => $http_port,
        prefix           => $prefix,
    }

    httpd::site { $sitename_jenkins:
        content => template('releases/apache-jenkins.conf.erb'),
    }

    monitoring::service { 'http_releases_jenkins':
        description   => "HTTP ${sitename_jenkins}",
        check_command => "check_http_url!${sitename_jenkins}!/login",
        notes_url     => 'https://wikitech.wikimedia.org/wiki/Releases.wikimedia.org#Jenkins',
    }
}