diff --git a/elements/apt-mirror/finalise.d/99-setup b/elements/apt-mirror/finalise.d/99-setup index 9e47021e..5fcd3800 100755 --- a/elements/apt-mirror/finalise.d/99-setup +++ b/elements/apt-mirror/finalise.d/99-setup @@ -1,3 +1,7 @@ #!/bin/bash +if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then + set -x +fi + rm /etc/apt/apt.conf.d/01proxy diff --git a/elements/apt-mirror/pre-install.d/00-apt b/elements/apt-mirror/pre-install.d/00-apt index 492b59a5..d45393fb 100755 --- a/elements/apt-mirror/pre-install.d/00-apt +++ b/elements/apt-mirror/pre-install.d/00-apt @@ -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 diff --git a/elements/apt-mirror/root.d/0-check b/elements/apt-mirror/root.d/0-check index d67fae29..ae498b82 100755 --- a/elements/apt-mirror/root.d/0-check +++ b/elements/apt-mirror/root.d/0-check @@ -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 diff --git a/elements/centos-mirror/finalise.d/99-setup b/elements/centos-mirror/finalise.d/99-setup index 331abbf9..eeb9b09c 100755 --- a/elements/centos-mirror/finalise.d/99-setup +++ b/elements/centos-mirror/finalise.d/99-setup @@ -1,3 +1,7 @@ #!/bin/bash +if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then + set -x +fi + mv /opt/repos/* /etc/yum.repos.d/ diff --git a/elements/centos-mirror/pre-install.d/00-yum b/elements/centos-mirror/pre-install.d/00-yum index 7ed033cf..2893eb82 100755 --- a/elements/centos-mirror/pre-install.d/00-yum +++ b/elements/centos-mirror/pre-install.d/00-yum @@ -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 <> /etc/yum.repos.d/fedora.repo <> /etc/sysconfig/network diff --git a/elements/hadoop-hdp/install.d/30-init-hdp-install b/elements/hadoop-hdp/install.d/30-init-hdp-install index 51d01fab..d5e24a74 100755 --- a/elements/hadoop-hdp/install.d/30-init-hdp-install +++ b/elements/hadoop-hdp/install.d/30-init-hdp-install @@ -20,6 +20,9 @@ # ########################################################## +if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then + set -x +fi install-packages wget install-packages ntp diff --git a/elements/hadoop-hdp/install.d/40-install-hdp b/elements/hadoop-hdp/install.d/40-install-hdp index 8556a271..5a76f9dd 100755 --- a/elements/hadoop-hdp/install.d/40-install-hdp +++ b/elements/hadoop-hdp/install.d/40-install-hdp @@ -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 diff --git a/elements/hadoop-hdp/post-install.d/10-disable-repos b/elements/hadoop-hdp/post-install.d/10-disable-repos index 32f2967c..218b0191 100755 --- a/elements/hadoop-hdp/post-install.d/10-disable-repos +++ b/elements/hadoop-hdp/post-install.d/10-disable-repos @@ -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 diff --git a/elements/hadoop-hdp/post-install.d/20-cleanup b/elements/hadoop-hdp/post-install.d/20-cleanup index e0f3c166..f3f9bf34 100755 --- a/elements/hadoop-hdp/post-install.d/20-cleanup +++ b/elements/hadoop-hdp/post-install.d/20-cleanup @@ -20,6 +20,10 @@ # has completed. ########################################################## +if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then + set -x +fi + # ===== CLEANUP MISC ===== rm -rf /var/cache/* diff --git a/elements/hadoop-hdp/post-install.d/40-turn-off-gmetad b/elements/hadoop-hdp/post-install.d/40-turn-off-gmetad index 32933ea2..78f51e6f 100755 --- a/elements/hadoop-hdp/post-install.d/40-turn-off-gmetad +++ b/elements/hadoop-hdp/post-install.d/40-turn-off-gmetad @@ -21,6 +21,10 @@ # ########################################################## +if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then + set -x +fi + # Turn off gmetad chkconfig gmetad off diff --git a/elements/hadoop-hdp/post-install.d/50-turn-on-ntpd b/elements/hadoop-hdp/post-install.d/50-turn-on-ntpd index 861b9c4c..44fddc48 100755 --- a/elements/hadoop-hdp/post-install.d/50-turn-on-ntpd +++ b/elements/hadoop-hdp/post-install.d/50-turn-on-ntpd @@ -21,5 +21,9 @@ # ########################################################## +if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then + set -x +fi + # Turn on ntp service chkconfig ntpd on diff --git a/elements/hadoop-hdp/post-install.d/55-turn-off-ambari-services b/elements/hadoop-hdp/post-install.d/55-turn-off-ambari-services index 86c301ee..ac0ce2da 100755 --- a/elements/hadoop-hdp/post-install.d/55-turn-off-ambari-services +++ b/elements/hadoop-hdp/post-install.d/55-turn-off-ambari-services @@ -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 diff --git a/elements/hadoop-hdp/post-install.d/58-turn-off-hadoop-2-services b/elements/hadoop-hdp/post-install.d/58-turn-off-hadoop-2-services index 598c09a5..41b7bc46 100755 --- a/elements/hadoop-hdp/post-install.d/58-turn-off-hadoop-2-services +++ b/elements/hadoop-hdp/post-install.d/58-turn-off-hadoop-2-services @@ -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 diff --git a/elements/hadoop-hdp/post-install.d/60-enable-local-hdp-repos b/elements/hadoop-hdp/post-install.d/60-enable-local-hdp-repos index c2d6f12d..08cdd553 100755 --- a/elements/hadoop-hdp/post-install.d/60-enable-local-hdp-repos +++ b/elements/hadoop-hdp/post-install.d/60-enable-local-hdp-repos @@ -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 diff --git a/elements/hadoop-mapr/install.d/40-mapr-dependencies b/elements/hadoop-mapr/install.d/40-mapr-dependencies index f63e538c..05928e69 100755 --- a/elements/hadoop-mapr/install.d/40-mapr-dependencies +++ b/elements/hadoop-mapr/install.d/40-mapr-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 MapR core dependencies" diff --git a/elements/hadoop-mapr/install.d/41-scala b/elements/hadoop-mapr/install.d/41-scala index a9f9d7be..09099dd6 100755 --- a/elements/hadoop-mapr/install.d/41-scala +++ b/elements/hadoop-mapr/install.d/41-scala @@ -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" diff --git a/elements/hadoop-mapr/install.d/42-versions b/elements/hadoop-mapr/install.d/42-versions index 93e066a3..dc8fb2fe 100755 --- a/elements/hadoop-mapr/install.d/42-versions +++ b/elements/hadoop-mapr/install.d/42-versions @@ -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 diff --git a/elements/hadoop-mapr/install.d/43-mapr-core-repository b/elements/hadoop-mapr/install.d/43-mapr-core-repository index df224849..a2620ab5 100755 --- a/elements/hadoop-mapr/install.d/43-mapr-core-repository +++ b/elements/hadoop-mapr/install.d/43-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 core repository" diff --git a/elements/hadoop-mapr/install.d/44-mapr-eco-repository b/elements/hadoop-mapr/install.d/44-mapr-eco-repository index f8680b94..9fed478b 100755 --- a/elements/hadoop-mapr/install.d/44-mapr-eco-repository +++ b/elements/hadoop-mapr/install.d/44-mapr-eco-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" diff --git a/elements/hadoop-mapr/install.d/44-oozie-libs b/elements/hadoop-mapr/install.d/44-oozie-libs index a9619ddd..027886f1 100755 --- a/elements/hadoop-mapr/install.d/44-oozie-libs +++ b/elements/hadoop-mapr/install.d/44-oozie-libs @@ -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" diff --git a/elements/hadoop-mapr/post-install.d/99-java-home b/elements/hadoop-mapr/post-install.d/99-java-home index 4eefc6e6..367f37ad 100755 --- a/elements/hadoop-mapr/post-install.d/99-java-home +++ b/elements/hadoop-mapr/post-install.d/99-java-home @@ -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 diff --git a/elements/hadoop-mapr/post-install.d/99-requiretty b/elements/hadoop-mapr/post-install.d/99-requiretty index a4fb5bcf..50b4bfcf 100755 --- a/elements/hadoop-mapr/post-install.d/99-requiretty +++ b/elements/hadoop-mapr/post-install.d/99-requiretty @@ -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 || :) diff --git a/elements/hadoop-mapr/post-install.d/99-update-repository b/elements/hadoop-mapr/post-install.d/99-update-repository index be6abefc..0ca431ba 100755 --- a/elements/hadoop-mapr/post-install.d/99-update-repository +++ b/elements/hadoop-mapr/post-install.d/99-update-repository @@ -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 || :) diff --git a/elements/hadoop-mapr/root.d/0-mapr-check-version b/elements/hadoop-mapr/root.d/0-mapr-check-version index 38817505..e3fd32dd 100755 --- a/elements/hadoop-mapr/root.d/0-mapr-check-version +++ b/elements/hadoop-mapr/root.d/0-mapr-check-version @@ -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}" diff --git a/elements/hadoop/post-install.d/40-setup-hadoop b/elements/hadoop/post-install.d/40-setup-hadoop index ee14b360..42dedf13 100755 --- a/elements/hadoop/post-install.d/40-setup-hadoop +++ b/elements/hadoop/post-install.d/40-setup-hadoop @@ -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 diff --git a/elements/hadoop/root.d/0-check-hadoop b/elements/hadoop/root.d/0-check-hadoop index 8f3b2221..58a83e94 100755 --- a/elements/hadoop/root.d/0-check-hadoop +++ b/elements/hadoop/root.d/0-check-hadoop @@ -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 diff --git a/elements/hive/post-install.d/60-hive b/elements/hive/post-install.d/60-hive index 9fb5d485..7fa7a74a 100755 --- a/elements/hive/post-install.d/60-hive +++ b/elements/hive/post-install.d/60-hive @@ -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 diff --git a/elements/hive/root.d/0-check-hive b/elements/hive/root.d/0-check-hive index 89da2e1c..a7b5b7bd 100755 --- a/elements/hive/root.d/0-check-hive +++ b/elements/hive/root.d/0-check-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 diff --git a/elements/java/install.d/33-java b/elements/java/install.d/33-java index 55a0b007..9f00af05 100755 --- a/elements/java/install.d/33-java +++ b/elements/java/install.d/33-java @@ -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 || :) diff --git a/elements/mysql/install.d/10-mysql b/elements/mysql/install.d/10-mysql index 54bf4b06..8b48a5f7 100755 --- a/elements/mysql/install.d/10-mysql +++ b/elements/mysql/install.d/10-mysql @@ -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 diff --git a/elements/mysql/install.d/99-disable-mysql-on-boot b/elements/mysql/install.d/99-disable-mysql-on-boot index 9b746539..9846c73b 100755 --- a/elements/mysql/install.d/99-disable-mysql-on-boot +++ b/elements/mysql/install.d/99-disable-mysql-on-boot @@ -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 diff --git a/elements/oozie/install.d/50-setup-oozie b/elements/oozie/install.d/50-setup-oozie index 0a78a7ff..dee39fd2 100755 --- a/elements/oozie/install.d/50-setup-oozie +++ b/elements/oozie/install.d/50-setup-oozie @@ -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 diff --git a/elements/oozie/post-install.d/90-oozie-war b/elements/oozie/post-install.d/90-oozie-war index f51b02fb..8ca5b4fc 100755 --- a/elements/oozie/post-install.d/90-oozie-war +++ b/elements/oozie/post-install.d/90-oozie-war @@ -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 diff --git a/elements/oozie/root.d/0-check-oozie b/elements/oozie/root.d/0-check-oozie index 2e8af520..48f65078 100755 --- a/elements/oozie/root.d/0-check-oozie +++ b/elements/oozie/root.d/0-check-oozie @@ -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 diff --git a/elements/openjdk/install.d/33-java b/elements/openjdk/install.d/33-java index 1cb91b17..8fccdbbe 100755 --- a/elements/openjdk/install.d/33-java +++ b/elements/openjdk/install.d/33-java @@ -1,5 +1,8 @@ #!/bin/bash +if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then + set -x +fi set -e echo "Installing OpenJDK" diff --git a/elements/redhat-lsb/pre-install.d/02-lsb b/elements/redhat-lsb/pre-install.d/02-lsb index 4732b98f..fda45c8a 100755 --- a/elements/redhat-lsb/pre-install.d/02-lsb +++ b/elements/redhat-lsb/pre-install.d/02-lsb @@ -1,3 +1,7 @@ #!/bin/bash +if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then + set -x +fi + install-packages redhat-lsb diff --git a/elements/root-passwd/post-install.d/99-setup b/elements/root-passwd/post-install.d/99-setup index 1c93f459..ec60adc9 100755 --- a/elements/root-passwd/post-install.d/99-setup +++ b/elements/root-passwd/post-install.d/99-setup @@ -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 diff --git a/elements/sahara-version/install.d/01-sahara-version b/elements/sahara-version/install.d/01-sahara-version index d82f96c9..9cea123e 100755 --- a/elements/sahara-version/install.d/01-sahara-version +++ b/elements/sahara-version/install.d/01-sahara-version @@ -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 diff --git a/elements/spark/install.d/60-spark b/elements/spark/install.d/60-spark index e4837ddb..3daa8f43 100755 --- a/elements/spark/install.d/60-spark +++ b/elements/spark/install.d/60-spark @@ -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 diff --git a/elements/spark/post-install.d/20-spark b/elements/spark/post-install.d/20-spark index 5b08e8ae..232a69b7 100755 --- a/elements/spark/post-install.d/20-spark +++ b/elements/spark/post-install.d/20-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. diff --git a/elements/spark/root.d/0-check-spark b/elements/spark/root.d/0-check-spark index 254ab5c9..56223f63 100755 --- a/elements/spark/root.d/0-check-spark +++ b/elements/spark/root.d/0-check-spark @@ -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 diff --git a/elements/ssh/install.d/33-ssh b/elements/ssh/install.d/33-ssh index e18502b6..66657fc5 100755 --- a/elements/ssh/install.d/33-ssh +++ b/elements/ssh/install.d/33-ssh @@ -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 diff --git a/elements/storm/install.d/60-storm b/elements/storm/install.d/60-storm index 1da1d4b2..3f034760 100755 --- a/elements/storm/install.d/60-storm +++ b/elements/storm/install.d/60-storm @@ -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 diff --git a/elements/storm/root.d/0-check-storm b/elements/storm/root.d/0-check-storm index 40c92d8c..b2dc9895 100755 --- a/elements/storm/root.d/0-check-storm +++ b/elements/storm/root.d/0-check-storm @@ -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 diff --git a/elements/swift_hadoop/post-install.d/81-add-jar b/elements/swift_hadoop/post-install.d/81-add-jar index be0eebf0..966fecbc 100755 --- a/elements/swift_hadoop/post-install.d/81-add-jar +++ b/elements/swift_hadoop/post-install.d/81-add-jar @@ -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"} diff --git a/elements/updater/install.d/00-updater b/elements/updater/install.d/00-updater index 8c0de6d6..1eaf2d40 100755 --- a/elements/updater/install.d/00-updater +++ b/elements/updater/install.d/00-updater @@ -1,2 +1,7 @@ #!/bin/bash + +if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then + set -x +fi + install-packages -u diff --git a/elements/zookeeper/install.d/40-zookeeper b/elements/zookeeper/install.d/40-zookeeper index 9c9797dd..1d56fa1e 100755 --- a/elements/zookeeper/install.d/40-zookeeper +++ b/elements/zookeeper/install.d/40-zookeeper @@ -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" diff --git a/elements/zookeeper/post-install.d/50-zookeeper b/elements/zookeeper/post-install.d/50-zookeeper index 77394df0..088e5879 100755 --- a/elements/zookeeper/post-install.d/50-zookeeper +++ b/elements/zookeeper/post-install.d/50-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 <