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')


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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'modules/releases/manifests/init.pp', line 26

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

    git::clone { 'operations/deployment-charts':
        ensure    => 'latest',
        directory => '/srv/deployment-charts',
    }

    cron { 'git_pull_charts':
        ensure  => present,
        command => 'cd /srv/deployment-charts && /usr/bin/git pull >/dev/null 2>&1',
        minute  => '*/1',
    }

    file { '/srv/org/wikimedia/releases/charts':
        ensure  => 'link',
        target  => '/srv/deployment-charts/charts',
        require =>  Git::Clone['operations/deployment-charts'],
    }

    # T94486
    package { 'phpunit':
        ensure => present,
    }

    package { 'php-curl':
        ensure => present,
    }
}