|
| 1 | +# MIT License |
| 2 | +# |
| 3 | +# Copyright (c) 2020 Shyam Jesalpura and EASE lab |
| 4 | +# |
| 5 | +# Permission is hereby granted, free of charge, to any person obtaining a copy |
| 6 | +# of this software and associated documentation files (the "Software"), to deal |
| 7 | +# in the Software without restriction, including without limitation the rights |
| 8 | +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 9 | +# copies of the Software, and to permit persons to whom the Software is |
| 10 | +# furnished to do so, subject to the following conditions: |
| 11 | +# |
| 12 | +# The above copyright notice and this permission notice shall be included in all |
| 13 | +# copies or substantial portions of the Software. |
| 14 | +# |
| 15 | +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 18 | +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 | +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 20 | +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 21 | +# SOFTWARE. |
| 22 | + |
| 23 | +#!/bin/bash |
| 24 | + |
| 25 | +PWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
| 26 | +$PWD/install_go.sh |
| 27 | +$PWD/install_docker.sh |
| 28 | + |
| 29 | +cd $HOME |
| 30 | +git clone -b upf_master --recurse-submodules https://github.com/ease-lab/firecracker-containerd |
| 31 | +cd firecracker-containerd |
| 32 | +make all |
| 33 | + |
| 34 | +# copy binaries binaries to vhive/bin |
| 35 | +# cp runtime/containerd-shim-aws-firecracker $PWD/../bin/ |
| 36 | +# cp firecracker-control/cmd/containerd/firecracker-containerd $PWD/../bin/ |
| 37 | +# cp firecracker-control/cmd/containerd/firecracker-ctr $PWD/../bin/ |
| 38 | + |
| 39 | +cd _submodules/firecracker/ |
| 40 | +tools/devtool build --release |
| 41 | + |
| 42 | +# copy binaries binaries to vhive/bin |
| 43 | +# cp build/cargo_target/x86_64-unknown-linux-musl/release/firecracker $PWD/../bin/ |
| 44 | +# cp build/cargo_target/x86_64-unknown-linux-musl/release/jailer $PWD/../bin/ |
| 45 | + |
| 46 | +# install knative dependencies |
| 47 | +sudo apt install -y git |
| 48 | + |
| 49 | +VERSION=0.8.1 # choose the latest version |
| 50 | +OS=Linux # or Darwin |
| 51 | +ARCH=x86_64 # or arm64, i386, s390x |
| 52 | +curl -L https://github.com/google/ko/releases/download/v${VERSION}/ko_${VERSION}_${OS}_${ARCH}.tar.gz | tar xzf - ko |
| 53 | +chmod +x ./ko |
| 54 | +mv ko /usr/bin/ |
| 55 | + |
| 56 | +wget -c https://github.com/google/protobuf/releases/download/v3.11.4/protoc-3.11.4-linux-x86_64.zip |
| 57 | +sudo unzip protoc-3.11.4-linux-x86_64.zip -d /usr/local |
| 58 | + |
| 59 | +export GOROOT=$(go env GOROOT) |
| 60 | +go get github.com/gogo/protobuf/protoc-gen-gogofaster |
| 61 | + |
| 62 | +#build knative |
| 63 | +git clone -b qp_guest_info https://github.com/ease-lab/serving |
| 64 | +$PWD/serving/hack/generate-yamls.sh $PWD/serving/ $PWD/serving/new-yamls.txt |
0 commit comments