Puppet Class: profile::zuul::merger

Defined in:
modules/profile/manifests/zuul/merger.pp

Overview

Parameters:

  • conf_common (Any) (defaults to: hiera('zuul::common'))
  • conf_merger (Any) (defaults to: hiera('profile::zuul::merger::conf'))
  • ferm_srange (Any) (defaults to: hiera('profile::zuul::merger::ferm_srange'))


1
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
# File 'modules/profile/manifests/zuul/merger.pp', line 1

class profile::zuul::merger(
    $conf_common = hiera('zuul::common'),
    $conf_merger = hiera('profile::zuul::merger::conf'),
    $ferm_srange = hiera('profile::zuul::merger::ferm_srange'),
) {

    include ::zuul::monitoring::merger

    if os_version('debian == jessie') {
        apt::pin { 'git_from_backports':
            package  => 'git',
            pin      => 'release a=jessie-backports',
            priority => '1001',
            before   => Class['contint::zuul::git_daemon'],
        }
    }

    class { '::zuul::merger':
        # Shared settings
        gerrit_server       => $conf_common['gerrit_server'],
        gerrit_user         => $conf_common['gerrit_user'],

        # Merger related
        gearman_server      => $conf_merger['gearman_server'],
        gerrit_ssh_key_file => $conf_merger['gerrit_ssh_key_file'],
        git_dir             => $conf_merger['git_dir'],
        git_email           => $conf_merger['git_email'],
        git_name            => $conf_merger['git_name'],
        zuul_url            => $conf_merger['zuul_url'],
    }

    # Serves Zuul git repositories
    class { 'contint::zuul::git_daemon':
        zuul_git_dir => $conf_merger['git_dir'],
    }

    # We run a git-daemon process to expose the zuul-merger git repositories.
    # The slaves fetch changes from it over the git:// protocol.
    # It is only meant to be used from slaves, so only accept internal
    # connections.
    ferm::service { 'git-daemon_internal':
        proto  => 'tcp',
        port   => '9418',
        srange => $ferm_srange,
    }
}