Puppet Class: profile::labs::ores::lb

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

Overview

SPDX-License-Identifier: Apache-2.0 Simple nginx HTTP load balancer for ores

Parameters:

  • realservers (Array) (defaults to: lookup('role::labs::ores::lb::realservers'))
  • cache (Optional[Boolean]) (defaults to: str2bool(lookup('role::labs::ores::lb::cache',{'default_value' => ''})))


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
# File 'modules/profile/manifests/labs/ores/lb.pp', line 4

class profile::labs::ores::lb (
    Array $realservers = lookup('role::labs::ores::lb::realservers'),
    Optional[Boolean] $cache = str2bool(lookup('role::labs::ores::lb::cache',{'default_value' => ''})),
){

    labs_lvm::volume { 'srv':
        mountat => '/srv',
    }

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