Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • ci-bullseye
  • wip/bigtop-3.0.0
  • bio3
  • feature/certificates2
5 results

site.pp.tmpl

Blame
  • site.pp.tmpl 5.28 KiB
    $$distribution = '${distribution}' # cloudera, bigtop
    
    $$hdfs_deployed = ${hdfs_deployed}
    $$realm = '${realm}'
    $$ssl = false
    
    $$master = '${master_hostname}.${domain}'
    $$frontends = [
      '${master_hostname}.${domain}',
    ]
    $$nodes = suffix(${nodes}, '.${domain}')
    $$zookeepers = [
      $$master,
    ]
    
    if $$distribution == 'bigtop' {
      $$version = '1.5.0' # 1.4.0, 1.5.0
      $$hadoop_version = 2
    } elsif $$distribution == 'cloudera' {
      $$version = '6.3.0'
      $$hadoop_version = 3
    }
    
    $$principals = suffix(concat(
      prefix(concat([$$master], $$nodes), 'host/'),
      prefix(concat([$$master], $$nodes), 'HTTP/'),
      ["httpfs/$$master"],
      prefix($$nodes, 'dn/'),
      ["nfs/$$master"],
      ["nn/$$master"],
      ["zookeeper/$$master"]
    ), "@$${realm}")
    
    stage { 'kerberos':
      before => Stage['main'],
    }
    
    class{"kerberos":
      kadmin_hostname    => $$master,
      admin_principal    => "puppet/admin@$${realm}",
      admin_password     => '$kerberos_admin_password',
      master_password    => '$kerberos_master_password',
      realm              => $$realm,
      default_attributes => {
        'requires_preauth' => true,
      },
      default_policy     => 'default_host',
      stage              => 'kerberos',
    }
    
    class{'hadoop':
      acl                    => true,
      hdfs_hostname          => $$master,
      httpfs_hostnames       => [
        $$master,
      ],
      frontends              => $$frontends,
      oozie_hostnames        => [
        $$master,
      ],
      slaves                 => $$nodes,
      zookeeper_hostnames    => $$zookeepers,
      hdfs_name_dirs         => [
        '/data',
      ],
      hdfs_data_dirs         => $data_dirs,
      cluster_name           => '${domain}',
      https                  => $$ssl,
      realm                  => $$realm,
      features               => {