Flamingo: A Lightweight Cloud Instance Contextualization Tool
Jul 8, 2015
3 minutes read


When using on-demand instantiation of virtual machines in cloud computing, users pass configuration data to the cloud and that data is used for configuring the instances. This process is called contextualization. Contextualization includes identity(users, groups), network, system services and disk configuration.

flamingo is a contextualization tool that aims to handle early initialization of cloud instances.

The current de facto standard for instance virtualization is cloud-init. However, there are some problems with it. The most prominent ones are:

  • The usage of a scripting language (Python in this case), since scripting languages have the overhead of the interpreter, its dependencies and being slower than compiled ones due to their dynamic nature.

  • The documentation is lacking at best. There are examples of common use-cases. However, most of the code-base and plug-ins are undocumented. Inspecting the code-base is a prerequisite to extend the functionality or even understand it.

  • Test coverage is low. Making it hard to extend, maintain, and improve.

Don`t get me wrong it gets the job done. But, it has a lot of issuses and these issues make it hard to use, extend and maintain.


flamingo aims to solve the following problems encountered in cloud contextualization;

  • Speed
  • Dependency
  • Maintainability
  • Extensibility

Go is a very suitable choice for a tool like this. Since, it is fast, it has cheap concurrency, and dependency management is a breeze (see godep). It allows the distribution of a single executable binary with its dependencies.

Maintainability has two main components; Documentation and Tests.

godoc provides a tool and a set of rule of thumbs to allow codebase documentation strings to be used as documentation(similar to docstrings and javadocs, but different), which is great and understandable. For testing,

As for the tests, I find the idiomatic Go approach a bit lacking. It’s not expressive enough for my taste. And the errors become confusing when the code-base grows. So flamingo uses goconvey, a BDD framework for Go, along with dependency injection, this approach produces expressive results and makes the code extensible as a results.

Target Distribution

The current focus of flamingo is Atomic Host. Project Atomic is a lightweight operating system designed to run applications in Docker containers with orchestration capabilities (Kubernetes). Atomic Host has three different flavors; RHEL, CentOS, and Fedora.

What’s been done so far

Currently flamingo is in Alpha stage with a soon-to-come demonstration of its capabilities. The following functionality is completed, documented and tested;

  • Identity Management
  • SSH Configuration
  • Running Custom Scripts
  • Manage Services at Boot
  • Manage and Modify IPtables Rules

What’s Next

  • DataSource retrieval (User-Data, Meta-Data, Cloud-Config)
  • Tool Configuration
    • Command Line
    • User-Data
    • Meta-Data
  • Packaging
  • Atomic Host Repository Configuration
  • Disk Volume Management
  • Plug-in Architecture

You can find the source code for the tool here

Back to posts