sahara-image-elements/elements
Pino Toscano 13adb9ad43 openjdk: revert to a semi-manual installation
Unfortunately, using package-installs means there is no way to set the
proper openjdk package depending on the version of the distro, and so
far it is hardcoded to 7. On Fedora >= 21, the default openjdk is 8, and
due to bugs in yum [1] this has not caused build errors so far, but
leaving a java-less image.

The chosen solution is to not use package-installs anymore, still using
pkg-map (called manually) to give the right name for the built distro.
The default is still set to install openjdk v7 everywhere, as before;
as drawback, building images based on Fedora >= 21 (which is the default
in diskimage-builder since version 0.1.43) will fail hard now.

[1] like not exiting when asking to install non-existing packages if
specified together with existing ones

Change-Id: I53195daa8d29b15dcae548eb76c5c9efb6ad50ef
2015-07-02 17:01:27 +02:00
..
apt-mirror Improvements to README.rst of elements 2015-04-29 18:41:30 +02:00
centos-mirror Improvements to README.rst of elements 2015-04-29 18:41:30 +02:00
disable-firewall Improvements to README.rst of elements 2015-04-29 18:41:30 +02:00
extjs Improvements to README.rst of elements 2015-04-29 18:41:30 +02:00
fedora-mirror Improvements to README.rst of elements 2015-04-29 18:41:30 +02:00
hadoop hadoop: use a case for distro check 2015-06-16 18:47:34 +02:00
hadoop-cdh hadoop-cdh: simplify package installation 2015-05-18 15:42:57 +02:00
hadoop-cloudera Add installing keytrustee-keyprovider package 2015-06-09 00:16:35 +08:00
hadoop-hdp Merge "Remove unneeded code from HDP element" 2015-05-28 03:14:28 +00:00
hadoop-mapr Add quotes to unsafe if conditions in mapr element 2015-06-08 22:19:33 +03:00
hive Improvements to README.rst of elements 2015-04-29 18:41:30 +02:00
java Fix problem with set up java env variable 2015-05-19 16:22:46 +03:00
mysql Improvements to README.rst of elements 2015-04-29 18:41:30 +02:00
oozie Improvements to README.rst of elements 2015-04-29 18:41:30 +02:00
openjdk openjdk: revert to a semi-manual installation 2015-07-02 17:01:27 +02:00
oracle-java Make almost all the element scripts as e/u/pipefail 2015-04-07 12:46:39 +02:00
redhat-lsb Start switching to declarative package-installs 2015-04-15 00:44:54 +08:00
root-passwd Improvements to README.rst of elements 2015-04-29 18:41:30 +02:00
sahara-version/root.d Use tox env for building images 2015-05-05 14:49:08 +03:00
spark fixing minor error in spark post-install script 2015-06-23 18:35:15 -04:00
ssh Change augtool invocation 2015-05-15 16:40:29 +03:00
storm storm: install supervisor using package-installs 2015-05-18 17:08:28 +02:00
swift_hadoop Improvements to README.rst of elements 2015-04-29 18:41:30 +02:00
updater/install.d Make almost all the element scripts as e/u/pipefail 2015-04-07 12:46:39 +02:00
zookeeper Start switching to declarative package-installs 2015-04-15 00:44:54 +08:00
.gitignore Add a .gitignore. 2013-09-02 12:58:57 +04:00
README.rst Renaming all Savanna references to Sahara 2014-03-13 15:26:47 +04:00

README.rst

Diskimage-builder tools for creation cloud images

Steps how to create cloud image with Apache Hadoop installed using diskimage-builder project:

  1. Clone the repository "https://github.com/openstack/diskimage-builder" locally. Note: Make sure you have commit 43b96d91 in your clone, it provides a mapping for default-jre.
git clone https://github.com/openstack/diskimage-builder
  1. Add ~/diskimage-builder/bin/ directory to your path (for example, PATH=$PATH:/home/$USER/diskimage-builder/bin/ ).
  2. Export the following variable ELEMENTS_PATH=/home/$USER/diskimage-builder/elements/ to your .bashrc. Then source it.
  3. Copy file "img-build-sudoers" from ~/disk-image-builder/sudoers.d/ to your /etc/sudoers.d/.
chmod 440 /etc/sudoers.d/img-build-sudoers
chown root:root /etc/sudoers.d/img-build-sudoers
  1. Export sahara-elements commit id variable (from sahara-extra directory):
export SAHARA_ELEMENTS_COMMIT_ID=`git show --format=%H | head -1`
  1. Move elements/ directory to disk-image-builder/elements/
mv elements/*  /path_to_disk_image_builder/diskimage-builder/elements/
  1. Export DIB commit id variable (from DIB directory):
export DIB_COMMIT_ID=`git show --format=%H | head -1`
  1. Call the following command to create cloud image is able to run on OpenStack:

8.1. Ubuntu cloud image

JAVA_FILE=jdk-7u21-linux-x64.tar.gz DIB_HADOOP_VERSION=1.2.1 OOZIE_FILE=oozie-4.0.0.tar.gz disk-image-create base vm hadoop oozie ubuntu root-passwd -o ubuntu_hadoop_1_2_1

8.2. Fedora cloud image

JAVA_FILE=jdk-7u21-linux-x64.tar.gz DIB_HADOOP_VERSION=1.2.1 OOZIE_FILE=oozie-4.0.0.tar.gz DIB_IMAGE_SIZE=10 disk-image-create base vm fedora hadoop root-passwd oozie -o fedora_hadoop_1_2_1

Note: If you are building this image from Ubuntu or Fedora 18 OS host, you should add element 'selinux-permissive'.

JAVA_FILE=jdk-7u21-linux-x64.tar.gz DIB_HADOOP_VERSION=1.2.1 OOZIE_FILE=oozie-4.0.0.tar.gz DIB_IMAGE_SIZE=10 disk-image-create base vm fedora hadoop root-passwd oozie selinux-permissive -o fedora_hadoop_1_2_1

In this command 'DIB_HADOOP_VERSION' parameter is version of hadoop needs to be installed. 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 and CentOS don'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 Sahara 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://sahara-files.mirantis.com/oozie-4.0.0.tar.gz If you have already downloaded archive, move it to "elements/oozie/install.d/" and use its filename as 'OOZIE_FILE' parameter.