Skip to content

Commit

Permalink
code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
w3ichen committed May 25, 2023
1 parent c28bc05 commit ad7228c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
firectl
===
# firectl

[![Build status](https://badge.buildkite.com/92fe02b4bd9564be0f7ea21d1ee782f6a6fe55cbd5465e3480.svg?branch=master)](https://buildkite.com/firecracker-microvm/firectl)

Expand All @@ -8,20 +7,26 @@ 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
---
## Installation

```bash
wget https://raw.githubusercontent.com/MecSimCalc/firectl/main/install.sh # Download install script
chmod +x install.sh # Make executable
sudo ./install.sh # Run install script
```

## Building

The default Makefile rule executes `go build` and relies on the Go toolchain
installed on your computer.
_We use [go modules](https://github.com/golang/go/wiki/Modules), and building
requires Go 1.14 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
build-in-docker`. This rule creates a temporary Docker container which builds
and copies the binary to your current directory.

Usage
---
## Usage

You'll need to have a
[firecracker](https://github.com/firecracker-microvm/firecracker) build, as well
Expand Down Expand Up @@ -59,8 +64,7 @@ Help Options:
-h, --help Show this help message
```

Example
---
## Example

```
firectl \
Expand All @@ -73,8 +77,7 @@ firectl \
--metadata='{"foo":"bar"}'
```

Getting Started on AWS
---
## Getting Started on AWS

- Create an `m5d.metal` instance using Amazon Linux 2
- Get firectl binary:
Expand Down Expand Up @@ -115,17 +118,16 @@ Getting Started on AWS
--root-drive=hello-rootfs.ext4
```

Testing
---
## 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?
---
## Questions?

Please use
[GitHub issues](https://github.com/firecracker-microvm/firectl/issues)
Expand Down
2 changes: 2 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ cd ./release-${FIRECRACKER_VERSION}-${ARCH}
sudo cp firecracker-${FIRECRACKER_VERSION}-${ARCH} /usr/local/bin/firecracker
sudo cp jailer-${FIRECRACKER_VERSION}-${ARCH} /usr/local/bin/jailer

cd ~

# Give read/write access to KVM:
sudo apt-get install acl
sudo setfacl -m u:${USER}:rw /dev/kvm
Expand Down

0 comments on commit ad7228c

Please sign in to comment.