-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8fd6383
commit f453f1f
Showing
56 changed files
with
7,902 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.img | ||
firecracker | ||
firecracker-* | ||
vmlinux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"). You may | ||
not use this file except in compliance with the License. A copy of the | ||
License is located at | ||
|
||
http://aws.amazon.com/apache2.0/ | ||
|
||
or in the "license" file accompanying this file. This file is distributed | ||
on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
express or implied. See the License for the specific language governing | ||
permissions and limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Developing for this project | ||
==== | ||
|
||
Testing | ||
--- | ||
|
||
Tests are written using Go's testing framework and can be run with the standard | ||
`go test` tool. If you prefer to use the Makefile, `make test EXTRAGOARGS=-v` | ||
will run tests in verbose mode. | ||
|
||
You need some external resources in order to run the tests, as described below: | ||
|
||
1. A firecracker binary (tested with 0.10.1), but any recent version should | ||
work. Must either be installed as `./firecracker` or the path must be | ||
specified through the `FC_TEST_BIN` environment variable. | ||
2. Access to hardware virtualization via `/dev/kvm` (ensure you have mode | ||
`+rw`!) | ||
3. An uncompressed Linux kernel binary that can boot in Firecracker VM (Must be | ||
installed as `./vmlinux`) | ||
4. A tap device owned by your userid (Must be either named `fc-test-tap0` or | ||
have the name specified with the `FC_TEST_TAP` environment variable; try | ||
`sudo ip tuntap add fc-test-tap0 mode tap user $UID` to create `fc-test-tap0` | ||
if you need to create one) | ||
5. A root filesystem image installed (Must be named `root-drive.img`; can be | ||
empty, create it something like | ||
`dd if=/dev/zero of=drive-2.img bs=1k count=102400`) | ||
|
||
With all of those set up, `make test EXTRAGOARGS=-v` should create a Firecracker | ||
process and run the Linux kernel in a MicroVM. | ||
|
||
Regenerating the API client | ||
--- | ||
|
||
The API client can be generated using the | ||
[Go swagger implementation](https://goswagger.io/). To do so, perform the | ||
following: | ||
|
||
1. Update `client/swagger.yaml` | ||
3. Run `go generate` | ||
4. Figure out what broke and fix it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). You may | ||
# not use this file except in compliance with the License. A copy of the | ||
# License is located at | ||
# | ||
# http://aws.amazon.com/apache2.0/ | ||
# | ||
# or in the "license" file accompanying this file. This file is distributed | ||
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
# express or implied. See the License for the specific language governing | ||
# permissions and limitations under the License. | ||
|
||
SUBDIRS:=cmd/firectl | ||
|
||
# Set this to pass additional commandline flags to the go compiler, e.g. "make test EXTRAGOARGS=-v" | ||
EXTRAGOARGS:= | ||
|
||
all: build | ||
|
||
build clean test: | ||
go $@ $(EXTRAGOARGS) | ||
for d in $(SUBDIRS); do \ | ||
cd $$d && go $@ $(EXTRAGOARGS); \ | ||
done | ||
|
||
.PHONY: all clean build test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
TODO | ||
=== | ||
|
||
Features | ||
--- | ||
|
||
There's currently no support for specifying rate limits for network or block device access. | ||
|
||
Better integration with CNI could be nice. Currently, the network namespace should be created ahead of time by and, and the CNI plugins should be run within it to configure the network. Then the firecracker process (`cmd/firectl/firectl` or whatever process is calling the library) can join that namespace and attach to the appropriate TAP device. At least some of this workflow should be integrated into the library. | ||
|
||
Integration with the `jailer` | ||
|
||
The tests rely on a bunch of hardcoded information and priviledged access. This should be fixed. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.