Puppet Class: statistics::dataset_mount
- Defined in:
- modules/statistics/manifests/dataset_mount.pp
Overview
Class statistics::dataset_mount
Mounts /data from dumps/datasets nfs server. xmldumps and other misc files needed for generating statistics are here.
NOTE: This class has nothing to do with the datasets site hosted at 'datasets.wikimedia.org'.
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/statistics/manifests/dataset_mount.pp', line 9
class statistics::dataset_mount (
$dumps_servers,
$dumps_active_server,
){
# need this for NFS mounts.
ensure_packages('nfs-common')
file {'/mnt/nfs':
ensure => 'directory',
}
file { '/mnt/nfs/README':
ensure => 'present',
source => 'puppet:///modules/statistics/dumps-nfsmount-readme.txt',
owner => 'root',
group => 'root',
mode => '0644',
require => File['/mnt/nfs'],
}
$dumps_servers.each |String $server| {
file { "/mnt/nfs/dumps-${server}":
ensure => 'directory',
owner => 'dumpsgen',
group => 'dumpsgen',
}
mount { "/mnt/nfs/dumps-${server}":
ensure => 'mounted',
device => "${server}:/",
fstype => 'nfs',
options => 'ro,bg,tcp,rsize=8192,wsize=8192,timeo=14,intr',
atboot => true,
require => File["/mnt/nfs/dumps-${server}"],
}
}
file { ['/mnt/data',
'/mnt/data/xmldatadumps/']:
ensure => 'directory',
owner => 'root',
group => 'root',
mode => '0755',
}
file { '/mnt/data/xmldatadumps/public':
ensure => 'link',
target => "/mnt/nfs/dumps-${dumps_active_server}",
require => Mount["/mnt/nfs/dumps-${dumps_active_server}"],
}
}
|