Puppet Class: dumps::web::dirs

Defined in:
modules/dumps/manifests/web/dirs.pp

Overview

Parameters:

  • datadir (Any) (defaults to: undef)
  • xmldumpsdir (Any) (defaults to: undef)
  • miscdatasetsdir (Any) (defaults to: undef)
  • user (Any) (defaults to: undef)
  • group (Any) (defaults to: undef)


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
52
53
54
55
56
57
58
59
60
# File 'modules/dumps/manifests/web/dirs.pp', line 1

class dumps::web::dirs(
    $datadir = undef,
    $xmldumpsdir = undef,
    $miscdatasetsdir = undef,
    $user = undef,
    $group = undef,
) {
    class {'dumps::server_dirs':
        datadir         => $datadir,
        xmldumpsdir     => $xmldumpsdir,
        miscdatasetsdir => $miscdatasetsdir,
        user            => $user,
        group           => $group,
    }

    $analyticsdir             = "${miscdatasetsdir}/analytics"
    $othertestfilesdir        = "${miscdatasetsdir}/testfiles"
    $miscdatasetsdir_wikidata_legacy = "${miscdatasetsdir}/wikidata"
    $miscdatasetsdir_wikibase        = "${miscdatasetsdir}/wikibase/"
    $miscdatasetsdir_commons_legacy  = "${miscdatasetsdir}/commons"
    $relative_wikidatawiki    = 'other/wikibase/wikidatawiki'
    $relative_commonswiki     = 'other/wikibase/commonswiki'
    $enterprisedir            = "${miscdatasetsdir}/enterprise_html"
    $enterpriserunsdir        = "${enterprisedir}/runs"

    # subdirs for misc datasets that aren't dumps
    file { [ $analyticsdir, $othertestfilesdir ]:
        ensure => 'directory',
        mode   => '0755',
        owner  => $user,
        group  => $group,
    }

    # subdirs for various wikibase weekly dumps
    file { [ $miscdatasetsdir_wikibase, "${xmldumpsdir}/${relative_wikidatawiki}",
        $miscdatasetsdir_wikidata_legacy, "${xmldumpsdir}/${relative_commonswiki}",
        $miscdatasetsdir_commons_legacy ]:
        ensure => 'directory',
        mode   => '0755',
        owner  => $user,
        group  => $group,
    }
    # T72385: needs to be relative because it is mounted via NFS at differing names
    file { "${xmldumpsdir}/wikidatawiki/entities":
        ensure => 'link',
        target => "../${relative_wikidatawiki}",
    }
    file { "${xmldumpsdir}/commonswiki/entities":
        ensure => 'link',
        target => "../${relative_commonswiki}",
    }

    # subdirs for Wikimedia Enterprise datasets
    file { [ $enterprisedir, $enterpriserunsdir ]:
        ensure => 'directory',
        mode   => '0755',
        owner  => $user,
        group  => $group,
    }
}