Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gianluca-mascolo/firecracker-ansible
Manage Firecracker instances with Ansible
https://github.com/gianluca-mascolo/firecracker-ansible
ansible firecracker firecracker-microvms microvms
Last synced: 2 months ago
JSON representation
Manage Firecracker instances with Ansible
- Host: GitHub
- URL: https://github.com/gianluca-mascolo/firecracker-ansible
- Owner: gianluca-mascolo
- License: gpl-3.0
- Created: 2021-11-13T11:53:33.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-17T18:37:56.000Z (about 3 years ago)
- Last Synced: 2023-03-12T17:10:25.084Z (almost 2 years ago)
- Topics: ansible, firecracker, firecracker-microvms, microvms
- Language: Jinja
- Homepage:
- Size: 27.3 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Firecracker VM management with Ansible
## About
This project is a personal research about Firecracker and Microvms.
It contains an Ansible playbook used to start one or more virtual machines described by a configuration file.## Requirements
* [Firecracker](https://github.com/firecracker-microvm/firecracker) engine
* Ansible
* A Linux host with:
- libvirt and a bridge configured
- systemd
- screen
- sudo rights
* A [kernel and a root filesystem](https://github.com/firecracker-microvm/firecracker/blob/main/docs/getting-started.md#running-firecracker) for your vm.Additionally you will need Ansible galaxy collection `ansible.netcommon` installed locally:
`ansible-galaxy collection install -p ./collections -r requirements.yml`
## Demo
[![asciicast](https://asciinema.org/a/449532.svg)](https://asciinema.org/a/449532)
## How it works
The playbook will install systemd user services in your `~/.config/systemd/user/` to start a firecracker process for every vm you need to manage.
It will then create the configured tap interfaces and attach them to a libvirt network bridge.
Finally, using firecracker REST api it will start the configured vms and you can attach to the console process using screen.
The configuration file for virtual machines is placed in [group_vars/firecracker.yml](group_vars/firecracker.yml)
To ask for sudo password (if needed) run the playbook with
`ansible-playbook -K playbook`## Disclaimer
At this stage all I can say is: "it works on my machine(TM)".