Puppet Class: hadoop::httpfs::config

Defined in:
manifests/httpfs/config.pp

Overview

Class hadoop::httpfs::config



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
61
62
63
64
65
66
# File 'manifests/httpfs/config.pp', line 3

class hadoop::httpfs::config {
  contain hadoop::common::config
  contain hadoop::common::hdfs::config

  $keytab = $hadoop::keytab_httpfs

  file { "${::hadoop::confdir_httpfs}/httpfs-site.xml":
    owner   => 'root',
    group   => 'root',
    mode    => '0644',
    content => template('hadoop/hadoop/httpfs-site.xml.erb'),
  }

  if $hadoop::realm and $hadoop::realm != '' {
    file { $keytab:
      owner => 'httpfs',
      group => 'httpfs',
      mode  => '0400',
      alias => 'httpfs-hadoop.service.keytab',
    }
  }

  if $hadoop::https {
    file { "${::hadoop::httpfs_homedir}/.keystore":
      owner  => 'httpfs',
      group  => 'httpfs',
      mode   => '0400',
      source => $::hadoop::https_keystore,
    }

    file { "${hadoop::httpfs_homedir}/httpfs-signature.secret":
      owner  => 'httpfs',
      group  => 'httpfs',
      mode   => '0600',
      source => '/etc/security/http-auth-signature-secret',
    }
  }

  $env_file = "${::hadoop::confdir_httpfs}/httpfs-env.sh"
  if $hadoop::https {
    $environment = {
      'HTTPFS_SSL_ENABLED' => true,
      # there is not available ${HOME} variable since Hadoop 3.x
      'HTTPFS_SSL_KEYSTORE_FILE' => "${hadoop::httpfs_homedir}/.keystore",
      'HTTPFS_SSL_KEYSTORE_PASS' => "'${::hadoop::https_keystore_password}'",
    }
  } else {
    $environment = {
      'HTTPFS_SSL_ENABLED' => false,
      'HTTPFS_SSL_KEYSTORE_FILE' => '::undef',
      'HTTPFS_SSL_KEYSTORE_PASS' => '::undef',
    }
  }
  file { $env_file:
    owner => 'httpfs',
    group => 'httpfs',
    mode  => '0600',
  }
  augeas { $env_file:
    incl    => $env_file,
    lens    => 'Shellvars.lns',
    changes => template('hadoop/env/common.augeas.erb'),
  }
}