Puppet Class: profile::analytics::geoip::archive

Defined in:
modules/profile/manifests/analytics/geoip/archive.pp

Overview

Class profile::analytics::geoip::archive

Downloads geoip data (MaxMind database) and archives to HDFS snapshots of the database over time.

Parameters:

  • archive_to_hdfs_host (Any) (defaults to: lookup('profile::analytics::geoip::archive::archive_host'))
  • use_kerberos (Any) (defaults to: lookup('profile::analytics::geoip::archive::use_kerberos'))


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'modules/profile/manifests/analytics/geoip/archive.pp', line 6

class profile::analytics::geoip::archive(
    $archive_to_hdfs_host = lookup('profile::analytics::geoip::archive::archive_host'),
    $use_kerberos         = lookup('profile::analytics::geoip::archive::use_kerberos'),
) {

    if $::hostname == $archive_to_hdfs_host {
        # Class to save old versions of the geoip MaxMind database, which are useful
        # for historical geocoding.
        if !defined(File['/srv/geoip']) {
            file { '/srv/geoip':
                ensure => directory,
                owner  => 'root',
                group  => 'wikidev',
            }
        }
        class { '::geoip::data::archive':
            archive_dir  => '/srv/geoip/archive',
            use_kerberos => $use_kerberos,
            require      => File['/srv/geoip'],
        }
    }
}