Puppet Class: profile::dumps::generation::worker::common

Defined in:
modules/profile/manifests/dumps/generation/worker/common.pp

Overview

Parameters:

  • nfs_server (Any) (defaults to: hiera('dumps_nfs_server'))
  • managed_subdirs (Any) (defaults to: hiera('dumps_managed_subdirs'))
  • datadir_mount_type (Any) (defaults to: hiera('dumps_datadir_mount_type'))
  • extra_mountopts (Any) (defaults to: hiera('profile::dumps::generation::worker::common::nfs_extra_mountopts'))
  • php (Any) (defaults to: hiera('profile::dumps::generation::worker::common::php'))


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
47
48
49
50
51
# File 'modules/profile/manifests/dumps/generation/worker/common.pp', line 1

class profile::dumps::generation::worker::common(
    $nfs_server = hiera('dumps_nfs_server'),
    $managed_subdirs = hiera('dumps_managed_subdirs'),
    $datadir_mount_type = hiera('dumps_datadir_mount_type'),
    $extra_mountopts = hiera('profile::dumps::generation::worker::common::nfs_extra_mountopts'),
    $php = hiera('profile::dumps::generation::worker::common::php'),
) {
    # mw packages and dependencies
    require ::profile::mediawiki::scap_proxy
    require ::profile::mediawiki::common
    require ::profile::mediawiki::nutcracker
    require ::profile::mediawiki::mcrouter_wancache
    require ::profile::services_proxy

    $xmldumpsmount = '/mnt/dumpsdata'

    class { '::dumpsuser': }

    snapshot::dumps::datamount { 'dumpsdatamount':
        mountpoint      => $xmldumpsmount,
        mount_type      => $datadir_mount_type,
        extra_mountopts => $extra_mountopts,
        server          => $nfs_server,
        managed_subdirs => $managed_subdirs,
        user            => 'dumpsgen',
        group           => 'dumpsgen',
    }

    # dataset server config files,
    # stages files, dblists, html templates
    class { '::snapshot::dumps::dirs':
        user               => 'dumpsgen',
        xmldumpsmount      => $xmldumpsmount,
        xmldumpspublicdir  =>  "${xmldumpsmount}/xmldatadumps/public",
        xmldumpsprivatedir =>  "${xmldumpsmount}/xmldatadumps/private",
        dumpstempdir       =>  "${xmldumpsmount}/xmldatadumps/temp",
        cronsdir           =>  "${xmldumpsmount}/otherdumps",
        apachedir          => '/srv/mediawiki',
    }
    class { '::snapshot::dumps': php => $php}

    # scap3 deployment of dump scripts
    scap::target { 'dumps/dumps':
        deploy_user => 'dumpsgen',
        manage_user => false,
        key_name    => 'dumpsdeploy',
    }
    ssh::userkey { 'dumpsgen':
        content => secret('keyholder/dumpsdeploy.pub'),
    }
}