Christopher Tozzi, Contributing Editor

January 6, 2011

It’s one thing to talk in vague terms about “the cloud,” and another to write software that actually works with it. Thanks to Ubuntu’s cloud-init package, coding for the cloud can be simple, practical and even straightforward. Here’s a look at the technology in action, and where it fits into the larger cloud-computing ecosystem.

Like many things cloud-related, cloud-init — which the Ubuntu wiki describes as a package “that handles early initialization of a cloud instance” — can be difficult to define in precise terms. Put simply, though, the software is a tool for automatically performing different tasks when a cloud image is booted for the first time. It supports Ubuntu Enterprise Cloud images, as well as Ubuntu images available on Amazon’s EC2.

Cloud-Init in Action

We last visited cloud-init during the build-up to the release of Ubuntu 10.10, which introduced several key new features to the software. What caught my eye recently was not the announcement of new features, but several practical examples by Canonical contributor Ahmed Kamal of how the package can be useful for building and deploying a cloud environment.

The first, a screencast produced by Kamal demonstrating the basics of cloud-init and what it can do, is a bit generic, but it nonetheless provides an excellent overview of the technology. Here’s a look:

More interesting, perhaps, is a blog post in which Kamal explains how to use cloud-init in conjunction with the KVM virtualization hypervisor to deploy cloud images locally. In his example, he uses cloud-init to launch a simple Web server running inside a locally hosted cloud image.

Running a Web server inside a cloud image isn’t very stunning in itself. What is remarkable, however, is the ease with which KVM and cloud-init cooperate while running together on a local machine. With only a handful of bash commands, Kamal is able to take a generic image of Ubuntu server edition and, using cloud-init and KVM, turn it into a Web server available to the host machine. That certainly beats building a virtual server manually.

In addition, this example shows how KVM can be combined with cloud technology for testing or customizing cloud deployments. It has particularly interesting implications for organizations wishing to test cloud deployments before putting them into the wild in a place like EC2, or for those with limited computing resources who want to build their own cloud environments.

In another post, Kamal demonstrates how to make cloud-init run custom user-written scripts when a cloud image is initialized. This is really the most remarkable aspect of the technology, since, as Kamal points out, the “possibilities are endless” when custom scripts are combined with cloud-init.

The Bigger Picture

cloud-init is cool, especially if you’re a seasoned Unix programmer. For those of us without amazing coding skills however, the technology still matters, particularly with regards to the development of the cloud ecosystem and the establishment of its dominant players.

Above all, cloud-init represents a major part of Canonical’s bid to hold market share within the cloud niche. By appealing to users who value customization and automation of cloud deployments, the company hopes to be able to hold its own against other important competitors in the cloud arena, like Red Hat.

And Canonical’s emphasis on customization is an important point. So far, much of the hype surrounding the cloud has centered on the efficiency, ease of deployment and accessibility of cloud-based machines, with relatively little attention afforded to the extent to which users can customize software running in the cloud. cloud-init’s chief selling point, meanwhile, is the customizability it guarantees for Ubuntu-based cloud images.

In this sense, Canonical’s strategy for the cloud seems to stand out in unique ways. Whether it will pay off remains to be seen, but this is a topic to watch closely as the cloud develops.

Follow Talkin’ Cloud via RSS, Facebook and Twitter. Sign up for Talkin’ Cloud’s Weekly Newsletter, Webcasts and Resource Center. Read our editorial disclosures here.

Read more about:


About the Author(s)

Christopher Tozzi

Contributing Editor

Christopher Tozzi started covering the channel for The VAR Guy on a freelance basis in 2008, with an emphasis on open source, Linux, virtualization, SDN, containers, data storage and related topics. He also teaches history at a major university in Washington, D.C. He occasionally combines these interests by writing about the history of software. His book on this topic, “For Fun and Profit: A History of the Free and Open Source Software Revolution,” is forthcoming with MIT Press.

Free Newsletters for the Channel
Register for Your Free Newsletter Now

You May Also Like