Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.0 #99

Merged
merged 8 commits into from
Jan 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ name: vHive build tests
on:
push:
branches: [ master ]
paths-ignore:
- 'docs/**'
- '**.md'
pull_request:
branches: [ master ]
paths-ignore:
- 'docs/**'
- '**.md'
workflow_dispatch:

env:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ name: vHive integration tests
on:
push:
branches: [ master ]
paths-ignore:
- 'docs/**'
- '**.md'
pull_request:
branches: [ master ]
paths-ignore:
- 'docs/**'
- '**.md'
workflow_dispatch:

env:
Expand Down Expand Up @@ -39,4 +45,4 @@ jobs:

- name: Cleaning
if: ${{ always() }}
run: ./scripts/clean_fcctr.sh
run: ./scripts/clean_fcctr.sh
2 changes: 1 addition & 1 deletion .github/workflows/nightly_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
jobs:
integration-tests:
name: Test all functions
runs-on: self-hosted
runs-on: [self-hosted, nightly]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ name: vHive unit tests
on:
push:
branches: [ master ]
paths-ignore:
- 'docs/**'
- '**.md'
pull_request:
branches: [ master ]
paths-ignore:
- 'docs/**'
- '**.md'
workflow_dispatch:

env:
Expand Down Expand Up @@ -61,4 +67,4 @@ jobs:
- name: Cleaning
if: ${{ always() }}
run: ./scripts/clean_fcctr.sh


2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Travis testing is deprecated as vHive moved to Github Actions for testing

dist: bionic
language: go

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
SUBDIRS:=ctriface taps misc
EXTRAGOARGS:=-v -race -cover
EXTRAGOARGS_NORACE:=-v
EXTRATESTFILES:=fccd-orchestrator_test.go stats.go fccd-orchestrator.go functions.go
EXTRATESTFILES:=vhive_test.go stats.go vhive.go functions.go
WITHUPF:=-upfTest
WITHLAZY:=-lazyTest
WITHSNAPSHOTS:=-snapshotsTest
Expand Down Expand Up @@ -135,7 +135,7 @@ test-subdirs: $(SUBDIRS)
test-cri:
$(MAKE) -C cri test

test-cri-travis:
test-cri-travis: # Testing in travis is deprecated
$(MAKE) -C cri test-travis

.PHONY: test-orch $(SUBDIRS) test-subdirs
38 changes: 32 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,50 +16,76 @@ Function-as-a-Service (FaaS) providers, integrating the same production-grade co
Cloud Native Computing Foundation's [Containerd](https://containerd.io/),
and [Kubernetes](https://kubernetes.io/).

vHive adopts [Knative's]() flexible programming model, allowing the researchers to quickly deploy
vHive adopts the [Knative](https://knative.dev/) flexible programming model, allowing the researchers to quickly deploy
and experiment with *any* serverless applications that may comprise many functions,
running in secure Firecracker microVMs, as well as serverfull services.
Both the functions and the stateful services can be deployed using OCI/Docker images.

vHive empowers systems researchers to innovate on key serverless features,
including functions autoscaling and cold-start delay optimization with several snapshotting mechanisms.


## vHive architecture

![vHive Architecture](docs/figures/vhive_architecture.jpg)

The details of the vHive architecture can be found in our
[ASPLOS'21 paper](https://asplos-conference.org/abstracts/asplos21-paper212-extended_abstract.pdf).


## Referencing our work

If you decide to use vHive for your research and experiments, we are thrilled to support you by offering
advice for potential extensions of vHive and always open for collaboration.

Please cite our paper that has been recently accepted to ASPLOS 2021, available by [TBD]().
Please cite our paper that has been recently accepted to ASPLOS 2021:
```
@inproceedings{ustiugov:benchmarking,
author = {Dmitrii Ustiugov and
Plamen Petrov and
Marios Kogias and
Edouard Bugnion and
Boris Grot},
title = {Benchmarking, Analysis, and Optimization of Serverless Function Snapshots},
booktitle = {Proceedings of the 26th ACM International Conference on
Architectural Support for Programming Languages and Operating Systems (ASPLOS'21)},
publisher = {{ACM}},
year = {2021},
doi = {10.1145/3445814.3446714},
}
```


## Getting started with vHive

vHive can be readily deployed on premises or in cloud, with support for nested virtualization.
We provide [a quick-start guide](https://github.com/ease-lab/vhive/wiki/Getting-started-with-vHive-(on-CloudLab))
that describes how to set up an experiment on CloudLab however we anticipate no issue for other settings.
We provide [a quick-start guide](docs/quickstart_guide.md)
that describes how to set up an experiment with vHive.


## Developing vHive

### vHive roadmap

vHive is a community-led project, maintained by EASE lab.
The current roadmap is [available](https://github.com/ease-lab/vhive/projects/1)
and is going to be updated to accommodate the community's goals and evolution.

### Getting help and contributing

We would be happy to answer any questions in GitHub Issues and encourage the open-source community
to submit new Issues, assist in addressing existing issues and limitations, and contribute their code with Pull Requests.

To guarantee high code quality and reliability, we deploy fully automated CI
on cloud and self-hosted runners with GitHub Actions (upon commits and PRs) and Travis CI (nightly testing).
on cloud and self-hosted runners with GitHub Actions.


### License and copyright

vHive is free. We publish the code under the terms of the MIT License that allows distribution, modification, and commercial use.
This software, however, comes without any warranty or liability.

The software is developed at the [EASE lab](https://easelab.inf.ed.ac.uk/) in the University of Edinburgh.
The software is maintained at the [EASE lab](https://easelab.inf.ed.ac.uk/) in the University of Edinburgh.


### Maintainers
Expand Down
26 changes: 13 additions & 13 deletions bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,19 +354,19 @@ func getOutFile(name string) string {

func getAllImages() map[string]string {
return map[string]string{
"helloworld": "ustiugov/helloworld:var_workload",
"chameleon": "ustiugov/chameleon:var_workload",
"pyaes": "ustiugov/pyaes:var_workload",
"image_rotate": "ustiugov/image_rotate:var_workload",
"image_rotate_s3": "ustiugov/image_rotate_s3:var_workload",
"json_serdes": "ustiugov/json_serdes:var_workload",
"json_serdes_s3": "ustiugov/json_serdes_s3:var_workload",
"lr_serving": "ustiugov/lr_serving:var_workload",
"cnn_serving": "ustiugov/cnn_serving:var_workload",
"rnn_serving": "ustiugov/rnn_serving:var_workload",
"lr_training_s3": "ustiugov/lr_training_s3:var_workload",
"lr_training": "ustiugov/lr_training:var_workload",
"video_processing_s3": "ustiugov/video_processing_s3:var_workload",
"helloworld": "vhiveease/helloworld:var_workload",
"chameleon": "vhiveease/chameleon:var_workload",
"pyaes": "vhiveease/pyaes:var_workload",
"image_rotate": "vhiveease/image_rotate:var_workload",
"image_rotate_s3": "vhiveease/image_rotate_s3:var_workload",
"json_serdes": "vhiveease/json_serdes:var_workload",
"json_serdes_s3": "vhiveease/json_serdes_s3:var_workload",
"lr_serving": "vhiveease/lr_serving:var_workload",
"cnn_serving": "vhiveease/cnn_serving:var_workload",
"rnn_serving": "vhiveease/rnn_serving:var_workload",
"lr_training_s3": "vhiveease/lr_training_s3:var_workload",
"lr_training": "vhiveease/lr_training:var_workload",
"video_processing_s3": "vhiveease/video_processing_s3:var_workload",
}
}

Expand Down
2 changes: 1 addition & 1 deletion configs/knative_workloads/helloworld.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ spec:
- name: GUEST_PORT # Port on which the firecracker-containerd container is accepting requests
value: "50051"
- name: GUEST_IMAGE # Container image to use for firecracker-containerd container
value: "ustiugov/helloworld:var_workload"
value: "vhiveease/helloworld:var_workload"
2 changes: 1 addition & 1 deletion configs/knative_workloads/helloworldSerial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ spec:
- name: GUEST_PORT # Port on which the firecracker-containerd container is accepting requests
value: "50051"
- name: GUEST_IMAGE # Container image to use for firecracker-containerd container
value: "ustiugov/helloworld:var_workload"
value: "vhiveease/helloworld:var_workload"
2 changes: 1 addition & 1 deletion configs/knative_workloads/pyaes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ spec:
- name: GUEST_PORT # Port on which the firecracker-containerd container is accepting requests
value: "50051"
- name: GUEST_IMAGE # Container image to use for firecracker-containerd container
value: "ustiugov/pyaes:var_workload"
value: "vhiveease/pyaes:var_workload"
2 changes: 1 addition & 1 deletion configs/knative_workloads/rnn_serving.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ spec:
- name: GUEST_PORT # Port on which the firecracker-containerd container is accepting requests
value: "50051"
- name: GUEST_IMAGE # Container image to use for firecracker-containerd container
value: "ustiugov/rnn_serving:var_workload"
value: "vhiveease/rnn_serving:var_workload"
18 changes: 9 additions & 9 deletions ctriface/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ func getOutFile(name string) string {

func getAllImages() map[string]string {
return map[string]string{
"helloworld": "ustiugov/helloworld:var_workload",
"chameleon": "ustiugov/chameleon:var_workload",
"pyaes": "ustiugov/pyaes:var_workload",
"image_rotate": "ustiugov/image_rotate:var_workload",
"json_serdes": "ustiugov/json_serdes:var_workload",
"lr_serving": "ustiugov/lr_serving:var_workload",
"cnn_serving": "ustiugov/cnn_serving:var_workload",
"rnn_serving": "ustiugov/rnn_serving:var_workload",
"lr_training": "ustiugov/lr_training:var_workload",
"helloworld": "vhiveease/helloworld:var_workload",
"chameleon": "vhiveease/chameleon:var_workload",
"pyaes": "vhiveease/pyaes:var_workload",
"image_rotate": "vhiveease/image_rotate:var_workload",
"json_serdes": "vhiveease/json_serdes:var_workload",
"lr_serving": "vhiveease/lr_serving:var_workload",
"cnn_serving": "vhiveease/cnn_serving:var_workload",
"rnn_serving": "vhiveease/rnn_serving:var_workload",
"lr_training": "vhiveease/lr_training:var_workload",
}
}
2 changes: 1 addition & 1 deletion ctriface/failing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestStartSnapStop(t *testing.T) {

vmID := "2"

_, _, err := orch.StartVM(ctx, vmID, "ustiugov/helloworld:runner_workload")
_, _, err := orch.StartVM(ctx, vmID, testImageName)
require.NoError(t, err, "Failed to start VM")

err = orch.PauseVM(ctx, vmID)
Expand Down
3 changes: 3 additions & 0 deletions ctriface/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
Expand Down Expand Up @@ -270,6 +271,7 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI=
Expand Down Expand Up @@ -438,6 +440,7 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
Expand Down
4 changes: 4 additions & 0 deletions ctriface/iface.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ type StartVMResponse struct {
GuestIP string
}

const (
testImageName = "vhiveease/helloworld:var_workload"
)

// StartVM Boots a VM if it does not exist
func (o *Orchestrator) StartVM(ctx context.Context, vmID, imageName string) (_ *StartVMResponse, _ *metrics.Metric, retErr error) {
var (
Expand Down
22 changes: 9 additions & 13 deletions ctriface/iface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func TestPauseSnapResume(t *testing.T) {

vmID := "4"

_, _, err := orch.StartVM(ctx, vmID, "ustiugov/helloworld:runner_workload")
_, _, err := orch.StartVM(ctx, vmID, testImageName)
require.NoError(t, err, "Failed to start VM")

err = orch.PauseVM(ctx, vmID)
Expand Down Expand Up @@ -109,7 +109,7 @@ func TestStartStopSerial(t *testing.T) {

vmID := "5"

_, _, err := orch.StartVM(ctx, vmID, "ustiugov/helloworld:runner_workload")
_, _, err := orch.StartVM(ctx, vmID, testImageName)
require.NoError(t, err, "Failed to start VM")

err = orch.StopSingleVM(ctx, vmID)
Expand Down Expand Up @@ -142,7 +142,7 @@ func TestPauseResumeSerial(t *testing.T) {

vmID := "6"

_, _, err := orch.StartVM(ctx, vmID, "ustiugov/helloworld:runner_workload")
_, _, err := orch.StartVM(ctx, vmID, testImageName)
require.NoError(t, err, "Failed to start VM")

err = orch.PauseVM(ctx, vmID)
Expand Down Expand Up @@ -180,11 +180,9 @@ func TestStartStopParallel(t *testing.T) {
WithLazyMode(*isLazyMode),
)

imageName := "ustiugov/helloworld:runner_workload"

// Pull image
_, err := orch.getImage(ctx, imageName)
require.NoError(t, err, "Failed to pull image "+imageName)
_, err := orch.getImage(ctx, testImageName)
require.NoError(t, err, "Failed to pull image "+testImageName)

{
var vmGroup sync.WaitGroup
Expand All @@ -193,7 +191,7 @@ func TestStartStopParallel(t *testing.T) {
go func(i int) {
defer vmGroup.Done()
vmID := fmt.Sprintf("%d", i)
_, _, err := orch.StartVM(ctx, vmID, imageName)
_, _, err := orch.StartVM(ctx, vmID, testImageName)
require.NoError(t, err, "Failed to start VM "+vmID)
}(i)
}
Expand Down Expand Up @@ -240,11 +238,9 @@ func TestPauseResumeParallel(t *testing.T) {
WithLazyMode(*isLazyMode),
)

imageName := "ustiugov/helloworld:runner_workload"

// Pull image
_, err := orch.getImage(ctx, imageName)
require.NoError(t, err, "Failed to pull image "+imageName)
_, err := orch.getImage(ctx, testImageName)
require.NoError(t, err, "Failed to pull image "+testImageName)

{
var vmGroup sync.WaitGroup
Expand All @@ -253,7 +249,7 @@ func TestPauseResumeParallel(t *testing.T) {
go func(i int) {
defer vmGroup.Done()
vmID := fmt.Sprintf("%d", i)
_, _, err := orch.StartVM(ctx, vmID, imageName)
_, _, err := orch.StartVM(ctx, vmID, testImageName)
require.NoError(t, err, "Failed to start VM")
}(i)
}
Expand Down
Loading