Select Git revision
site.pp.tmpl
-
František Dvořák authoredFrantišek Dvořák authored
site.pp.tmpl 8.17 KiB
$$distribution = '${distribution}'
$$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
$$oozie_version = 4
} elsif $$distribution == 'cloudera' {
$$version = '6.3.0'
$$hadoop_version = 3
$$oozie_version = 5
}
$$hive_schema_file = "$${distribution}-$${version}" ? {
'bigtop-1.4.0' => 'hive-schema-2.3.0.mysql.sql',
'bigtop-1.5.0' => 'hive-schema-2.3.0.mysql.sql',
'cloudera-6.3.0' => 'hive-schema-2.1.1.mysql.sql',
'cloudera-6.3.2' => 'hive-schema-2.1.1.mysql.sql',
default => undef, # stringify_facts=false required
}
$$db_type = "$${operatingsystem}-$${operatingsystemmajrelease}" ? {
'Debian-9' => 'mysql',
default => 'mariadb',
}
$$principals = suffix(concat(
prefix(concat([$$master], $$nodes), 'host/'),
prefix(concat([$$master], $$nodes), 'HTTP/'),
["httpfs/$$master"],
prefix(concat([$$master], $$nodes), 'hbase/'),
["hive/$$master"],
prefix($$nodes, 'dn/'),
["jhs/$$master"],
["nfs/$$master"],
prefix($$nodes, 'nm/'),
["nn/$$master"],
["oozie/$$master"],
["rm/$$master"],
["spark/$$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',
}