Skip to content
cloudedge edited this page Sep 16, 2012 · 35 revisions

Build the Crowbar ISO for Install (not a dev environment)

If you are planning to be CROWBAR DEVELOPER, please follow the Dev Tool Build instructions! It will allow you to build Crowbar and also submit pull requests if you find issues, develop code or contribute to documentation. It requires that you have a GitHub account.

https://github.com/dellcloudedge/crowbar/blob/master/README.build

Notes:

  • Please CORRECT this page if you find errors!
  • Ensure that you are running Bash 4 or greater as your shell.
  • build_crowbar.sh uses associative arrays, which bash got in version 4.
  • Lines below assume working from home directory
  • Build as ROOT (otherwise, check the install script to see which commands require sudo rights)
  • Build includes a component known as "sledgehammer" that is a CentOS based image for discovery. If the build finds a pre-created image in "../crowbar-sledgehammer/bin" directory, it uses it. If it's not found, build_sledgehammer.sh is invoked to build it (this requires a CentOS ISO to be available). This TFTPboot image does not change often.
  • Build process has been tested on Ubuntu 10.10, 11.04, 11.10 and 12.04.

Build ISOs are available on http://crowbar.zehicle.com if you don’t want to follow these steps then download the ISO. We are updating the code daily, but Rob creates a new ISO less frequently, so don’t assume that you have that latest!

Prerequisites

To build Crowbar, you need an linux machine and access to the internet. These videos show on how you can build using a Rackspace Cloud Server (http://youtu.be/FsOBaAiDgYs) or on a local VM (http://youtu.be/qvsfXPH5k5Q). We build Crowbar inside our firewall on our PCs too. No matter how you do it, Crowbar is full of fuzzily delicious cloud bits.

Of course, you still need to run the ISO to build a staged OS that can Install Crowbar.

Note: these instructions are for Ubuntu-11.10, Ubuntu-12.04, CentOS-6.2 & RHEL-6.2! The build machine should have enough memory (more than 360 MB, 2GB is ideal) otherwise it could fail during the build process.

if you're using an older version of Ubuntu, you might need to do the following (as root): cd /usr/share/debootstrap/scripts/gutsy ln -s gutsy precise

Preparation

  1. if not super user then su - (sometimes sudo su -)
  2. apt-get update (replace apt-get with your distro's package manager)
  3. apt-get install curl git build-essential debootstrap mkisofs binutils rpm ruby rubygems curl (replace apt-get with your distro's package manager)
  4. gem install json
  5. mkdir -p ~/.crowbar-build-cache/iso
  6. curl -o ~/.crowbar-build-cache/iso/CentOS-6.2-x86_64-bin-DVD1.iso http://ucmirror.canterbury.ac.nz/linux/CentOS/6.2/isos/x86_64/CentOS-6.2-x86_64-bin-DVD1.iso (look for your closest mirror because it will make a huge difference!)
  7. Download your target operating system
    1. Ubuntu for OpenStack: curl -o ~/.crowbar-build-cache/iso/ubuntu-12.04-server-amd64.iso http://releases.ubuntu.com/12.04/ubuntu-12.04.1-server-amd64.iso
    2. CentOS for Hadoop: oh, you already got it above :)

Build Crowbar (first build takes a while because components must be cached)

  1. if not super user then su - (sometimes sudo su -)
  2. git clone git://github.com/dellcloudedge/crowbar.git
  3. cd ~/crowbar
  4. if you have not yet built/downloaded the Sledgehammer discovery image, do that now...
    1. ./build_sledgehammer.sh (the first time will require lots of downloads, be patient)
    2. note: Sledgehammer does not change very often
  5. git checkout release/fred/openstack-os-build to retrieve the [[code path][https://github.com/dellcloudedge/crowbar/branches]] you want to build where release/[release]/[flavor]
  6. Pull in the barclamps
    1. git submodule init
    2. git submodule update
  7. ./build_crowbar.sh ubuntu-12.04 --update-cache (use your target OS here! Crowbar will tell you to download it if it's missing)
  8. ls *.iso

DevTool

If you are planning to do regular development, we highly recommend using the Dev Tool Build for builds instead of the "just create an ISO" process above.

Variations

To build Cloudera Hadoop (release/fred/cloudera-os-build) on CentOS 6.2 complete the steps above making the following changes:

  • The CentOS & RHEL DVDs are larger (4 GB!) so you may need larger volumes (>20 GB) to build

Build Options that you can set via EXPORTS

Note: You can store these in a ~/.build-crowbar.conf for easier reuse!

Usage "export PARAM=VALUE"

  • USE_PROXY : [0] = no, 1 = yes
    • PROXY_HOST
    • PROXY_USER
  • ALLOW_CACHE_UPDATE : [true], false
  • CACHE_DIR : ["$HOME/.crowbar-build-cache"]
  • ISO_LIBRARY : ["$CACHE_DIR/iso"]
  • SLEDGEHAMMER_PXE_DIR : [""$CACHE_DIR/tftpboot"]
    • SLEDGEHAMMER_DIR : ["${CROWBAR_DIR}/../crowbar-sledgehammer"]
  • ... there are more...
Clone this wiki locally