deb-sahara/doc/source/userdoc/cdh_imagebuilder.rst
Ken Chen ffa9f135b7 Add CDH plugin documents
We added documents on how to deploy and enable CDH plugin in Sahara,
and how to build images for CDH plugin. We also modified some other
pages to add involved contents and links.

Closes-Bug: #1395583

Change-Id: If1451eaf4a570165a87313dab347422480546f0c
2014-12-02 10:30:09 +08:00

2.8 KiB

Building Images for Cloudera Plugin ==================================

In this document you will find instructions on how to build Ubuntu and CentOS images with Cloudera Express versions 5.2.0.

Apache Hadoop. To simplify the task of building such images we use Disk Image Builder.

Disk Image Builder builds disk images using elements. An element is a particular set of code that alters how the image is built, or runs within the chroot to prepare the image.

Elements for building Cloudera images are stored in Sahara extra repository

Note

Sahara requires images with cloud-init package installed:

To create cloudera images follow these steps:

  1. Clone repository "https://github.com/openstack/sahara-image-elements" locally.

  2. Run the diskimage-create.sh script.

    You can run the script diskimage-create.sh in any directory (for example, in your home directory). By default this script will attempt to create cloud images for all versions of supported plugins and all operating systems (subset of Ubuntu, Fedora, and CentOS depending on plugin). To only create Cloudera images, you should use the "-p cloudera" parameter in the command line. If you want to create the image only for a specific operating system, you should use the "-i ubuntucentos" parameter to assign the operating system. This script must be run with root privileges. Below is an example to create Cloudera images for both Ubuntu and CentOS.

    sudo bash diskimage-create.sh -p cloudera

    NOTE: If you don't want to use default values, you should explicitly set the values of your required parameters.

    The script will create required cloud images using image elements that install all the necessary packages and configure them. You will find the created images in the current directory.

Note

Disk Image Builder will generate QCOW2 images, used with the default OpenStack Qemu/KVM hypervisors. If your OpenStack uses a different hypervisor, the generated image should be converted to an appropriate format.

The VMware Nova backend requires the VMDK image format. You may use qemu-img utility to convert a QCOW2 image to VMDK.

qemu-img convert -O vmdk <original_image>.qcow2 <converted_image>.vmdk

For finer control of diskimage-create.sh see the official documentation or run:

$ diskimage-create.sh -h