Puppet Class: role::labs::ores::staging

Defined in:
modules/role/manifests/labs/ores/staging.pp

Overview

filtertags: labs-project-ores-staging



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
# File 'modules/role/manifests/labs/ores/staging.pp', line 2

class role::labs::ores::staging {
    include ::ores::base
    class { '::ores::web':
        ores_config_user  => 'nobody',
        ores_config_group => 'nogroup',
    }
    include ::ores::worker

    include ::role::labs::ores::lb

    class { '::ores::redis':
        cache_maxmemory => '512M',
        queue_maxmemory => '256M',
    }

    git::clone { 'ores-wm-config':
        ensure    => present,
        origin    => 'https://github.com/wikimedia/ores-wikimedia-config.git',
        directory => $ores::base::config_path,
        branch    => 'master',
        owner     => 'www-data',
        group     => 'www-data',
        require   => File['/srv/ores'],
        before    => Ores::Config['staging'],
    }

    ores::config { 'staging':
        config   => {
            'score_caches'     => {
                'ores_redis' => {
                    'host' => '127.0.0.1',
                    'port' => '6380',
                }
            },
            'score_processors' => {
                'ores_celery' => {
                    'broker_url'     => 'redis://127.0.0.1:6379',
                    'result_backend' => 'redis://127.0.0.1:6379',
                }
            },
            'scoring_systems'  => {
                'celery_queue' => {
                    'broker_url'     => 'redis://127.0.0.1:6379',
                    'result_backend' => 'redis://127.0.0.1:6379',
                }
            },
        },
        priority => '99',
    }

    file { '/srv/ores':
        ensure => directory,
        owner  => 'www-data',
        group  => 'www-data',
        mode   => '0775',
    }

    file { $ores::base::config_path:
        ensure  => directory,
        owner   => 'www-data',
        group   => 'www-data',
        require => File['/srv/ores'],
    }
}