- Hyperledger Fabric - KFS
- Posts
- Developing interactive workshops to FabricFast in only 1 week
Developing interactive workshops to FabricFast in only 1 week
Hi there!
This is what I developed this week:

The previous picture is how the interactive workshop looks after just 1 week of developing it (with full-time jobs)
Introduction
Last week, I entered a website called http://labs.iximiuz.com and tried to make a challenge. To my surprise, the challenge loaded almost instantly!
I asked myself, how can someone create a virtual machine in less than 2 seconds? How is this free?
After investigating, I found a post of the guy who created it, and he has a post where he dissects the architecture.
But there was a problem: I wanted to iterate quickly; the guy from the post had months to build it, and I only had a week.
Firecracker and MicroVM
The main actor in the architecture is Firecracker; you will think, what the heck is that?
To understand why I use Firecracker, we need to know why it was created and who created it.
Amazon created Firecracker back in 2018 to use it for their Lambda and Fargate serverless services.
Amazon needed a tool to launch isolated virtual machines fast. They call these machines MicroVMs.
MicroVMs are not containers or virtual machines, but they start much faster and have high isolation between them, so, in some way, they have the best of both worlds.
I was excited because I found a new technology that could help me achieve what I always wanted: interactive playgrounds. I found someone who had developed it, so it wasn’t impossible.
Architecture
The first thing I did was purchase a bare-metal machine in OVH for 6 months. It cost me 140e/month, but if this worked, it would be worth the price, plus I would learn a lot (I already did 😁).
After provisioning the virtual machine, I started like with any new technology, trying the minimal example, the Hello world.
Firecracker provides a tutorial on how to start your first Ubuntu 22.04 MicroVM. You can find the getting started of Firecracker on their GitHub repository.
After many iterations, failures, and trying to understand network devices in Linux, bridges, etc. (I won’t expand on this since the post would be too large), I was able to come up with the following simple architecture:

Workshop architecture
We have these components:
Firecracker-[vmId].socket is the socket where we can interact with Firecracker for the desired MicroVM; a socket is created for every workshop and user.
mgmt-api is used to create and stop the MicroVMs.
Ssh-conductor acts as a proxy between the authenticated user and the micro VM to execute commands from the browser.
xterm.js is the library used to communicate with the ssh-conductor and render the terminal in the browser
SQLite is used to store the state of the playgrounds; most likely, it will be changed in the future, but I wanted to make the architecture simple.
I spent the most time figuring out how to run docker, contained and Kubernetes in a microvm.
Firecracker MicroVMs use a Kernel and a RootFS.
The smaller the kernel, the faster the virtual machine will start.
I found problems adding modules needed for Kubernetes, such as VXlan. It was the first time I was compiling a kernel from scratch.
It was straightforward for the RootFS: I could start a virtual machine and make some persistable changes. I used this to prepare the template image for the workshops to be created since they need to include:
Docker
ContainerD
Bun
IPTables
etcetera
But in the end, it worked.
Next steps
My long-term goal is to build a platform for developers to create interactive courses.
For now, I want to learn and implement as much as possible in FabricFast to give the best experience possible to learn and practice Hyperledger Fabric.
I’m going to be adding automatic lesson reviewers, which right now it’s only implemented in the creation of the network workshop, I was able to detect if Kubernetes was installed and if the istio and DNS were configured.
So, I will add the automatic solution checker to all the workshops and ensure you get a badge and a credential at the end of the course.
When I’m done adding the features, I’ll increase the course cost, so ensure you get your discount before that happens!
You can get the course here: https://fabricfa.st/
I hope you learnt from this story.
See you.
— David