sahara-extra/elements
Matthew Farrellee 14398d41b5 Note about why hadoop install and setup is in post-install.d
Change-Id: If0af2fc24a2cca58d9d14e1ee7312e2e84d6a7cf
2013-07-27 09:54:07 -04:00
..
hadoop Note about why hadoop install and setup is in post-install.d 2013-07-27 09:54:07 -04:00
root-passwd Setup password for root using variable 'DIB_PASSWORD' 2013-07-25 17:14:56 +04:00
swift_hadoop Add install-packages 'wget' to Swift element (for Fedora). 2013-07-08 14:39:49 +04:00
.gitignore Add a .gitignore. 2013-06-07 10:58:11 +12:00
README.rst Add Fedora 19 support 2013-07-25 17:14:12 +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/stackforge/diskimage-builder" locally.
git clone https://github.com/stackforge/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. Move elements/ directory to disk-image-builder/elements/
mv elements/*  /path_to_disk_image_builder/diskimage-builder/elements/
  1. Call the following command to create cloud image is able to run on OpenStack:

6.1. Ubuntu cloud image

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

6.2. Fedora cloud image

JAVA_FILE=jdk-7u21-linux-x64.tar.gz DIB_HADOOP_VERSION=1.1.2 DIB_IMAGE_SIZE=10 disk-image-create base vm fedora hadoop root-passwd -o fedora_hadoop_1_1_2

Note: If you build Fedora 19 image from a non-Fedora 19 host (e.g. Ubuntu or Fedora 18), you should use the parameter 'WORKAROUND_BUG_1204824'. If this bug doesn't have status 'fix-commited', give to parameter 'WORKAROUND_BUG_1204824' not empty value. Bug: https://bugs.launchpad.net/diskimage-builder/+bug/1204824

WORKAROUND_BUG_1204824=true JAVA_FILE=jdk-7u21-linux-x64.tar.gz DIB_HADOOP_VERSION=1.1.2 DIB_IMAGE_SIZE=10 disk-image-create base vm fedora hadoop root-passwd -o fedora_hadoop_1_1_2

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 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.