|
Appliance Kit Lite Project Appliance Developer Documentation
Design Development
Related Projects
|
Goal/VisionBuilding OpenSolaris-based virtual appliances entails significant Solaris expertise that goes beyond what an appliance developer normally needs in terms of developing, packaging and installing software. Building virtual appliances in a scripted manner (instead of manually clicking here and typing there) also requires sophisticated expertise in the target virtualization platforms. Therefore, to enable product development engineers (PDEs) and release engineers (REs) to efficiently build virtual appliances, we need to abstract some of these gory details away. The virtual appliance build service is a step toward this direction. This is a black box service inside Sun's network where PDEs submit a recipe for an appliance and after a while, they get the completed virtual machine (VM) images. The key benefits are:
Eventually, as the build service is proven, it may even be made available for users on the Internet. OverviewVirtual Appliance Projects are created and managed by appliance developers who supply an appliance build "recipe" that defines how a set of external content, their own content or "glue" and reusable appliance kit modules are assembled to produce custom virtual appliances. These projects may or may not be run by the same people that own the development projects associated with the main external content. The Appliance Kit Lite Project helps appliance developers easily define, build and maintain virtual appliances by providing documentation, reusable components, starter building block VM images and a virtual appliance build service.
Implementation ApproachesThe main consideration in designing the service to make this easy enough to use for people, and hide enough things so that the AKLite team can change the build process later. Input to the blackbox (AKA "recipe")
Output from the blackbox
Scripted build processThe main part of this task is to come up with a script that does the build without human intervention, in a headless environment. Note that because this is SaaS and not installable software, the script can be hard-coded against a particular environment. How the actual script would look will highly depend on which one of several techniques we use for a build, and what v12n technology we use, but for example if we assume multiple BEs on a local system method, it could be something like: #!/bin/bash -ex # extract recipe wget -O recipe.zip $1 unzip recipe.zip # start VirtualBox (assume the machine is already configured with the JeOS boot environment) VBoxManage startvm vmfactory # configure port forwarding from host to guest VBoxManage setextradata ... VBoxManage setextradata ... VBoxManage setextradata ... # ship the data and script to the guest scp the-script-to-be-run-from-guest.sh me@guest:~/ scp recip.ezip me@guest:~/ # login to the guest and do the real work ssh me@guest the-script-to-be-run-from-guest.sh # reset VM VBoxManage controlvm vmfactory acpipowerbutton # do some more work on the guest ssh me@guest some-more-script.sh # and I'm sure I missed million other steps ... # eventually we power off the VM VBoxManage controlvm vmfactory acpipowerbutton # and maybe some V2V conversions here? ... # if we need to do the work in another server, we can do so, too ssh me@another-server yet-more-script.sh # done! At this point, we have a script that, if run with the right input on the right machine, will produce images in some known place in the file system. Hooking up to HudsonThe final wrap up is to hook this up to Hudson so that people can run the script on their own. In particular, it ...:
See the mock up configuration in Hudson Future ProofingThe input as a combination of a list of user packages and a post-installation script should work consistently regardless of both installation methods that Rudolf came up so far (switching BEs in the same guest and AI-based install), plus additional variations in details (such as how to compress disk images, V2V conversion or not, etc.) So it should give us a reasonable assurance that it'll work with new methods that may come along in the future. Build process can be decomposed to several parts (installation, virtual disk compression, and V2V conversions, for example) for better pipelining and faster turn-around time during debugging. If the demand of the build service grows, we can have multiple identically configured servers that'll do the builds, and let Hudson do the scheduling. The build script in the Subversion repository will encourage interested parties to adopt it and modify it. We might consider adding test steps to this, to ensure that the resulting image qualifies the basic quality criteria, or even running the existing product test suites. Resources
|
