Puppet Class: profile::releases::reprepro

Defined in:
modules/profile/manifests/releases/reprepro.pp

Overview

server hosting MediaWiki releases releases.wikimedia.org/mediawiki/

Parameters:

  • primary_server (Stdlib::Fqdn) (defaults to: lookup('releases_server'))
  • secondary_servers (Array[Stdlib::Fqdn]) (defaults to: lookup('releases_servers_failover'))


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
# File 'modules/profile/manifests/releases/reprepro.pp', line 3

class profile::releases::reprepro(
    Stdlib::Fqdn $primary_server = lookup('releases_server'),
    Array[Stdlib::Fqdn] $secondary_servers = lookup('releases_servers_failover'),
){

  class { '::releases::reprepro': }

  # ssh-based uploads from deployment servers
  ferm::service { 'deployment_package_upload':
      ensure => present,
      proto  => 'tcp',
      port   => 'ssh',
      srange => '$DEPLOYMENT_HOSTS',
  }

    $all_secondary_servers = join($secondary_servers, ' ')
    $all_releases_servers = "${primary_server} ${all_secondary_servers}"
    $all_releases_servers_array = split($all_releases_servers, ' ')

    $all_releases_servers_array.each |String $releases_server| {
        unless $primary_server == $releases_server {
            rsync::quickdatacopy { "srv-org-wikimedia-reprepro-${releases_server}":
              ensure      => present,
              auto_sync   => true,
              delete      => true,
              source_host => $primary_server,
              dest_host   => $releases_server,
              module_path => '/srv/org/wikimedia/reprepro',
            }
        }
    }
}