Gentoaster GSoC 2011
What is Gentoaster?
Gentoaster is a collection of scripts that allow the automated creation of a Gentoo virtual machine image. There is also no reason why these images couldn't be used on physical machines. It accepts a configuration file, and produces a raw disk image (or a VirtualBox/VMWare image if you prefer).
It allows for the creation of an image in two ways. The first is via the CLI application. This accepts a configuration file and then produces an image using it. The other way, is via Gentoaster's WebUI. If you configure this properly, you can build an image simply by following through a web-based wizard. A configuration file is generated based on your input to this wizard and added to the queue of images waiting to be built.
If you install the prerequisite software required to make it work, you can also run a completed virtual machine that has been built using the WebUI remotely, without leaving your browser window. This is achieved by using QEMU along with noVNC (a HTML5 based VNC client: http://kanaka.github.com/noVNC/)
How to use
Installation instructions and information are available in the README file, located in the Git repository for this project. See the "Getting Source" section below for the URL.
All configurations are INI files of the following format:
Code Listing 2.1: Example minimal configuration
FEATURES='parallel-fetch userfetch userpriv getbinpkg'
There are also more optional settings which aren't used in the above example configuration. These are STAGE3_URL, PORTAGE_URL and BINHOST_URL. All these can be specified using the same format shown above.
BUILD_ID can be any string usable in a file path. BOOT_MEGABYTES, ROOT_MEGABYTES AND SWAP_MEGABYTES must be non-zero and integers. TIMEZONE can by any valid timezone (see /usr/share/zoneinfo). KEYBOARD can be any of the layouts listed in res/keyboard.lst. HOSTNAME, ROOT_PASSWORD, DEFAULT_USERNAME and DEFAULT_PASSWORD are all strings. USE_FLAGS should be a space-seperated list of USE flags to use. PACKAGE_USE should follow the same format as package.use, newlines are permitted here. FEATURES is a space-seperated list of FEATURES to use in make.conf. PACKAGE_ACCEPT_KEYWORDS follows the same format as package.accept_keywords, newlines are permitted. PACKAGES_LIST is a space seperated list of packages you wish to install, however you must be careful to ensure your image is large enough to build and install all of these packages. OUTPUT_FORMAT can be either 'raw', 'vmware' or 'vbox'.
You can build an image on the command line by using create_image.sh. This can take 4 options.
Code Listing 2.2: CLI options
--config <file> - path to the build configuration file as detailed above
--proxy "<proxy URL>" - URL for a proxy to be used when building the image
--compress - compress the completed image
--cachedkernel - EXPERIMENTAL: uses a precompiled kernel and modules from the res directory
Code Listing 2.3: Example
./create_image.sh --config configs/minimal.ini --compress
The source code for this project is available at http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=summary
A version 0.1 (end-of-GSoC) source tarball is available at http://soc.dev.gentoo.org/~hexxeh/gentoaster-0.1.tar.gz