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

Xen Project Announces Performance and Security Advancements with Release of 4.19
Aug 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
Jul 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)

Xen Summit Talks Now Live on YouTube!
Jun 18 2024

Hello Xen Community! We have some thrilling news to share with you all. The highly anticipated talks from this year’s Xen Summit are now live on YouTube! Whether you attended the summit in person or couldn’t make it this time, you can now access all the insightful presentations

Get ready for Xen Summit 2024!
May 24 2024

With less than 2 weeks to go, are you ready? The Xen Project is gearing up for a summit full of discussions, collaboration and innovation. If you haven’t already done so – get involved by submitting a design session topic. Don’t worry if you can’t attend in person,