« Previous 1 2
Goodbye virtual machines, hello microVMs
Small Scale
Advanced Tooling with Ignite
I extended the tooling created for Footloose described in the first article to create, show, configure, and clean up microVM stacks. To get started with the wrapper [8], just download the sources with
git clone https://github.com/richnusgeeks/devops.git pushd CloudInABox/MicroVMs/scripts
You could use cd
instead of pushd
, but I prefer pushd
for its intelligence. The wrapper script execution should show you a help screen (Figure 4).
The top level wrapper script just takes a simple configuration (Listing 3). Simply execute
Listing 3
footloose.cfg
# Name Count Image Kernel Cpu Memory Disk Ports([hostPort:]containerPort) ubuntu1804 1 weaveworks/ignite-ubuntu:18.04 weaveworks/ignite-kernel:5.13.3 2 2G 20G 22,38080,52812,58080 centos8 1 weaveworks/ignite-centos:8 weaveworks/ignite-kernel:5.13.3 2 2G 20G 22,38080,52812,58080 kafka 3 weaveworks/ignite-ubuntu:20.04 weaveworks/ignite-kernel:5.12.18 2 2G 20G 22,2181,8080,9092,38080,52812,58080 spark 3 weaveworks/ignite-ubuntu:20.04 weaveworks/ignite-kernel:5.12.18 2 2G 20G 22,7077,8080,8081,38080,52812,58080 consul 3 weaveworks/ignite-ubuntu:20.04 weaveworks/ignite-kernel:5.13.3 1 2G 20G 22,52812,58080,58500 hashiui 1 weaveworks/ignite-ubuntu:20.04 weaveworks/ignite-kernel:5.13.3 1 2G 20G 22,52812,53000,58080
sudo ./create_micro_vms_stack.sh create
to bring up the defined microVM stack. The creation of a stack also triggers an Ansible ping to the spawned microVMs to ensure SSH connectivity. Figures 5 and 6 show some portions of the creation output of 16 microVM stacks on my laptop. The commands
sudo ./create_micro_vms_stack.sh test <ansible role name, e.g., spark> sudo /create_micro_vms_stack.sh delete
configure the created microVMs with the necessary software and clean up the enacted stack (Figure 7).
Conclusion
AWS Firecracker is a breakthrough technology that provides the best from both the container and virtual machine worlds. Ignite further creates a user-friendly declarative GitOps mechanism that provides additional functionality over Firecracker to run OCI containers under strong isolation of hardware-assisted virtualization. The resulting microVMs are highly useful in all use cases, ranging from development to production environments. Adoption of these microVM-based instant stacks will boost engineering effectiveness while slashing your infrastructure bill.
Infos
- "Goodbye virtual machines, hello container machines" by Ankur Kumar, ADMIN , issue 68, 2022, pg. 46, https://www.admin-magazine.com/Archive/2022/68/Goodbye-virtual-machines-hello-container-machines
- "Goodbye cloud VMs, hello laptop VMs" by Ankur Kumar, ADMIN , issue 69, 2022, pg. 22, https://www.admin-magazine.com/Archive/2022/69/Goodbye-cloud-VMs-hello-laptop-VMs
- Firecracker: https://firecracker-microvm.github.io/
- Firecracker 4,000 microVM demo: https://github.com/firecracker-microvm/firecracker-demo
- Ignite GitHub project: https://github.com/weaveworks/ignite
- Footloose on GitHub: https://github.com/weaveworks/footloose
- Ignite API object documentation: https://ignite.readthedocs.io/en/stable/declarative-config/
- Wrapper utilities: https://github.com/richnusgeeks/devops/tree/master/CloudInABox/MicroVMs/scripts
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy ADMIN Magazine
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Most Popular
Support Our Work
ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.