August 11, 2009
This article was contributed by Koen Vervloesem
At the end of July, Novell launched SUSE Studio, which it calls a
"simple and fast appliance builder". It provides a free and
easy-to-use, web-based user interface to roll your own customized (SUSE)
Linux distribution. The resulting image can be deployed on bare metal or as
a virtual appliance on a hypervisor. Novell has also started a SUSE
Appliance Program to support independent software vendors creating
Linux-based software appliances.
First, why would one build such a "software appliance" with SUSE Studio?
For companies, the advantages are obvious: an appliance tailored to a
specific application set makes it easier to maintain and gives it a more
predictable behavior. These companies can distribute one integrated package
with the operating system and (server) software to their customers. But the
same advantages hold for people who want to build a custom Linux
distribution to distribute for free, who want do demo some application
during a tradeshow, or who want a distribution with their own
branding. SUSE Studio developer Cornelius Schumacher lists some
concrete use cases:
For my personal work Studio has become an important
tool. I used it for example to create the
Marble Live CD,
or for my hackweek project, the
KDE
SDK. It's also a nice way to try out software or create an updated
openSUSE version, for example with the latest KDE. But many other people
are using Studio for interesting projects as well.
SUSE Studio is in beta phase and the website says it's "currently
available for a limited number of users", but anyone who sends their
email address via the SUSE
Studio login page will be put on the invitation list. Kindly asking one
of the operators in the #susestudio IRC channel for an invite tends to work
too, as your author found out. After receiving login information, signing
in can be done with
with OpenID among other options. SUSE Studio works in Firefox 2 and 3 on Linux, Mac OS X and
Windows, and in Safari 3 on Mac OS X.
From template to installable image
After the first login, the system offers some templates to build the
appliance upon. For the base system, the website gives the choice among
openSUSE 11.1, SUSE Linux Enterprise 10 and SUSE Linux Enterprise 11. There
are templates for JeOS (Just enough OS, a minimalist server appliance),
Server, GNOME Desktop, KDE 3 or 4 Desktop, and Minimal X. The last one,
which uses the IceWM window manager, is
especially useful for making a kiosk-like application. There is also a
choice between 32 or 64-bit architectures and a text box to give the
appliance a descriptive name.
The user navigates through the rest of the steps by clicking on some
tabs. In the Software tab, one can add or remove packages and repositories
or upload their own rpm files. Some basic knowledge of the available
repositories and software packages is needed, but the interface has a
helpful search function. SUSE Studio is also integrated well with the openSUSE Build Service
(which enables users to create packages for various Linux distributions
from source). One can build packages in the openSUSE Build Service, import
the repository into SUSE Studio and use the freshly built packages. For
example, this makes it possible to create an openSUSE
distribution with KDE 4.3, although by default KDE 4.1 is
installed.
The "Configure" tab gives a slew of options to configure: locale settings,
timezone, network, firewall, users and groups, the look and feel, the
default runlevel, a custom license agreement, MySQL configuration, custom
boot scripts, and so on. In the "Overlay files" tab one can add overlay
files, if, for example, some custom scripts are needed or some configuration
files in /etc have to be changed. Clicking on the "Build" tab gives
the choice among a disk image, a live cd, a VMware image, or a Xen
image. Support for creating images in OVF (Open Virtualization Format, an
open standard for packaging and distributing virtual appliances),
Microsoft's Hyper-V, and Amazon's EC2 AMI format (including deployment to
EC2) is planned. The build process itself takes less than five minutes most
of the time, even for a complete desktop system. The result can then be
downloaded.
By looking at some details, one can see that SUSE Studio is
well-engineered and has undergone a lot of usability tweaking. For example,
in the "Software" tab there's a "Recommended" list of applications, which is
different depending on the template the user has chosen. Moreover, at any
time the current disk footprint of the appliance is shown at the left side
of the web page, which is useful while building an image which has to fit
on a CD or a USB thumb drive. The left side also shows helpful messages
and tips. For example, while building a VMware image, it suggests
installing the open-vm-tools package. And, after adding a package, one
can view more details about the package, such as which dependencies are
installed. If the firewall is enabled in the "Configuration" tab and it is
not installed (for example while building upon a JeOS template), then an
error message appears with a button to add SuSEfirewall2. There
are a lot of these tips, which seem to come from the developers'
experiences and feedback by users of the alpha version.
An appliance in your browser
One great feature is the SUSE Studio Testdrive. This allows the user to
boot and test their appliance in a browser window without the need to
download it first. After the build, clicking on the Testdrive button will
launch the virtual machine. This runs on a KVM hypervisor on Novell's
servers and exposes the virtual machine framebuffer via VNC to a Flash
applet running in the user's browser. There are even buttons to switch to a
different virtual console, to press ctrl-alt-del, to press
ctrl-alt-backspace, or to change the keyboard layout. Each Testdrive
instance gets 512 MB of RAM and an hour to run.
One can also make changes to files in Testdrive, investigate the diffs,
and commit those changes to the appliance. The changes will then be implemented
when starting a new build. This is really nice, as one can, for example,
fire up an interactive installer of an application and commit the changes,
so that appliance users don't have to. SUSE Studio creator Nat
Friedman explains in his
blog how this is implemented with a copy-on-write (COW) disk image for the
KVM image. The original image is only used for reading and all writes go to
the COW file. Whenever the virtual machine wants to read a block, it first
checks for its presence in the COW file, and falls back to the read-only
image if not:
What's special is that we used
libext2fs, the user-space
implementation of the ext2fs filesystem, to read the filesystem metadata of
both the original and the modified filesystems. We read all the inodes and
dentries into memory, compare them, and display the differences. This
worked perfectly for us. The first time a diff is run, it takes a few
seconds, but after that the metadata blocks are cached, and it is common to
see warm diffs of multi-gigabyte appliances take less than half a
second.
Many possibilities
The SUSE Studio website is a closed-source Ruby on
Rails web application, but there are plans to open up the
code sometime in the future. Later this year, companies can buy SUSE Studio
Onsite, which is a
version on a
server hosted within their own data center. SUSE Studio uses the open
source Kiwi build tool as its
backend. When the user has created an appliance with SUSE Studio, he can
download the appliance description from SUSE Studio and build the appliance
later, directly with Kiwi. Some Kiwi recipes can be found in the Kiwi cookbook
on openSUSE's wiki. Kiwi also supports generating an EC2 AMI, so this
slight detour is a perfect way to generate an AMI for an appliance made by
SUSE Studio if you can't wait for the support coming later this year.
A big selling point of SUSE Studio is the documentation on openSUSE's
wiki. This varies from a FAQ, a tour, HOWTOs, and the API, to known issues,
support
channels, and downloads. The last
features some appliances that users have built with SUSE Studio, such
as a Mono 2.4 appliance, an Elisa Media Centre appliance, openSUSE images
for netbooks, and a demo live cd of Marble Desktop Globe.
The HOWTOs seem to be of good quality and guide you through some
elaborate tasks. The general HOWTOs
are mostly related to firstboot scripts and kiosk-like appliances, while
there are more specific KDE and Gnome
HOWTOs. Other HOWTOs are related to the type of deployment, such as VMware, VirtualBox
(the VMware images run fine in VirtualBox), disk images
and live
CDs.
An appliance in fifteen minutes
In the last few months, your author has tested some other Linux
appliance building tools as well, and can say with confidence that SUSE
Studio was the most impressive. While rBuilder
Online is also a handy and efficient tool, which supports more Linux
distributions than just the SUSE family and has a neat management console for
the appliance, SUSE Studio is much more user-friendly. Another solution, VMware Studio 1.0, also doesn't
match the user experience of SUSE Studio: the user has to run this
appliance builder in VMware and download a whole DVD image for the
distribution the appliance will be based on. Moreover, building the image
can take hours and has to start over from scratch when the user makes the
slightest error, such as a typo in a URI. Advantages of VMware Studio are
the support for a lot of Linux distributions and the excellent
documentation.
All in all, compared to its competitors, SUSE Studio is without doubt
the most easy-to-use, the most well-engineered, and the most efficient
appliance builder. Even someone without any previous experience can build a
software appliance in fifteen minutes. If it would only offer more
distributions than just the SUSE family for the operating system base, it would
be even more interesting.
(
Log in to post comments)