Exadra37

Exadra37

Unikernels - an emerging infrastructure deployment pattern

I saw today this article about uni-kernels and I would like to ask:

  • If any member of the community have already played with uni-kernels?
  • Is this something where the BEAM can run on top? (sorry if I am asking something dumb here…)

It seems like the DevOps world is consistently refactoring it’s existence yet at the same time smashing into other domains of the business. Recently, security has been one of those domains creating the new discipline of DevSecOps — that is, applying DevOps principles towards security. This has created an opportunity for an obscure infrastructure paradigm to start to take hold.

Unikernels are an emerging infrastructure deployment pattern that is going in every direction very fast. What is a unikernel though? Simply put, unikernels are the equivalent of deploying your application as it’s own operating system. Since developers predominately deploy their applications on top of Linux virtual machines, unikernels are a way to package your application as it’s own virtual machine in lieu of sitting on top of something like Linux. Is it like a container? Well, there are a few definitions but the concept is relatively old.

Most Liked

rickp

rickp

This is interesting - as I signed up to this forum to find out a little more about using rebar3 build tools from mix. The reason is that we have a plugin for rebar3 that takes an Erlang/OTP release and turns it into a unikernel image ready to run onto of Xen, KVM, AWS etc. I’m curious as to how to support elixir - I can see how to generate an OTP release using distillery, but the next step isn’t clear.

We’re actually using OSv and running the beam ontop of that. There are a couple of gotchas - there’s no fork() in OSv as its a true unikernel, so we use a slightly modified Erlang/OTP release (just to be included in the unikernel image, you use your normal toolchain when compiling). The rebar3_osv plugin includes a bare OSv image which is then spun up and the Erlang/OTP release pushed into it.

The result is a unikernel image which runs under a bunch of hypervisors. On startup it can use cloud-init to modified startup files, then the erlang application is started. There’s no kernel/user space split but almost everything works as you’d expect. The main missing feature is ports (which would require fork()).

There’s a bit more, with a noddy demo here: GitHub - OtoloNetworks/rebar3_osv: Turn an Erlang/OTP application into a Unikernel image · GitHub

If anyone has any suggestions as to how to make this work with mix+distillery, I’m all ears!

hauleth

hauleth

There was LING (earlier known as Erlang On Xen) but it seems dead. Unfortunately unikernel idea was killed by containerisation (in form of Docker), however I still count that one day it will come back as an great idea it is. Right now the nearest we can get to the unikernel in BEAM world is Nerves I believe.

outlog

outlog

yeah, from my limited understanding I would think nerves fits within the unikernel concept..

you can use Nerves to deploy “real” servers Running Nerves on Amazon EC2 it’s not only for Rpi..

Where Next?

Popular in Discussions Top

matthias_toepp
I’d love to hear what people think about Wisp, the new Gleam web framework started by Gleam’s primary creator Louis Pilfold. Gleam, alon...
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
laiboonh
Hi all, I am trying to convince my team to use liveview over the current react. What are some of the points where one should consider us...
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New
WolfDan
After doing a port from a c++ library to my project in phoenix I’ve seen that I need a faster way to run this algorithm and I found this ...
New
mmport80
I have put far too much effort into Dialyzer over the last year or so - and basically - I doubt it’s worth the effort. It’s not as easy ...
New
PragTob
Hey everyone, this has been on my mind for some time and I’d love your input on it! TLDR: I feel like maps are superioer for storing and...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
Markusxmr
Since Drab has been developed for a while in the open, introducing the Liveview functionality in a way it happend appears to undermine th...
New

Other popular topics Top

siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39297 209
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New

We're in Beta

About us Mission Statement