Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
terraform
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
702
HADOOP
terraform
Commits
876bf0cf
Commit
876bf0cf
authored
Jan 7, 2021
by
František Dvořák
Browse files
Options
Downloads
Patches
Plain Diff
Hadoop HDFS-only deployment updates and fixes, removed Hive and Spark
parent
745fac28
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#453
passed
Jan 7, 2021
Stage: test
Changes
3
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
deployments/hadoop-hdfs/plugin.py
+2
-2
2 additions, 2 deletions
deployments/hadoop-hdfs/plugin.py
deployments/hadoop-hdfs/site.pp.tmpl
+2
-47
2 additions, 47 deletions
deployments/hadoop-hdfs/site.pp.tmpl
deployments/hadoop/adduser.sh.tmpl
+14
-12
14 additions, 12 deletions
deployments/hadoop/adduser.sh.tmpl
with
18 additions
and
61 deletions
deployments/hadoop-hdfs/plugin.py
+
2
−
2
View file @
876bf0cf
import
hadoop.plugin
import
deployments.
hadoop.plugin
class
Component
(
hadoop
.
plugin
.
ComponentHadoop
):
class
Component
(
deployments
.
hadoop
.
plugin
.
ComponentHadoop
):
pass
pass
This diff is collapsed.
Click to expand it.
deployments/hadoop-hdfs/site.pp.tmpl
+
2
−
47
View file @
876bf0cf
...
@@ -20,23 +20,11 @@ if $$distribution == 'bigtop' {
...
@@ -20,23 +20,11 @@ if $$distribution == 'bigtop' {
$$version = '6.3.0'
$$version = '6.3.0'
$$hadoop_version = 3
$$hadoop_version = 3
}
}
$$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(
$$principals = suffix(concat(
prefix(concat([$$master], $$nodes), 'host/'),
prefix(concat([$$master], $$nodes), 'host/'),
prefix(concat([$$master], $$nodes), 'HTTP/'),
prefix(concat([$$master], $$nodes), 'HTTP/'),
["httpfs/$$master"],
["httpfs/$$master"],
["hive/$$master"],
prefix($$nodes, 'dn/'),
prefix($$nodes, 'dn/'),
["nfs/$$master"],
["nfs/$$master"],
["nn/$$master"],
["nn/$$master"],
...
@@ -93,30 +81,6 @@ class{'hadoop':
...
@@ -93,30 +81,6 @@ class{'hadoop':
hdfs_deployed => $$hdfs_deployed,
hdfs_deployed => $$hdfs_deployed,
}
}
class{'hive':
hdfs_hostname => $$master,
metastore_hostname => $$master,
server2_hostname => $$master,
zookeeper_hostnames => $$zookeepers,
realm => $$realm,
features => {
'manager' => true,
},
db => $$db_type,
db_password => 'good-password',
schema_file => $$hive_schema_file,
}
class { 'spark':
historyserver_hostname => $$master,
environment => {
'LD_LIBRARY_PATH' => '/usr/lib/hadoop/lib/native:$${LD_LIBRARY_PATH}',
'SPARK_YARN_USER_ENV' => 'LD_LIBRARY_PATH=$${LD_LIBRARY_PATH},$${SPARK_YARN_USER_ENV}',
},
#jar_enable => true,
realm => $$realm,
}
class { '::zookeeper':
class { '::zookeeper':
hostnames => $$zookeepers,
hostnames => $$zookeepers,
realm => $$realm,
realm => $$realm,
...
@@ -127,10 +91,11 @@ class{'site_hadoop':
...
@@ -127,10 +91,11 @@ class{'site_hadoop':
version => $$version,
version => $$version,
accounting_enable => false,
accounting_enable => false,
hbase_enable => false,
hbase_enable => false,
hive_enable => false,
nfs_frontend_enable => false,
nfs_frontend_enable => false,
oozie_enable => false,
oozie_enable => false,
pig_enable => false,
pig_enable => false,
spark_enable =>
tru
e,
spark_enable =>
fals
e,
}
}
group{$image_user:
group{$image_user:
...
@@ -179,9 +144,6 @@ class local_kerberos_master {
...
@@ -179,9 +144,6 @@ class local_kerberos_master {
kerberos::keytab{'/etc/krb5.keytab':
kerberos::keytab{'/etc/krb5.keytab':
principals => ["host/$${::fqdn}@$${realm}"],
principals => ["host/$${::fqdn}@$${realm}"],
}
}
kerberos::keytab{'/etc/security/keytab/hive.service.keytab':
principals => ["hive/$${::fqdn}@$${realm}"],
}
kerberos::keytab{'/etc/security/keytab/http.service.keytab':
kerberos::keytab{'/etc/security/keytab/http.service.keytab':
principals => ["HTTP/$${::fqdn}@$${realm}"],
principals => ["HTTP/$${::fqdn}@$${realm}"],
}
}
...
@@ -228,13 +190,6 @@ node /${master_hostname}\..*/ {
...
@@ -228,13 +190,6 @@ node /${master_hostname}\..*/ {
include ::site_hadoop::role::master_hdfs
include ::site_hadoop::role::master_hdfs
include ::site_hadoop::role::frontend
include ::site_hadoop::role::frontend
include ::hadoop::httpfs
include ::hadoop::httpfs
class { 'mysql::bindings':
java_enable => true,
java_package_name => "lib$${db_type}-java",
}
class { 'mysql::server':
root_password => 'root',
}
class{'local_kerberos_master':
class{'local_kerberos_master':
stage => 'kerberos',
stage => 'kerberos',
...
...
This diff is collapsed.
Click to expand it.
deployments/hadoop/adduser.sh.tmpl
+
14
−
12
View file @
876bf0cf
...
@@ -44,6 +44,7 @@ if [ "$$MASTER" = "$$FQDN" ]; then
...
@@ -44,6 +44,7 @@ if [ "$$MASTER" = "$$FQDN" ]; then
su hdfs
-p
-c
kdestroy
su hdfs
-p
-c
kdestroy
fi
fi
if
[
-f
"
$$
KEYTAB_HBASE"
]
;
then
if
[
-n
"
$$
REALM"
]
;
then
if
[
-n
"
$$
REALM"
]
;
then
export
KRB5CCNAME
=
FILE:/tmp/krb5cc_admin_hbase_
$$$$
export
KRB5CCNAME
=
FILE:/tmp/krb5cc_admin_hbase_
$$$$
su hbase
-p
-c
"kinit -k -t '
$$
{KEYTAB_HBASE}' '
$$
{PRINCIPAL_HBASE}'"
su hbase
-p
-c
"kinit -k -t '
$$
{KEYTAB_HBASE}' '
$$
{PRINCIPAL_HBASE}'"
...
@@ -57,6 +58,7 @@ if [ "$$MASTER" = "$$FQDN" ]; then
...
@@ -57,6 +58,7 @@ if [ "$$MASTER" = "$$FQDN" ]; then
else
else
echo
"create_namespace '
$$
{NAME}'"
| su hbase
-s
/bin/bash
-p
-c
'hbase shell -n'
>
/dev/null
echo
"create_namespace '
$$
{NAME}'"
| su hbase
-s
/bin/bash
-p
-c
'hbase shell -n'
>
/dev/null
fi
fi
fi
else
else
if
!
getent passwd
$$
{
NAME
}
>
/dev/null
;
then
if
!
getent passwd
$$
{
NAME
}
>
/dev/null
;
then
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment