Puppet Class: role::labs::ores::lb

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

Overview

Simple nginx HTTP load balancer for ores

filtertags: labs-project-ores



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'modules/role/manifests/labs/ores/lb.pp', line 4

class role::labs::ores::lb {
    labs_lvm::volume { 'srv':
        mountat => '/srv',
    }
    $realservers = hiera('role::labs::ores::lb::realservers')
    $cache = str2bool(hiera('role::labs::ores::lb::cache', ''))

    if $cache {
        file { [
            '/srv/nginx/',
            '/srv/nginx/cache',
            '/srv/nginx/tmp',
        ]:
            ensure => directory,
            owner  => 'www-data',
            group  => 'www-data',
            mode   => '0775',
        }
    }
    nginx::site { 'ores-lb':
        content => template('role/ores/lb.nginx.erb'),
        require => Labs_lvm::Volume['srv'],
    }
}