Gentoaster GSoC 2011
1.
What is Gentoaster?
Introduction
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/)
Screenshots
            2.
How to use
Installation
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.
Writing configurations
All configurations are INI files of the following format:
Code Listing 2.1: Example minimal configuration |
[vmconfig]
BUILD_ID='minimal'
BOOT_MEGABYTES='64'
SWAP_MEGABYTES='128'
ROOT_MEGABYTES='3903'
TIMEZONE='Europe/London'
KEYBOARD='uk'
HOSTNAME='gentoo'
ROOT_PASSWORD='g3nt00'
DEFAULT_USERNAME='gentoo'
DEFAULT_PASSWORD='g3nt00'
USE_FLAGS=''
PACKAGE_USE=''
FEATURES='parallel-fetch userfetch userpriv getbinpkg'
PACKAGE_ACCEPT_KEYWORDS=''
PACKAGES_LIST='dhcpcd'
OUTPUT_FORMAT='raw'
|
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'.
Running
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 |
3.
Getting Source
Git repository
The source code for this project is available at http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=summary
Source tarball
A version 0.1 (end-of-GSoC) source tarball is available at http://soc.dev.gentoo.org/~hexxeh/gentoaster-0.1.tar.gz
|