All Projects â†’ weaveworks â†’ Footloose

weaveworks / Footloose

Licence: apache-2.0
Container Machines - Containers that look like Virtual Machines

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Footloose

16bitjs
💻 A 16-bit virtual machine, including assembly language with 37 instructions, binary assembler, and a step through debugger
Stars: ✭ 427 (-66.87%)
Mutual labels:  virtual-machine, vm
Runtime
OCI (Open Containers Initiative) compatible runtime using Virtual Machines
Stars: ✭ 588 (-54.38%)
Mutual labels:  containers, virtual-machine
Embiggen Disk
embiggden-disk live-resizes a filesystem after first live-resizing any necessary layers below it: an optional LVM LV and PV, and an MBR or GPT partition table
Stars: ✭ 440 (-65.87%)
Mutual labels:  virtual-machine, vm
Ark
ArkScript is a small, fast, functional and scripting language for C++ projects
Stars: ✭ 312 (-75.8%)
Mutual labels:  virtual-machine, vm
Enigma
An Erlang VM implementation in Rust
Stars: ✭ 877 (-31.96%)
Mutual labels:  virtual-machine, vm
Wasm3
🚀 The fastest WebAssembly interpreter, and the most universal runtime
Stars: ✭ 4,375 (+239.41%)
Mutual labels:  containers, virtual-machine
Vmcli
A set of utilities (vmcli + vmctl) for macOS Virtualization.framework
Stars: ✭ 571 (-55.7%)
Mutual labels:  virtual-machine, vm
open-semantic-desktop-search
Virtual Machine for Desktop Search with Open Semantic Search
Stars: ✭ 22 (-98.29%)
Mutual labels:  vm, virtual-machine
Ethereumjs Monorepo
Monorepo for the Ethereum VM TypeScript Implementation
Stars: ✭ 813 (-36.93%)
Mutual labels:  virtual-machine, vm
Lc3 Vm
Write your own virtual machine for the LC-3 computer!
Stars: ✭ 631 (-51.05%)
Mutual labels:  virtual-machine, vm
Virtualbox Python
Complete implementation of VirtualBox's COM API with a Pythonic interface.
Stars: ✭ 277 (-78.51%)
Mutual labels:  virtual-machine, vm
Kata Containers
Kata Containers version 2.x repository. Kata Containers is an open source project and community working to build a standard implementation of lightweight Virtual Machines (VMs) that feel and perform like containers, but provide the workload isolation and security advantages of VMs. https://katacontainers.io/
Stars: ✭ 1,053 (-18.31%)
Mutual labels:  containers, virtual-machine
Smlvm
Smallrepo Virtual Machine
Stars: ✭ 265 (-79.44%)
Mutual labels:  virtual-machine, vm
Cc Oci Runtime
OCI (Open Containers Initiative) compatible runtime for Intel® Architecture
Stars: ✭ 418 (-67.57%)
Mutual labels:  containers, virtual-machine
RISVM
A low overhead, embeddable bytecode virtual machine in C++
Stars: ✭ 21 (-98.37%)
Mutual labels:  vm, virtual-machine
Awesome Wasm Runtimes
A list of webassemby runtimes
Stars: ✭ 490 (-61.99%)
Mutual labels:  virtual-machine, vm
tsharkVM
tshark + ELK analytics virtual machine
Stars: ✭ 51 (-96.04%)
Mutual labels:  vm, virtual-machine
js5005
js5005 is a virtual CPU with every logic gate simulated. A pretty interface, a built in assembler, display, and 256 bytes of RAM to boot. It's the better i4004.
Stars: ✭ 14 (-98.91%)
Mutual labels:  vm, virtual-machine
Mac
bytecode interpreter in c (blog post)
Stars: ✭ 628 (-51.28%)
Mutual labels:  virtual-machine, vm
Ebcvm
EFI Byte Code Virtual Machine in userspace
Stars: ✭ 34 (-97.36%)
Mutual labels:  virtual-machine, vm

Build Status Go Report Card GoDoc

footloose

footloose creates containers that look like virtual machines. Those containers run systemd as PID 1 and a ssh daemon that can be used to login into the container. Such "machines" behave very much like a VM, it's even possible to run dockerd in them :)

footloose can be used for a variety of tasks, wherever you'd like virtual machines but want fast boot times or need many of them. An easy way to think about it is: Vagrant, but with containers.

footloose in action:

asciicast

Install

footloose binaries can be downloaded from the release page:

Linux

curl -Lo footloose https://github.com/weaveworks/footloose/releases/download/0.6.4/footloose-0.6.4-linux-x86_64
chmod +x footloose
sudo mv footloose /usr/local/bin/

macOS

On macOS we provide a direct download and a homebrew tap:

curl --silent --location https://github.com/weaveworks/footloose/releases/download/0.6.4/footloose-0.6.4-darwin-x86_64.tar.gz | tar xz
sudo mv footloose /usr/local/bin

or

brew tap weaveworks/tap
brew install weaveworks/tap/footloose

From source

Alternatively, build and install footloose from source. It requires having go >= 1.11 installed:

GO111MODULE=on go get github.com/weaveworks/footloose

Usage

footloose reads a description of the Cluster of Machines to create from a file, by default named footloose.yaml. An alternate name can be specified on the command line with the --config option or through the FOOTLOOSE_CONFIG environment variable.

The config command helps with creating the initial config file:

# Create a footloose.yaml config file. Instruct we want to create 3 machines.
footloose config create --replicas 3

Start the cluster:

$ footloose create
INFO[0000] Pulling image: quay.io/footloose/centos7 ...
INFO[0007] Creating machine: cluster-node0 ...
INFO[0008] Creating machine: cluster-node1 ...
INFO[0008] Creating machine: cluster-node2 ...

It only takes a second to create those machines. The first time create runs, it will pull the docker image used by the footloose containers so it will take a tiny bit longer.

SSH into a machine with:

$ footloose ssh [email protected]
[[email protected] ~]# ps fx
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:00 /sbin/init
   23 ?        Ss     0:00 /usr/lib/systemd/systemd-journald
   58 ?        Ss     0:00 /usr/sbin/sshd -D
   59 ?        Ss     0:00  \_ sshd: [email protected]/1
   63 pts/1    Ss     0:00      \_ -bash
   82 pts/1    R+     0:00          \_ ps fx
   62 ?        Ss     0:00 /usr/lib/systemd/systemd-logind

Choosing the OS image to run

footloose will default to running a centos 7 container image. The --image argument of config create can be used to configure the OS image. Valid OS images are:

  • quay.io/footloose/centos7
  • quay.io/footloose/fedora29
  • quay.io/footloose/ubuntu16.04
  • quay.io/footloose/ubuntu18.04
  • quay.io/footloose/ubuntu20.04
  • quay.io/footloose/amazonlinux2
  • quay.io/footloose/debian10
  • quay.io/footloose/clearlinux

For example:

footloose config create --replicas 3 --image quay.io/footloose/fedora29

Ubuntu images need the --privileged flag:

footloose config create --replicas 1 --image quay.io/footloose/ubuntu16.04 --privileged

footloose.yaml

footloose config create creates a footloose.yaml configuration file that is then used by subsequent commands such as create, delete or ssh. If desired, the configuration file can be named differently and supplied with the -c, --config option.

$ footloose config create --replicas 3
$ cat footloose.yaml
cluster:
  name: cluster
  privateKey: cluster-key
machines:
- count: 3
  backend: docker
  spec:
    image: quay.io/footloose/centos7
    name: node%d
    portMappings:
    - containerPort: 22

If you want to use Ignite as the backend in order to run real VMs, change to backend: ignite.

cluster:
  name: cluster
  privateKey: cluster-key
machines:
- count: 3
  backend: ignite
  spec:
    image: weaveworks/ignite-centos:7
    name: node%d
    portMappings:
    - containerPort: 22
  # All Ignite options shown below here are optional and can be omitted.
  # These are the defaults:
  ignite:
    cpus: 2
    memory: 1GB
    diskSize: 4GB
    kernel: weaveworks/ignite-ubuntu:4.19.47

This configuration can naturally be edited by hand. The full list of available parameters are in the reference documentation.

Examples

Interesting things can be done with footloose!

Under the hood

Under the hood, Container Machines are just containers. They can be inspected with docker:

$ docker ps
CONTAINER ID    IMAGE                        COMMAND         NAMES
04c27967f76e    quay.io/footloose/centos7    "/sbin/init"    cluster-node2
1665288855f6    quay.io/footloose/centos7    "/sbin/init"    cluster-node1
5134f80b733e    quay.io/footloose/centos7    "/sbin/init"    cluster-node0

The container names are derived from cluster.name and cluster.machines[].name.

They run systemd as PID 1, it's even possible to inspect the boot messages:

$ docker logs cluster-node1
systemd 219 running in system mode.
Detected virtualization docker.
Detected architecture x86-64.

Welcome to CentOS Linux 7 (Core)!

Set hostname to <1665288855f6>.
Initializing machine ID from random generator.
Failed to install release agent, ignoring: File exists
[  OK  ] Created slice Root Slice.
[  OK  ] Created slice System Slice.
[  OK  ] Reached target Slices.
[  OK  ] Listening on Journal Socket.
[  OK  ] Reached target Local File Systems.
         Starting Create Volatile Files and Directories...
[  OK  ] Listening on Delayed Shutdown Socket.
[  OK  ] Reached target Swap.
[  OK  ] Reached target Paths.
         Starting Journal Service...
[  OK  ] Started Create Volatile Files and Directories.
[  OK  ] Started Journal Service.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timers.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting OpenSSH Server Key Generation...
         Starting Cleanup of Temporary Directories...
[  OK  ] Started Cleanup of Temporary Directories.
[  OK  ] Started OpenSSH Server Key Generation.
         Starting OpenSSH server daemon...
[  OK  ] Started OpenSSH server daemon.
[  OK  ] Reached target Multi-User System.

Run real VMs with Ignite

asciicast

FAQ

Is footloose just like LXD?

In principle yes, but it will also work with Docker container images and on MacOS as well.

Help

We are a very friendly community and love questions, help and feedback.

If you have any questions, feedback, or problems with footloose:

Weaveworks follows the CNCF Code of Conduct. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a Weaveworks project maintainer, or Alexis Richardson ([email protected]).

Your feedback is always welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].