Puppet Class: role::labs::ores::worker

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

Overview

filtertags: labs-project-ores



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

class role::labs::ores::worker {
    include ::ores::worker
    include ::role::labs::ores::redisproxy

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

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

    if !defined(File['/srv/log']) {
        file { '/srv/log':
            ensure => 'directory',
            mode   => '0755',
            owner  => 'root',
            group  => 'root',
        }
    }

    if !defined(File['/srv/log/ores']) {
        file { '/srv/log/ores':
            ensure => 'directory',
            mode   => '0755',
            owner  => 'www-data',
            group  => 'www-data',
        }
    }

}