Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
159 lines (142 sloc) 7.9 KB
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
all the packages that it will need to stage Crowbar onto an OS install
* 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 (if staging on to Ubuntu)
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.
Command Line Parameters:
* The first command line parameter is the OS you want to
stage Crowbar on to. Crowbar currently understands how to stage on to
ubuntu-10.10, redhat-5.6, redhat-5.7, and centos-5.7
This parameter forces the build to try and update the build cache again.
Use this parameter if you want to pull in updates from the upstream
repositories that Crowbar pulls packages from.
Any arguments after this that do not start with a hyphen are interpreted as
branches in the git repository that you want to merge along with the current
branch into a throwaway branch before staging Crowbar on to the build .iso.
If you are working on developing a barclamp or have changes in other
branches that you want to test out, this is the option for you. If your
build cache is also a git repository, it will try to merge identically
named branches in that repository as well -- this is a good way of testing
new packages before signing off on them. After the build is finished, the
build script will delete any throwaway branches it created, leaving the
repositories in the same state they started in.
Any arguments after this that do not start with a hyphen are interpreted
as extra barclamps to stage on the final .ISO. The build system will use
the metadata in the crowbar.yml files to figure out all the dependent
barclamps of the ones on the command line and include those as well. You
can also lass a barclamp group name my prefixing it with an @ sign, and
the build system will expand that into its component barclamps.
This tells the build system to try and smoketest the freshly-generated
.ISO. Any arguments after this that do not begin with a hyphen are
passed to the test framework -- please see test_framework/README.testing
for more information.
--ci <barclamp> <branch>
This tells the build system to test <branch> of <barclamp> to see if it
merges cleanly in with the current codebase and passed the smoketest.
If it does, the build system will finalize the merge and update the
submodule reference in the main crowbar repository, otherwise it will
roll back the merges and fail. This option is intended to be used by
Jenkins to implement gated submodules for the Crowbar repository.
This asks the build system to throw out unneeded packages from the base OS
install media. It relies on the presence of a minimal-install file listing
the minimal set of packages needed to deploy an admin node. Currently,
we only know how to do this on rpm based systems, because Ubuntu installs
are fairly small to begin with anyways.
This tells the build system that it should die instead of trying to update
the build cache. This is useful for automated build processes where you want
to build Crowbar with a curated set of packages. When --no-cache-update is
present and the build cache is a Git repository, the current checkout of the
build cache will be recorded in the build-info file.
Do everything but actaully build the iso. This is useful for updating
any caches that need updating without actaully forcing a cache update.
* Run from the Crowbar git repository.
The first time it is run, it will download and cache all the files it
needs to stage Crowbar on to the OS installation DVD, build an OS install
ISO with Crowbar staged on to it, save the generated .ISO 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:
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 image to.
It defaults to the current directory.
This is the location that we will mount isos in.
It defaults to $CACHE_DIR/image
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 crowbar-$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 -d'
The script is heavily commented, please refer to it for more
detailed information.
Jump to Line
Something went wrong with that request. Please try again.