Added Oozie DIB element
* New element name is 'oozie' * Parameters for Oozie libs are OOZIE_DOWNLOAD_URL and OOZIE_FILE Implements: blueprint edp-dib-element-oozie-vanilla Change-Id: I7e107b51d5aef5d225690c0f7633dbccc072fe27
This commit is contained in:
parent
e10727e442
commit
37e87ddac5
@ -32,7 +32,7 @@ Steps how to create cloud image with Apache Hadoop installed using diskimage-bui
|
||||
|
||||
.. sourcecode:: bash
|
||||
|
||||
JAVA_FILE=jdk-7u21-linux-x64.tar.gz DIB_HADOOP_VERSION=1.1.2 disk-image-create base vm hadoop ubuntu root-passwd -o hadoop_1_1_2
|
||||
JAVA_FILE=jdk-7u21-linux-x64.tar.gz DIB_HADOOP_VERSION=1.1.2 OOZIE_FILE=oozie-3.3.2.tar.gz disk-image-create base vm hadoop oozie ubuntu root-passwd -o hadoop_1_1_2
|
||||
|
||||
6.2. Fedora cloud image
|
||||
|
||||
@ -51,3 +51,7 @@ In this command 'DIB_HADOOP_VERSION' parameter is version of hadoop needs to be
|
||||
You can use 'JAVA_DOWNLOAD_URL' parameter to specify download link for JDK (tarball or bin).
|
||||
'DIB_IMAGE_SIZE' is parameter that specifes a volume of hard disk of instance. You need to specify it because Fedora doesn't use all available volume.
|
||||
If you have already downloaded the jdk package, move it to "elements/hadoop/install.d/" and use its filename as 'JAVA_FILE' parameter.
|
||||
In order of working EDP components with Savanna DIB images you need pre-installed Oozie libs.
|
||||
Use OOZIE_DOWNLOAD_URL to specify link to Oozie archive (tar.gz). For example we have built Oozie libs here:
|
||||
http://a8e0dce84b3f00ed7910-a5806ff0396addabb148d230fde09b7b.r31.cf1.rackcdn.com/oozie-3.3.2.tar.gz
|
||||
If you have already downloaded archive, move it to "elements/oozie/install.d/" and use its filename as 'OOZIE_FILE' parameter.
|
||||
|
1
elements/oozie/README.md
Normal file
1
elements/oozie/README.md
Normal file
@ -0,0 +1 @@
|
||||
Oozie deployment
|
21
elements/oozie/install.d/50-setup-oozie
Executable file
21
elements/oozie/install.d/50-setup-oozie
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
echo "Oozie setup"
|
||||
|
||||
install-packages zip unzip tar wget
|
||||
|
||||
if [ -n "$OOZIE_DOWNLOAD_URL" ]; then
|
||||
wget -P /opt/ $OOZIE_DOWNLOAD_URL
|
||||
OOZIE_FILE=$(basename $OOZIE_DOWNLOAD_URL)
|
||||
OOZIE_DIR="${OOZIE_FILE%.*}"
|
||||
OOZIE_DIR="${OOZIE_DIR%.*}"
|
||||
elif [ -n "$OOZIE_FILE" ]; then
|
||||
install -D -g root -o root -m 0755 $(dirname $0)/$OOZIE_FILE /opt
|
||||
OOZIE_DIR="${OOZIE_FILE%.*}"
|
||||
OOZIE_DIR="${OOZIE_DIR%.*}"
|
||||
fi
|
||||
wget -P /tmp/ http://extjs.com/deploy/ext-2.2.zip
|
||||
|
||||
cd /opt/
|
||||
tar xzf $OOZIE_FILE
|
||||
mv $OOZIE_DIR oozie
|
||||
rm $OOZIE_FILE
|
7
elements/oozie/post-install.d/90-oozie-war
Executable file
7
elements/oozie/post-install.d/90-oozie-war
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir /opt/oozie/libext/
|
||||
cp -r /usr/share/hadoop/*.jar /opt/oozie/libext
|
||||
cp -r /usr/share/hadoop/lib/*.jar /opt/oozie/libext
|
||||
chown -R hadoop:hadoop /opt/oozie
|
||||
su hadoop -c "/opt/oozie/bin/oozie-setup.sh prepare-war -extjs /tmp/ext-2.2.zip -jars /usr/share/hadoop/lib/*.jar:/usr/share/hadoop/*.jar"
|
9
elements/oozie/root.d/0-check
Executable file
9
elements/oozie/root.d/0-check
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [ -z "$OOZIE_DOWNLOAD_URL" ]; then
|
||||
if [ -z "$OOZIE_FILE" ]; then
|
||||
echo "OOZIE_FILE and OOZIE_DOWNLOAD_URL are not set. Impossible to install Oozie. Exit"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
Loading…
Reference in New Issue
Block a user