Cloud Installer (originated by Dell)
Pull request Compare This branch is 4824 commits behind crowbar:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

This file documents how to build the Crowbar installation DVD image.

  * An unfiltered Internet connection and a decent amount of bandwidth.
    The first time you try to build Crowbar it will need to download
    about 1.5 gigs worth of data from the official Ubuntu apt repositories,
    the Opscode chef repository, the official Openstack 2011.2 PPA, and
    an official Ubuntu CD image mirror.
  * bash version 4 or higher uses associative arrays, which bash got in version 4.
  * mkisofs
    The end product of the build script is an ISO image that will be used
    to bootstrap the Crowbar admin node. 
  * debootstrap
    The build process needs to download all the .debs and gems that 
    Crowbar requires, and we don't want to inadvertently mess up the build
    machine when we do that.  All extra packages are downloaded into a
    chrooted minimal Ubuntu intall, and we use debootstrap to enable that.
  * Sudo to root privileges for the following commands:
    * /bin/mount, /bin/umount
      We have to be able to mount and umount the Ubuntu .iso image, as well as
      a tmpfs for debootstrap, and we have to be able to bind mount 
      /dev, /dev/pts, /proc, and /sys into the debootstrap chroot environment.
    * /usr/sbin/debootstrap
      debootstrap requires root privileges to run.
    * /bin/cp
      We need to copy things into and out of the debootstrap environment to
      ensure it downloads and caches the right packages.
    * /usr/sbin/chroot
      All our package caching is done in a chroot environment, and chroot
      requires root permissions to run.

      If you want to allow build_crowbar to run the above commands as root
      without having to enter a password each time, the
      includes a sample line you can fix up and add to /etc/sudoers.
  * A working Sledgehammer tftpboot image.
    Sledgehammer is a minimal CentOS 5.6 pxe bootable image that we use
    to perform hardware discovery and configuration for devices that do not
    have low-level management tools for Ubuntu. You can find information on 
    how to build Sledgehamemr by reading its HOWTO.Non.Redhat file.  We do 
    not do fully automated builds of Sledgehammer due to a lack of a CentOS
    equivalent of debootstrap.

  * Run  
    The first time it is run, it will download and cache all the files it 
    needs from the official Ubuntu, Chef, and Openstack repositories. It will
    then build the Crowbar installation image, save it to the current 
    working directory, and print out a message saying where it saved the image.
    On subsequent runs it will run with the files it cached from the first
    run, unless update-cache is passed as a parameter to the script.

Customization: has several different parameters you can tune, either from
   $HOME/.build-crowbar.conf (for developer use), or from build-crowbar.conf
   in the current directory (for automated builds).

   Here are the parameters you can change through the above configuration files:
   * DEBUG
     If DEBUG is set to anything, build_crowbar will run in debug mode, and will
     print a transcript of everything it is doing to standard error.
     This is the default location where will keep the files
     it caches, along with the temporary directories used to mount the
     ISO image, the debootstrap chroot, and the directory we perform the build
     in.  It defaults to $HOME/.crowbar-build-cache.
     This is the default location where the Ubuntu .iso is stored. It defaults 
     to $CACHE_DIR/iso
     This is the location that we will save the Crowbar install iamge to.
     It defaults to the current directory.
     This is the location that we will mount isos in.  
     It defaults to $CACHE_DIR/image
     This is the directory we will stage the Crowbar build into.
     It defaults to $CACHE_DIR/build
     This is the numeric version of Ubuntu we are building Crowbar with.
     Right now we base the build on 10.10
     This is the one-word codename of $UBUNTU_VERSION.  Weird things will
     happen if it is not kept in sync with $UBUNTU_VERSION
   * PPAS
     This is an array of PPA archives to look in to gather packages from.
     This defaults to ("openstack-release/2011.2"), which is the official
     PPA for the Cactus release of Openstack.
     This is the base URL for the mirror we will try to download the 
     Ubuntu server ISO from.  It defaults to "".
     This points to the location we expect to find the unpacked Sledgehammer
     PXE boot archive.  It defaults to $CACHE_DIR/tftpboot
     The default version of Crowbar.  Defaults to dev.
     The name of the ISO that generates.
     Defaults to openstack-$VERSION.iso
     The directory that the Crowbar source is cheched out to.
     Defaults to the directory that is in.
     The directory that the Sledgehammer source is checked out to.
     Defaults to $CROWBAR_DIR/../sledgehammer
     This is the command that will run to clean the tree before
     staging the Crowbar build.  
     Defaults to 'git clean -f -x -d'
   * DEBS
     This is an array of additional packages that will try 
     to populate the .deb cache with.  It is empty by default.
   * GEMS
     This is an array of additional Ruby gems that build_crowbar will try to
     populate its .gem cache with.  It is empty by default.
   * AMIS
     This is an array of urls for AMI images that you want to prepopulate
     Crowbar with.  By default it contains the URL for the official release 
     AMI of Ubuntu 11.04 x86_64 server.
     This is the directory that we will mount a tmpfs on when we debootstrap
     a minimal Ubuntu install to prepopulate the deb and gem caches.
     It defaults to $CACHE_DIR/$UBUNTU_CODENAME.chroot
     This is the directory that will hold our .deb cache.
     It defaults to $CACHE_DIR/$UBUNTU_CODENAME/debs
     This is the directory that will hold our gem cache.
     It defaults to $CACHE_DIR/gems
     This is the directory that will hold our AMI cache.
     It defaults to $CACHE_DIR/amis
     This is the full name of the Ubuntu ISO we will use as the base of the 
     Crowbar installation image.
     Defaults to "ubuntu-$UBUNTU_VERSION-server-amd64.iso", which will 
     base us on the amd64 server spin of Ubuntu.
     This is the directory we will mount $UBUNTU_ISO on when we extract files
     from it.
     Defaults to $IMAGE_DIR/$UBUNTU_ISO minus the .iso at the end.