Puppet Class: profile::parsoid::testing

Defined in:
modules/profile/manifests/parsoid/testing.pp

Overview

Parsoid roundtrip testing, Parsoid & PHP parser visual diff testing

Parameters:

  • parsoid_port (Stdlib::Port) (defaults to: hiera('parsoid::testing::parsoid_port'))
  • default_api_proxy_uri (Stdlib::Httpurl) (defaults to: hiera('parsoid::testing::default_api_proxy_uri'))


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
# File 'modules/profile/manifests/parsoid/testing.pp', line 2

class profile::parsoid::testing (
    Stdlib::Port $parsoid_port = hiera('parsoid::testing::parsoid_port'),
    Stdlib::Httpurl $default_api_proxy_uri = hiera('parsoid::testing::default_api_proxy_uri'),
) {

    class { '::parsoid':
        port       => $parsoid_port,
        deployment => 'git',
        no_workers => 1,
        conf       => template('testreduce/parsoid-rt.config.yaml.erb'),
    }

    base::service_auto_restart { 'parsoid': }

    git::clone { 'mediawiki/services/parsoid':
        branch    => 'master',
        owner     => 'root',
        group     => 'wikidev',
        directory => '/srv/parsoid-testing',
        shared    => true,
    }

    file { '/usr/local/bin/update_parsoid.sh':
        source => 'puppet:///modules/parsoid/parsoid_testing.update_parsoid.sh',
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
    }

    # mysql client and configuration to provide command line access to
    # parsoid testing database
    include ::passwords::testreduce::mysql
    $parsoid_cli_password = $passwords::testreduce::mysql::mysql_client_pass
    $parsoid_test_db_host = 'm5-master.eqiad.wmnet'

    package { [
        'mysql-client',
        ]: ensure => present,
    }

    file { '/etc/my.cnf':
        content => template('role/mariadb/mysqld_config/parsoid_testing.my.cnf'),
        owner   => 'root',
        group   => 'parsoid-test-roots',
        mode    => '0440',
    }

    nginx::site { 'nginx-parsoid-testing':
        content => template('parsoid/parsoid-testing.nginx.conf.erb'),
        notify  => Service['nginx'],
    }

    ferm::service { 'nginx-parsoid-testing':
        proto  => 'tcp',
        port   => 8001,
        srange => '$PRODUCTION_NETWORKS',
    }

    # Presented by the @remote links shown on parsoid-rt-tests.wikimedia.org
    ferm::service { 'parsoid-testing':
        proto  => 'tcp',
        port   => 8142,
        srange => '$PRODUCTION_NETWORKS',
    }
}