Puppet Class: releases

Defined in:
modules/releases/manifests/init.pp

Overview

Parameters:

  • sitename (Optional[String]) (defaults to: undef)
  • sitename_jenkins (Optional[String]) (defaults to: undef)
  • server_admin (String) (defaults to: 'noc@wikimedia.org')
  • prefix (Stdlib::Unixpath) (defaults to: '/')
  • http_port (Stdlib::Port) (defaults to: '8080')


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
# File 'modules/releases/manifests/init.pp', line 4

class releases (
    Optional[String] $sitename = undef,
    Optional[String] $sitename_jenkins = undef,
    String $server_admin = 'noc@wikimedia.org',
    Stdlib::Unixpath $prefix = '/',
    Stdlib::Port $http_port = '8080',
) {

    ensure_resource('file', '/srv/mediawiki', {'ensure' => 'directory' })
    ensure_resource('file', '/srv/patches', {'ensure' => 'directory' })
    ensure_resource('file', '/srv/org', {'ensure' => 'directory' })
    ensure_resource('file', '/srv/org/wikimedia', {'ensure' => 'directory' })
    ensure_resource('file', '/srv/org/wikimedia/releases', {'ensure' => 'directory' })

    git::clone { 'mediawiki/core':
        directory => '/srv/mediawiki/core',
        require   => File['/srv/mediawiki'],
        bare      => true,
    }
    git::clone { 'mediawiki/tools/release':
        ensure    => 'latest',
        directory => '/srv/mediawiki/release-tools',
        require   => File['/srv/mediawiki'],
    }

    file { '/srv/org/wikimedia/releases/mediawiki':
        ensure  => 'directory',
        mode    => '2775',
        owner   => 'root',
        group   => 'releasers-mediawiki',
        require => File['/srv/org/wikimedia/releases'],
    }

    file { '/srv/org/wikimedia/releases/wikidiff2':
        ensure  => 'directory',
        mode    => '2775',
        owner   => 'root',
        group   => 'releasers-wikidiff2',
        require => File['/srv/org/wikimedia/releases'],
    }

    file { '/srv/org/wikimedia/releases/releases-header.html':
        ensure => 'present',
        mode   => '0444',
        owner  => 'www-data',
        group  => 'www-data',
        source => 'puppet:///modules/releases/releases-header.html',
    }

    file { '/srv/org/wikimedia/releases/mediawiki/releases-header-mw.html':
        ensure => 'present',
        mode   => '0444',
        owner  => 'www-data',
        group  => 'www-data',
        source => 'puppet:///modules/releases/releases-header-mw.html',
    }

    package { 'python3-pygerrit2':
        ensure => present,
    }
}