Matt Bajor
I'm an Infrastructure Automation Engineer at Rally Software
The first part of the presentation will be an introduction to unikernels and their benefits, a comparison to our existing 'stacks', as well as a brief overview of the current ecosystem.
The second part of the presentation will be done in live demo mode. We will be building, packaging, and deploying an Erlang application (an overly simple webserver) as a LING unikernel on EC2. This will involve creating an AMI and provisioning an instance.
This presentation consists of two parts:
Designed to support a wide array of hardware:
brw-rw---- 1 root floppy 2, 0 May 1 15:19 /dev/fd0
(Thanks RMS!)
libpango
SSH (we're immutable right?)
kmod
** Multi-user support **
It's only the app running bro!
So let's only deploy and maintain what we are actively using.
An application compiled with everything it requires to operate including:
in addition to
and packaged as an artifact that can be run against a H/V
*In the form of a Library OS
* goofs is a flat (think s3) plan 9 based filesystem that can be used for non-persistent block storage. ie: mnesia tables
Purpose built
(like an ASIC)
Generalized
(POSIX Support)
We have been moving our 1990's workloads around from mainframes to servers to clouds to containers without changing the architecture much. Now that we have something that works (cloud like platforms), let's invest in making applications that fully utilize the potential of our fancy ass platforms.
Paravirtualization (the type of virtualization Xen provides) basically exposes hardware in a similar, but consistent manner to the guests.
This means there is no need to support specific hardware in guests; only the virtualized hardware interfaces which remain consistent.
No longer do we need to run applications co-located on the same hardware in order to communicate. Almost all inter-process comms in an SOA is done over the network allowing each part of the architecture to run in isolation with all comms happening on the network layer.
In order to reap the benefits that a true unikernel architecture offers, it is required to design (or redesign) the application to run in such an environment. This lack of general POSIX support is why a true unikernel approach can be so much leaner and less complex than existing Linux based stacks.
Luckily with languages like Java and Erlang, this can mostly be done at the runtime level requiring minimal application code changes if your app supports running in an ephemeral SOA environment.
Just like your app!
Docker and other containerization techniques were a drastic improvement with regards to efficiency when compared to traditional VMs, but this is not the end-all be-all. Currently the shared nature of containers and the reliance on shared system libraries/kernels creates a few problems. Unikernels attempt to address the major faults of containers. Also there's security...
Current best practices* dictate building a single artifact that is then moved around through environments that have different configurations. By compiling configurations into the binary this flow no longer works.
Luckily this configuration check is happening in the build phase which is much less risky than if it were changing production systems!
The major benefit here is when using a compiler that supports compiling in configuration information (like OCaml), the compiler sees exactly what is being setup, checks to confirm it can compile, and removes anything that is left unconfigured, further reducing the actual code being deployed and thus the security footprint etc.. This also creates a unique footprint for each instance. When is the last time Puppet removed packages that were not in use?
* 12 Factor Apps
This next evolution in architecture will not be a fork-lift. We have done that from mainframes to iron to the cloud. It is now time to re-architect our applications to make better and more efficient use of our limited resources.
Adopting the mentality that the system running will never change, but only be replaced is a hard shift in thought. It requires thinking about where the app requires persistence and making that happen which can be more difficult than just writing to local disk.
(In alphabetical order)
05/01/2015
By Matt Bajor
This presentation is for the Denver Erlang / Elixir meetup and includes an introduction to unikernels, rump kernels, and anykernels as well as a demo of how to deploy an Erlang application to EC2 as a unikernel using the LING toolchain.