All Projects → firecracker-microvm → Firectl

firecracker-microvm / Firectl

Licence: apache-2.0
firectl is a command-line tool to run Firecracker microVMs

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Firectl

Cognitocurl
🦉🤖Easily sign curl calls to API Gateway with Cognito authorization token.
Stars: ✭ 76 (-60.42%)
Mutual labels:  aws, cli
Zip It And Ship It
Intelligently prepare Node.js Lambda functions for deployment
Stars: ✭ 104 (-45.83%)
Mutual labels:  aws, cli
Batchit
simple jobs submission via command-line for AWS batch
Stars: ✭ 77 (-59.9%)
Mutual labels:  aws, cli
Awless Templates
Repository of examples for awless templates (see https://github.com/wallix/awless)
Stars: ✭ 59 (-69.27%)
Mutual labels:  aws, cli
Aq
Query AWS resources with SQL
Stars: ✭ 190 (-1.04%)
Mutual labels:  aws, cli
Cloud Portal
Self service web portal for different Cloud platforms like Azure, AWS and VMWare vSphere.
Stars: ✭ 60 (-68.75%)
Mutual labels:  aws, virtual-machine
Aws Cli Cheatsheet
☁️ AWS CLI + JQ = Make life easier
Stars: ✭ 94 (-51.04%)
Mutual labels:  aws, cli
Ecsctl
Command-line tool for managing AWS Elastic Container Service and Projects to run on it.
Stars: ✭ 15 (-92.19%)
Mutual labels:  aws, cli
Aws Nuke
Nuke a whole AWS account and delete all its resources.
Stars: ✭ 2,333 (+1115.1%)
Mutual labels:  aws, cli
Dynein
DynamoDB CLI written in Rust.
Stars: ✭ 126 (-34.37%)
Mutual labels:  aws, cli
Saw
Fast, multi-purpose tool for AWS CloudWatch Logs
Stars: ✭ 1,071 (+457.81%)
Mutual labels:  aws, cli
Image Bootstrap
⛅️ Creates (chroots and) bootable virtual machine images; command line tool (Python 3)
Stars: ✭ 178 (-7.29%)
Mutual labels:  cli, virtual-machine
Aegea
Amazon Web Services Operator Interface
Stars: ✭ 51 (-73.44%)
Mutual labels:  aws, cli
The forge
Our groundbreaking, lightning fast PWA CLI tool
Stars: ✭ 70 (-63.54%)
Mutual labels:  aws, cli
Terraform Nextjs Plugin
A plugin to generate terraform configuration for Nextjs 8 and 9
Stars: ✭ 41 (-78.65%)
Mutual labels:  aws, cli
Torchlambda
Lightweight tool to deploy PyTorch models to AWS Lambda
Stars: ✭ 83 (-56.77%)
Mutual labels:  aws, cli
Lambdalogs
A CLI tool to trace AWS Lambda calls over multiple CloudWatch log groups.
Stars: ✭ 18 (-90.62%)
Mutual labels:  aws, cli
Jungle
AWS operations by cli should be simpler
Stars: ✭ 842 (+338.54%)
Mutual labels:  aws, cli
Linchpin
ansible based multicloud orchestrator
Stars: ✭ 107 (-44.27%)
Mutual labels:  aws, cli
Aws Cost Saver
A tiny CLI tool to help save costs in development environments when you're asleep and don't need them!
Stars: ✭ 178 (-7.29%)
Mutual labels:  aws, cli

firectl

Build status

Firectl is a basic command-line tool that lets you run arbitrary Firecracker MicroVMs via the command line. This lets you run a fully functional Firecracker MicroVM, including console access, read/write access to filesystems, and network connectivity.

Building

The default Makefile rule executes go build and relies on the Go toolchain installed on your computer. We use go modules, so you need to build with Go 1.11 or newer.

If you do not have a new-enough Go toolchain installed, you can use make build-in-docker. This rule creates a temporary Docker container which builds and copies the binary to your current directory.

Usage

You'll need to have a firecracker build, as well as an uncompressed Linux kernel image (vmlinux) and root filesystem image.

By default, firectl searches PATH for the firecracker binary. The location of the kernel and filesystem image must be provided explicitly.

Usage:
  firectl [OPTIONS]

Application Options:
      --firecracker-binary=     Path to firecracker binary
      --kernel=                 Path to the kernel image (default: ./vmlinux)
      --kernel-opts=            Kernel commandline (default: ro console=ttyS0 noapic reboot=k panic=1 pci=off nomodules)
      --root-drive=             Path to root disk image
      --root-partition=         Root partition UUID
      --add-drive=              Path to additional drive, suffixed with :ro or :rw, can be specified multiple times
      --tap-device=             NIC info, specified as DEVICE/MAC
      --vsock-device=           Vsock interface, specified as PATH:CID. Multiple OK
      --vmm-log-fifo=           FIFO for firecracker logs
      --log-level=              vmm log level (default: Debug)
      --metrics-fifo=           FIFO for firecracker metrics
  -t, --disable-hyperthreading  Disable CPU Hyperthreading
  -c, --ncpus=                  Number of CPUs (default: 1)
      --cpu-template=           Firecracker CPU Template (C3 or T2)
  -m, --memory=                 VM memory, in MiB (default: 512)
      --metadata=               Firecracker Metadata for MMDS (json)
  -l, --firecracker-log=        pipes the fifo contents to the specified file
  -s, --socket-path=            path to use for firecracker socket, defaults to a unique file in in the first existing directory from {$HOME, $TMPDIR, or /tmp}
  -d, --debug                   Enable debug output

Help Options:
  -h, --help                    Show this help message

Example

firectl \
  --kernel=~/bin/vmlinux \
  --root-drive=/images/image-debootstrap.img -t \
  --cpu-template=T2 \
  --firecracker-log=~/firecracker-vmm.log \
  --kernel-opts="console=ttyS0 noapic reboot=k panic=1 pci=off nomodules rw" \
  --vsock-device=root:3 \
  --metadata='{"foo":"bar"}'

Getting Started on AWS

  • Create an m5d.metal instance using Amazon Linux 2

  • Get firectl binary:

    curl -Lo firectl https://firectl-release.s3.amazonaws.com/firectl-v0.1.0
    curl -Lo firectl.sha256 https://firectl-release.s3.amazonaws.com/firectl-v0.1.0.sha256
    sha256sum -c firectl.sha256
    chmod +x firectl
    
  • Get Firecracker binary:

    curl -Lo firecracker https://github.com/firecracker-microvm/firecracker/releases/download/v0.16.0/firecracker-v0.16.0
    chmod +x firecracker
    sudo mv firecracker /usr/local/bin/firecracker
    
  • Give read/write access to KVM:

    sudo setfacl -m u:${USER}:rw /dev/kvm
    
  • Download kernel and root filesystem:

    curl -fsSL -o hello-vmlinux.bin https://s3.amazonaws.com/spec.ccfc.min/img/hello/kernel/hello-vmlinux.bin
    curl -fsSL -o hello-rootfs.ext4 https://s3.amazonaws.com/spec.ccfc.min/img/hello/fsfiles/hello-rootfs.ext4
    
  • Create microVM:

    ./firectl \
      --kernel=hello-vmlinux.bin \
      --root-drive=hello-rootfs.ext4
    

Testing

By default the tests require the firectl binary to be built and a kernel image to be present. The integration tests look for the binary and kernel image in the root directory. By default it will look for vmlinux kernel image. This can be overwritten by setting the environment variable KERNELIMAGE to the desired path. To disable these tests simply set the environment variable SKIP_INTEG_TEST=1.

Questions?

Please use GitHub issues to report problems, discuss roadmap items, or make feature requests.

If you've discovered an issue that may have security implications to users or developers of this software, please do not report it using GitHub issues, but instead follow Firecracker's security reporting guidelines.

Other discussion: For general discussion, please join us in the #general channel on the Firecracker Slack.

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].