Puppet Class: profile::oozie::server

Defined in:
modules/profile/manifests/oozie/server.pp

Overview

Class role::analytics_cluster::oozie::server

Installs the Oozie server.

Parameters:

  • monitoring_enabled (Any) (defaults to: hiera('profile::oozie::server::monitoring_enabled', false))
  • ferm_srange (Any) (defaults to: hiera('profile::oozie::server::ferm_srange', '$DOMAIN_NETWORKS'))
  • jvm_opts (Any) (defaults to: hiera('profile::oozie::server::jvm_opts', '-Xmx2048m'))
  • java_home (Any) (defaults to: hiera('profile::oozie::server::java_home', '/usr/lib/jvm/java-8-openjdk-amd64/jre'))
  • oozie_service_kerberos_enabled (Any) (defaults to: hiera('profile::oozie::server::oozie_service_kerberos_enabled', undef))
  • local_realm (Any) (defaults to: hiera('profile::oozie::server::local_realm', undef))
  • oozie_service_keytab_file (Any) (defaults to: hiera('profile::oozie::server::oozie_service_keytab_file', undef))
  • oozie_service_kerberos_principal (Any) (defaults to: hiera('profile::oozie::server::oozie_service_kerberos_principal', undef))
  • oozie_authentication_type (Any) (defaults to: hiera('profile::oozie::server::oozie_authentication_type', undef))
  • oozie_authentication_kerberos_principal (Any) (defaults to: hiera('profile::oozie::server::oozie_authentication_kerberos_principal', undef))
  • oozie_authentication_kerberos_name_rules (Any) (defaults to: hiera('profile::oozie::server::oozie_authentication_kerberos_name_rules', undef))
  • hcatalog_enabled (Any) (defaults to: hiera('profile::oozie::server::hcatalog_enabled', true))
  • use_kerberos (Any) (defaults to: hiera('profile::oozie::server::use_kerberos', false))
  • jdbc_host (Stdlib::Host) (defaults to: lookup('profile::oozie::server::jdbc_host', { 'default_value' => 'localhost' }))
  • jdbc_port (Integer) (defaults to: lookup('profile::oozie::server::jdbc_port', { 'default_value' => 3306 }))
  • jdbc_database (Any) (defaults to: hiera('profile::oozie::server::jdbc_database', undef))
  • jdbc_username (Any) (defaults to: hiera('profile::oozie::server::jdbc_username', undef))
  • jdbc_password (Any) (defaults to: hiera('profile::oozie::server::jdbc_password', undef))
  • spark_defaults_config_dir (Any) (defaults to: hiera('profile::oozie::server::spark_defaults_config_dir', undef))
  • oozie_sharelib_archive (Any) (defaults to: hiera('profile::oozie::server::oozie_sharelib_archive', '/usr/lib/oozie/oozie-sharelib-yarn'))


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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'modules/profile/manifests/oozie/server.pp', line 5

class profile::oozie::server(
    $monitoring_enabled                       = hiera('profile::oozie::server::monitoring_enabled', false),
    $ferm_srange                              = hiera('profile::oozie::server::ferm_srange', '$DOMAIN_NETWORKS'),
    $jvm_opts                                 = hiera('profile::oozie::server::jvm_opts', '-Xmx2048m'),
    $java_home                                = hiera('profile::oozie::server::java_home', '/usr/lib/jvm/java-8-openjdk-amd64/jre'),
    $oozie_service_kerberos_enabled           = hiera('profile::oozie::server::oozie_service_kerberos_enabled', undef),
    $local_realm                              = hiera('profile::oozie::server::local_realm', undef),
    $oozie_service_keytab_file                = hiera('profile::oozie::server::oozie_service_keytab_file', undef),
    $oozie_service_kerberos_principal         = hiera('profile::oozie::server::oozie_service_kerberos_principal', undef),
    $oozie_authentication_type                = hiera('profile::oozie::server::oozie_authentication_type', undef),
    $oozie_authentication_kerberos_principal  = hiera('profile::oozie::server::oozie_authentication_kerberos_principal', undef),
    $oozie_authentication_kerberos_name_rules = hiera('profile::oozie::server::oozie_authentication_kerberos_name_rules', undef),
    $hcatalog_enabled                         = hiera('profile::oozie::server::hcatalog_enabled', true),
    $use_kerberos                             = hiera('profile::oozie::server::use_kerberos', false),
    Stdlib::Host $jdbc_host                   = lookup('profile::oozie::server::jdbc_host', { 'default_value' => 'localhost' }),
    Integer $jdbc_port                        = lookup('profile::oozie::server::jdbc_port', { 'default_value' => 3306 }),
    $jdbc_database                            = hiera('profile::oozie::server::jdbc_database', undef),
    $jdbc_username                            = hiera('profile::oozie::server::jdbc_username', undef),
    $jdbc_password                            = hiera('profile::oozie::server::jdbc_password', undef),
    $spark_defaults_config_dir                = hiera('profile::oozie::server::spark_defaults_config_dir', undef),
    $oozie_sharelib_archive                   = hiera('profile::oozie::server::oozie_sharelib_archive', '/usr/lib/oozie/oozie-sharelib-yarn'),
) {
    require ::profile::oozie::client

    # cdh::oozie::server will ensure that its MySQL DB is
    # properly initialized.  For puppet to do this,
    # it needs a mysql client.
    require_package('mysql-client')

    class { '::cdh::oozie::server':
        smtp_host                                   => 'localhost',
        smtp_from_email                             => "oozie@${::fqdn}",
        # This is not currently working.  Disabling
        # this allows any user to manage any Oozie
        # job.  Since access to our cluster is limited,
        # this isn't a big deal.  But, we should still
        # figure out why this isn't working and
        # turn it back on.
        # I was not able to kill any oozie jobs
        # with this on, even though the
        # oozie.service.ProxyUserService.proxyuser.*
        # settings look like they are properly configured.
        authorization_service_authorization_enabled => false,
        jvm_opts                                    => $jvm_opts,
        java_home                                   => $java_home,
        oozie_service_kerberos_enabled              => $oozie_service_kerberos_enabled,
        local_realm                                 => $local_realm,
        oozie_service_keytab_file                   => $oozie_service_keytab_file,
        oozie_service_kerberos_principal            => $oozie_service_kerberos_principal,
        oozie_authentication_type                   => $oozie_authentication_type,
        oozie_authentication_kerberos_principal     => $oozie_authentication_kerberos_principal,
        oozie_authentication_kerberos_name_rules    => $oozie_authentication_kerberos_name_rules,
        hcatalog_enabled                            => $hcatalog_enabled,
        use_kerberos                                => $use_kerberos,
        jdbc_host                                   => $jdbc_host,
        jdbc_port                                   => $jdbc_port,
        jdbc_database                               => $jdbc_database,
        jdbc_username                               => $jdbc_username,
        jdbc_password                               => $jdbc_password,
        spark_defaults_config_dir                   => $spark_defaults_config_dir,
        oozie_sharelib_archive                      => $oozie_sharelib_archive,
    }

    # Oozie is creating event logs in /var/log/oozie.
    # It rotates them but does not delete old ones.  Set up cronjob to
    # delete old files in this directory.
    cron { 'oozie-clean-logs':
        command => 'test -d /var/log/oozie && /usr/bin/find /var/log/oozie -type f -mtime +7 -exec rm {} >/dev/null \;',
        minute  => 5,
        hour    => 0,
        require => Class['cdh::oozie::server'],
    }

    ferm::service{ 'oozie_server':
        proto  => 'tcp',
        port   => '11000',
        srange => $ferm_srange,
    }

    # Include icinga alerts if production realm.
    if $monitoring_enabled {
        include ::profile::oozie::monitoring::server

        nrpe::monitor_service { 'oozie':
            description   => 'Oozie Server',
            nrpe_command  => '/usr/lib/nagios/plugins/check_procs -c 1:1 -C java -a "org.apache.catalina.startup.Bootstrap"',
            contact_group => 'admins,analytics',
            require       => Class['cdh::hive::metastore'],
            notes_url     => 'https://wikitech.wikimedia.org/wiki/Analytics/Systems/Cluster/Oozie',
        }
    }
}