Adopt DIB_DEBUG_TRACE for tracing in elements
Mimic commit 36b59c001c1643217449646b371df46d2cb11b91 in diskimage-builder, by adopting the usage of $DIB_DEBUG_TRACE to check whether enable tracing in scripts. Unlike with the diskimage-builder commit, the default is to not enable tracing even in the few scripts that used to unconditionally "set -x". Enabling tracing can be done by either: - passing -x to disk-image-create - exporting DIB_DEBUG_TRACE=N, with N=0/1 Change-Id: I56ccd6753df31f7ddda641640cdb1985b2d9e856 Partial-Bug: #1435306
This commit is contained in:
parent
83f74cdc00
commit
55a21cd746
@ -1,3 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
rm /etc/apt/apt.conf.d/01proxy
|
||||
|
@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
mkdir -p /etc/apt/apt.conf.d/
|
||||
touch /etc/apt/apt.conf.d/01proxy
|
||||
echo -e "Acquire::http { Proxy \"$UBUNTU_MIRROR\"; };" > /etc/apt/apt.conf.d/01proxy
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [ -z "$UBUNTU_MIRROR" ]; then
|
||||
echo "You should specify parameter 'UBUNTU_MIRROR'"
|
||||
exit 2
|
||||
|
@ -1,3 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
mv /opt/repos/* /etc/yum.repos.d/
|
||||
|
@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
mkdir -p /opt/repos
|
||||
mv /etc/yum.repos.d/* /opt/repos/
|
||||
cat >> /etc/yum.repos.d/centos.repo <<EOF
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [ -z "$CENTOS_MIRROR" ]; then
|
||||
echo "You should specify parameter 'CENTOS_MIRROR'"
|
||||
exit 2
|
||||
|
@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
install-packages which
|
||||
|
||||
if which systemctl; then
|
||||
|
@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -e
|
||||
|
||||
distro=$(lsb_release -is)
|
||||
|
@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -e
|
||||
|
||||
distro=$(lsb_release -is)
|
||||
|
@ -1,3 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
mv /opt/repos/* /etc/yum.repos.d/
|
||||
|
@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
mkdir -p /opt/repos
|
||||
mv /etc/yum.repos.d/* /opt/repos
|
||||
cat >> /etc/yum.repos.d/fedora.repo <<EOF
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [ -z "$FEDORA_MIRROR" ]; then
|
||||
echo "You should specify parameter 'FEDORA_MIRROR'"
|
||||
exit 2
|
||||
|
@ -4,6 +4,10 @@
|
||||
# It does not do a full install of CDH, it installs the miminum needed to
|
||||
# Spark to run correctly.
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
distro=$(lsb_release -is || :)
|
||||
if [ "$distro" != "Ubuntu" ]; then
|
||||
echo "Distro $distro not supported by CDH. Exiting."
|
||||
|
@ -3,6 +3,10 @@
|
||||
# This script contains some fixes needed to have the Cloudera Ubuntu
|
||||
# packages up and running
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
case "$distro" in
|
||||
Ubuntu )
|
||||
# pietro: small hack to fix install problems on ubuntu
|
||||
|
@ -1,4 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -e
|
||||
|
||||
if [ -z "$JAVA_DOWNLOAD_URL" ]; then
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -eu
|
||||
|
||||
if [ $(lsb_release -is) = 'Ubuntu' ]; then
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -e
|
||||
|
||||
install-packages wget unzip
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -eu
|
||||
|
||||
for i in cloudera-scm-agent \
|
||||
cloudera-scm-server \
|
||||
|
@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
distro=$(lsb_release -is)
|
||||
|
||||
|
||||
|
@ -21,4 +21,9 @@
|
||||
# This setting is necessary to disable the routing rule that is otherwise injected into the image
|
||||
# Routing rule prevents cloud-init from contacting meta data service on quantum
|
||||
# See: https://bugzilla.redhat.com/show_bug.cgi?id=983611
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
echo "NOZEROCONF=yes" >> /etc/sysconfig/network
|
||||
|
@ -20,6 +20,9 @@
|
||||
#
|
||||
##########################################################
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
install-packages wget
|
||||
install-packages ntp
|
||||
|
@ -24,6 +24,10 @@
|
||||
# HDP.
|
||||
##########################################################
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
function install_ganglia {
|
||||
# Install ganglia
|
||||
install-packages libganglia ganglia-gmond ganglia-gmond-modules-python ganglia-devel ganglia-gmetad ganglia-web
|
||||
|
@ -26,4 +26,8 @@
|
||||
# in disconnected mode.
|
||||
#
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
find /etc/yum.repos.d -name "*.repo" -type f | xargs sed "s/enabled=1/enabled=0/" -i
|
||||
|
@ -20,6 +20,10 @@
|
||||
# has completed.
|
||||
##########################################################
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# ===== CLEANUP MISC =====
|
||||
rm -rf /var/cache/*
|
||||
|
||||
|
@ -21,6 +21,10 @@
|
||||
#
|
||||
##########################################################
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# Turn off gmetad
|
||||
chkconfig gmetad off
|
||||
|
||||
|
@ -21,5 +21,9 @@
|
||||
#
|
||||
##########################################################
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# Turn on ntp service
|
||||
chkconfig ntpd on
|
||||
|
@ -21,6 +21,10 @@
|
||||
#
|
||||
##########################################################
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# Turn off ambari-server service for the first boot of this image
|
||||
chkconfig ambari-server off
|
||||
|
||||
|
@ -25,6 +25,10 @@
|
||||
# Ambari will configure the environment before the Hadoop
|
||||
# cluster is started.
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# This is only necessary for an HDP 2.x install
|
||||
if [[ $DIB_HDP_VERSION == "2.0" ]]; then
|
||||
chkconfig hadoop-mapreduce-historyserver off
|
||||
|
@ -22,6 +22,10 @@
|
||||
#
|
||||
##########################################################
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# create a new local yum repository definition that
|
||||
# includes:
|
||||
# 1. HDP-Utils
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -eu
|
||||
|
||||
echo "START: installing MapR core dependencies"
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -eu
|
||||
|
||||
echo "START: installing Scala"
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -eu
|
||||
|
||||
install -D -g root -o root -m 0644 $(dirname $0)/versions.py /tmp/versions.py
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -eu
|
||||
|
||||
echo "START: installing MapR core repository"
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -eu
|
||||
|
||||
echo "START: installing MapR ecosystem repository"
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -eu
|
||||
|
||||
echo "START: downloading ExtJS library"
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -eu
|
||||
|
||||
echo "/etc/profile.d/java.sh" >> /etc/ssh/sshrc
|
||||
chmod 775 /etc/profile.d/java.sh
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -eu
|
||||
|
||||
DISTRO=$(lsb_release -is || :)
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -eu
|
||||
|
||||
DISTRO=$(lsb_release -is || :)
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -eu
|
||||
|
||||
echo "MapR version ${DIB_MAPR_VERSION}"
|
||||
|
||||
|
@ -7,6 +7,10 @@
|
||||
# HADOOP-9777 is resolved.
|
||||
# https://issues.apache.org/jira/browse/HADOOP-9777
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
function download_hadoop_package {
|
||||
echo "Hadoop version $DIB_HADOOP_VERSION will be injected into image. Starting the download"
|
||||
install-packages wget
|
||||
|
@ -1,4 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -e
|
||||
|
||||
if [ -z "$JAVA_DOWNLOAD_URL" ]; then
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
install-packages wget tar
|
||||
|
||||
tmp_dir=/tmp/hive
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [ -z "$HIVE_DOWNLOAD_URL" ]; then
|
||||
version_check=$(echo $HIVE_VERSION | sed -e '/[0-9]\.[0-9][0-9]\.[0-9]/d')
|
||||
if [ ! -z $version_check ]; then
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Begin: installation of Java"
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -e
|
||||
|
||||
distro=$(lsb_release -is || :)
|
||||
|
@ -1,7 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
if [ $(lsb_release -is) = 'Fedora' ]; then
|
||||
install-packages community-mysql community-mysql-libs community-mysql-server mysql-connector-java
|
||||
|
@ -4,6 +4,10 @@
|
||||
# Service mysqld doesn't start on boot in Fedora and CentOS
|
||||
# Delete config property 'bind-address' for remote mode (0.0.0.0)
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [ $(lsb_release -is) = 'Ubuntu' ]; then
|
||||
if [ -e "/etc/init/mysql.conf" ]; then
|
||||
sed -i "s/start on runlevel \[.*\]/start on never runlevel [2345]/g" /etc/init/mysql.conf
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
echo "Oozie setup"
|
||||
|
||||
install-packages zip unzip tar wget
|
||||
|
@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
install-packages wget
|
||||
|
||||
ln -s /usr/share/java/mysql-connector-java.jar /opt/oozie/libtools/mysql.jar
|
||||
|
@ -1,4 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -e
|
||||
|
||||
if [[ "$DIB_HADOOP_VERSION" < "2.0.0" ]]; then
|
||||
|
@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -e
|
||||
|
||||
echo "Installing OpenJDK"
|
||||
|
@ -1,3 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
install-packages redhat-lsb
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [ -z "$DIB_PASSWORD" ]; then
|
||||
echo "Error during setup password for root"
|
||||
exit 1
|
||||
|
@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [ -z "$SAHARA_ELEMENTS_COMMIT_ID" -o -z "$DIB_UTILS_COMMIT_ID" -o -z "$DIB_COMMIT_ID" ]; then
|
||||
echo "SAHARA_ELEMENTS_COMMIT_ID, DIB_UTILS_COMMIT_ID and DIB_COMMIT_ID must be specified, exiting"
|
||||
exit 3
|
||||
|
@ -2,6 +2,10 @@
|
||||
# This script installs Spark
|
||||
# More documentation in the README.md file
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
install-packages wget tar
|
||||
|
||||
tmp_dir=/tmp/spark
|
||||
|
@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# We have to chown the Spark directories to make it usable for the default user
|
||||
# Unfortunately the Ubuntu user does not exists when DIB is creating the image
|
||||
# and we need to execute this code the first time the VM boots.
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [ -z "$SPARK_DOWNLOAD_URL" -a -z "$DIB_HADOOP_VERSION" ]; then
|
||||
echo -e "Neither DIB_HADOOP_VERSION nor SPARK_DOWNLOAD_URL are set. Impossible to install Spark.\nAborting"
|
||||
exit 1
|
||||
|
@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
echo "Begin: install and configure SSH"
|
||||
|
||||
# /etc/ssh/sshd_config is provided by openssh-server
|
||||
|
@ -2,6 +2,10 @@
|
||||
# This script installs storm and its dependencies
|
||||
# More documentation on the README.md file
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
install-packages wget unzip build-essential uuid-dev git libtool autoconf pkg-config tar
|
||||
|
||||
tmp_dir=/tmp
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [ -z "$STORM_DOWNLOAD_URL" -a -z "$DIB_STORM_VERSION"]; then
|
||||
echo -e "Neither DIB_STORM_VERSION nor STORM_DOWNLOAD_URL are set. Impossible to install Storm.\nAborting"
|
||||
exit 1
|
||||
|
@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
install-packages wget
|
||||
|
||||
HDFS_LIB_DIR=${DIB_HDFS_LIB_DIR:-"/usr/share/hadoop/lib"}
|
||||
|
@ -1,2 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
install-packages -u
|
||||
|
@ -2,6 +2,10 @@
|
||||
# This scrip installs zookeeper
|
||||
# More documentation on the README.md file
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
install-packages wget
|
||||
|
||||
echo "Downloading Zookeeper"
|
||||
|
@ -4,6 +4,10 @@
|
||||
# Unfortunately the Ubuntu user does not exists when DIB is creating the image
|
||||
# and we need to execute this code the first time the VM boots.
|
||||
|
||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
sed -i -e 's,^exit 0$,[ -f /opt/zookeeper/firstboot.sh ] \&\& sh /opt/zookeeper/firstboot.sh; exit 0,' /etc/rc.local
|
||||
|
||||
cat >> /opt/zookeeper/firstboot.sh <<EOF
|
||||
|
Loading…
Reference in New Issue
Block a user