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
25758a41
Commit
25758a41
authored
Jan 2, 2021
by
František Dvořák
Browse files
Options
Downloads
Patches
Plain Diff
Hadoop: pre-install Kerberos in the image, adduser script, beeline test with security
parent
d1516097
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#437
passed
Jan 2, 2021
Stage: test
Changes
4
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
image/.gitignore
+2
-0
2 additions, 0 deletions
image/.gitignore
image/HOWTO.sh
+4
-1
4 additions, 1 deletion
image/HOWTO.sh
image/hadoop.sh
+3
-2
3 additions, 2 deletions
image/hadoop.sh
image/tests/common.sh
+3
-2
3 additions, 2 deletions
image/tests/common.sh
with
12 additions
and
5 deletions
image/.gitignore
0 → 100644
+
2
−
0
View file @
25758a41
build-image.log
hadoop-adduser.sh
This diff is collapsed.
Click to expand it.
image/HOWTO.sh
+
4
−
1
View file @
25758a41
#! /bin/sh -xe
#! /bin/sh -xe
sed
's/MASTER=.*/MASTER="`hostname -f`"/'
../hadoop-adduser.sh
>
hadoop-adduser.sh
chmod
+x hadoop-adduser.sh
/usr/sbin/build-openstack-debian-image
\
/usr/sbin/build-openstack-debian-image
\
--release
stretch
\
--release
stretch
\
--extra-packages
acl,default-jre-headless,git,gnupg,librarian-puppet,qemu-guest-agent,puppet
\
--extra-packages
acl,default-jre-headless,git,gnupg,
krb5-user,
librarian-puppet,qemu-guest-agent,puppet
\
--image-size
4
\
--image-size
4
\
--hook-script
./hadoop.sh 2>&1 |
tee
build-image.log
--hook-script
./hadoop.sh 2>&1 |
tee
build-image.log
This diff is collapsed.
Click to expand it.
image/hadoop.sh
+
3
−
2
View file @
25758a41
...
@@ -13,7 +13,7 @@ case "$BODI_RELEASE" in
...
@@ -13,7 +13,7 @@ case "$BODI_RELEASE" in
ver
=
'1.5.0'
# 1.5.0
ver
=
'1.5.0'
# 1.5.0
;;
;;
esac
esac
DAEMONS
=
"
$db_daemon
hadoop-hdfs-datanode hadoop-hdfs-namenode hadoop-httpfs hadoop-mapreduce-historyserver hadoop-yarn-nodemanager hadoop-yarn-resourcemanager hbase-master hbase-regionserver hive-metastore hive-server2 spark-history-server zookeeper-server"
DAEMONS
=
"
$db_daemon
krb5-admin-server krb5-kdc krb5-kpropd
hadoop-hdfs-datanode hadoop-hdfs-namenode hadoop-httpfs hadoop-mapreduce-historyserver hadoop-yarn-nodemanager hadoop-yarn-resourcemanager hbase-master hbase-regionserver hive-metastore hive-server2 spark-history-server zookeeper-server"
wget https://dist.apache.org/repos/dist/release/bigtop/KEYS
-O
- |
chroot
$BODI_CHROOT_PATH
apt-key add -
wget https://dist.apache.org/repos/dist/release/bigtop/KEYS
-O
- |
chroot
$BODI_CHROOT_PATH
apt-key add -
cp
-vp
apt/
*
.pref
$BODI_CHROOT_PATH
/etc/apt/preferences.d/
cp
-vp
apt/
*
.pref
$BODI_CHROOT_PATH
/etc/apt/preferences.d/
...
@@ -30,7 +30,7 @@ for d in $DAEMONS; do
...
@@ -30,7 +30,7 @@ for d in $DAEMONS; do
echo
'#! /bin/sh'
>
$BODI_CHROOT_PATH
/etc/init.d/
${
d
}
echo
'#! /bin/sh'
>
$BODI_CHROOT_PATH
/etc/init.d/
${
d
}
chmod
+x
$BODI_CHROOT_PATH
/etc/init.d/
${
d
}
chmod
+x
$BODI_CHROOT_PATH
/etc/init.d/
${
d
}
done
done
DEBIAN_FRONTEND
=
noninteractive
chroot
$BODI_CHROOT_PATH
apt-get
install
-o
'Dpkg::Options::=--force-confdef'
-o
'Dpkg::Options::=--force-confold'
-y
hadoop-doc hadoop-hdfs-namenode hadoop-httpfs hadoop-hdfs-datanode hadoop-mapreduce-historyserver hadoop-yarn-resourcemanager hadoop-yarn-nodemanager hbase-master hbase-regionserver hive hive-hbase hive-hcatalog hive-metastore hive-server2
$jdbc
maven ant mariadb-client mariadb-common mariadb-server spark-core spark-history-server spark-python zookeeper-server
DEBIAN_FRONTEND
=
noninteractive
chroot
$BODI_CHROOT_PATH
apt-get
install
-o
'Dpkg::Options::=--force-confdef'
-o
'Dpkg::Options::=--force-confold'
-y
hadoop-doc hadoop-hdfs-namenode hadoop-httpfs hadoop-hdfs-datanode hadoop-mapreduce-historyserver hadoop-yarn-resourcemanager hadoop-yarn-nodemanager hbase-master hbase-regionserver hive hive-hbase hive-hcatalog hive-metastore hive-server2
krb5-admin-server krb5-kdc krb5-kpropd
$jdbc
maven ant mariadb-client mariadb-common mariadb-server spark-core spark-history-server spark-python zookeeper-server
for
d
in
$DAEMONS
;
do
for
d
in
$DAEMONS
;
do
mv
-v
$BODI_CHROOT_PATH
/etc/init.d/
${
d
}
.dpkg-dist
$BODI_CHROOT_PATH
/etc/init.d/
${
d
}
mv
-v
$BODI_CHROOT_PATH
/etc/init.d/
${
d
}
.dpkg-dist
$BODI_CHROOT_PATH
/etc/init.d/
${
d
}
done
done
...
@@ -43,6 +43,7 @@ cp -vp single.pp $BODI_CHROOT_PATH/root
...
@@ -43,6 +43,7 @@ cp -vp single.pp $BODI_CHROOT_PATH/root
sed
's/\(\$hdfs_deployed\s*=\s*\).*/\1true/'
single.pp
>
$BODI_CHROOT_PATH
/root/single2.pp
sed
's/\(\$hdfs_deployed\s*=\s*\).*/\1true/'
single.pp
>
$BODI_CHROOT_PATH
/root/single2.pp
chroot
$BODI_CHROOT_PATH
touch
-r
/root/single.pp /root/single2.pp
chroot
$BODI_CHROOT_PATH
touch
-r
/root/single.pp /root/single2.pp
cp
-vp
scripts/
*
.sh
$BODI_CHROOT_PATH
/usr/local/sbin/
cp
-vp
scripts/
*
.sh
$BODI_CHROOT_PATH
/usr/local/sbin/
cp
-vp
hadoop-adduser.sh
$BODI_CHROOT_PATH
/root/
# tests
# tests
mkdir
-p
$BODI_CHROOT_PATH
/opt/hadoop-tests
mkdir
-p
$BODI_CHROOT_PATH
/opt/hadoop-tests
...
...
This diff is collapsed.
Click to expand it.
image/tests/common.sh
+
3
−
2
View file @
25758a41
#! /bin/sh -e
#! /bin/sh -e
REALM
=
'HADOOP'
HIVE_HOSTNAME
=
`
hostname
-f
`
HIVE_HOSTNAME
=
`
hostname
-f
`
HIVE_DB
=
`
id
-un
`
_test
HIVE_DB
=
`
id
-un
`
_test
JDBC_URL
=
"jdbc:hive2://
${
HIVE_HOSTNAME
}
:10000/
${
HIVE_DB
}
"
#
JDBC_URL="jdbc:hive2://${HIVE_HOSTNAME}:10000/${HIVE_DB}"
#
JDBC_URL="jdbc:hive2://${HIVE_HOSTNAME}:10000/${HIVE_DB};principal=hive/${HIVE_HOSTNAME}@${REALM}"
JDBC_URL
=
"jdbc:hive2://
${
HIVE_HOSTNAME
}
:10000/
${
HIVE_DB
}
;principal=hive/
${
HIVE_HOSTNAME
}
@
${
REALM
}
"
if
test
!
-f
~/.hadoop-test-
`
hostname
-f
`
.txt
;
then
if
test
!
-f
~/.hadoop-test-
`
hostname
-f
`
.txt
;
then
hive
-e
"DROP DATABASE
${
HIVE_DB
}
CASCADE"
2>/dev/null
||
:
hive
-e
"DROP DATABASE
${
HIVE_DB
}
CASCADE"
2>/dev/null
||
:
...
...
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
register
or
sign in
to comment