Stackfactory: a Tool for Building Disk Images

This is a guest post by David Noe,  founder of stacklet.com. David explains how Stackfactory – the GPL tool used to build images – works and how others may benefit.

Stackfactory is a GPL tool used to create filesystems and disk images, complete operating systems ready to run on a virtualization platform such as Xen. The program itself is coded in python and defines an xml minilanguage for building filesystems programatically. The xml files are referred to as “specifications” or simply specs. The entire stackfactory pipleline from specification to disk image is shown here:
Diagram
From left to right we start out with some specs (which are simple xml files describing how to build a filesystem). The stackfactory program processes these specs into a tree of filesystems. In the tree above (labelled Filesystem Repository) we have created three filesystems: CentOS, Gnome and Ubuntu. The CentOS filesystem contains the minimum amount of core packages that would allow one to run CentOS. The Gnome filesystem is derived from the CentOS filesystem and layers the Gnome desktop components on top of the CentOS core. Then there is a minimal Ubuntu filesystem, analogous to the core CentOS filesystem except that it has Ubuntu packages instead of CentOS packages. Each of these three filesystems were created by running a spec through the stackfactory process.
To be clear, the filesystem repository shown is merely a sample — stackfactory can build trees of filesystems with unlimited depth. The contents of any given filesystem in the tree depends on the specification used to build it. Each filesystem can become the parent of a derived filesystem via snapshots. Essentially the snapshot mechanism lets us create new filesystems with a defined starting point without disrupting the original filesystem.
The final step in the pipeline is to select a filesystem from the tree and bundle it for deployment. During bundling stackfactory transfers the contents of a filesystem into a disk image that will be ready to run under virtualization. This bundling process is also specification driven. Currently there are specs to turn filesystems into xen disk images, vmware vmdk’s, qcow files, tarballs, Amazon ami’s and others. Supporting new platforms is tantamount to writing a specification that can output a format suitable for that platform.

Key Benefits

  • Programmable: Uses a specification language instead of hard-coding behaviors.
  • Layered: Filesystems can be built incrementally using snapshots
  • Flexible: Decoupling the process of creating filesystems from creating disk images allows us to retarget filesystems to the maximal number of platforms.

Read more

Welcome Honda to the Xen Project Board
12/09/2024

We're excited to announce our newest Advisory Board Member Honda, to Xen Project. Since its foundation, Honda has been committed to "creating a society that is useful to people" by utilizing its technologies and ideas. Honda also focuses on environmental responsiveness and traffic safety, and continue

Say hello to our new website
12/05/2024

Hello Xen Community, You may have noticed something different... We've refreshed our existing website! Why did we do this? Well, all these new changes are part of an ongoing effort to increase our visibility and make it easier to find information on pages. We know how important it

Xen Project Announces Performance and Security Advancements with Release of 4.19
08/05/2024

New release marks significant enhancements in performance, security, and versatility across various architectures.  SAN FRANCISCO – July 31st, 2024 – The Xen Project, an open source project under the Linux Foundation, is proud to announce the release of Xen Project 4.19. This release marks a significant milestone in enhancing performance, security,

Upcoming Closure of Xen Project Colo Facility
07/10/2024

Dear Xen Community, We regret to inform you that the Xen Project is currently experiencing unexpected changes due to the sudden shutdown of our colocated (colo) data center facility by Synoptek. This incident is beyond our control and will impact the continuity of OSSTest (the gating Xen Project CI loop)