Skip to content

Commit 2ba9b90

Browse files
committed
add script to buid fc, fccd and knative
Signed-off-by: Shyam Jesal <[email protected]>
1 parent c8169b5 commit 2ba9b90

File tree

3 files changed

+112
-19
lines changed

3 files changed

+112
-19
lines changed

scripts/github_runner/setup_runner_host.sh

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,11 @@
2626
sudo apt-get update
2727

2828
sudo apt-get install -y \
29-
apt-transport-https \
30-
ca-certificates \
31-
curl \
32-
gnupg-agent \
33-
jq \
34-
software-properties-common >> /dev/null
35-
36-
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
37-
38-
sudo add-apt-repository \
39-
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
40-
$(lsb_release -cs) \
41-
stable"
42-
43-
sudo apt-get update
44-
sudo apt-get install --yes docker-ce docker-ce-cli containerd.io >> /dev/null
29+
jq >> /dev/null
4530

4631
PWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4732
$PWD/../install_go.sh
33+
$PWD/../install_docker.sh
4834

4935
# install kind from ease-lab/kind
5036
rm -rf /tmp/kind/
@@ -53,9 +39,6 @@ cd /tmp/kind
5339
source /etc/profile && go build
5440
sudo mv kind /usr/local/bin/
5541

56-
sudo usermod -aG docker $USER
57-
newgrp docker
58-
5942
# Allow profiling using Perf / PMU tools
6043
sudo sysctl -w kernel.perf_event_paranoid=-1
6144

scripts/install_docker.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
sudo apt-get install -y \
25+
apt-transport-https \
26+
ca-certificates \
27+
curl \
28+
gnupg-agent \
29+
software-properties-common >> /dev/null
30+
31+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
32+
33+
sudo add-apt-repository \
34+
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
35+
$(lsb_release -cs) \
36+
stable"
37+
38+
sudo apt-get update && sudo apt-get install --yes docker-ce docker-ce-cli containerd.io
39+
40+
sudo usermod -aG docker $USER

scripts/rebuild_deps.sh

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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+
if [ -z $1 ] || [ -z $2 ]; then
26+
echo "Parameters missing"
27+
echo "USAGE: rebuild_deps.sh <fccd git branch> <Knative serving branch>"
28+
exit -1
29+
fi
30+
FCCD_BRANCH=$1
31+
KNATIVE_BRANCH=$2
32+
33+
set -x
34+
PWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
35+
$PWD/install_go.sh
36+
$PWD/install_docker.sh
37+
sudo apt install -y git
38+
39+
cd $HOME
40+
git clone -b $FCCD_BRANCH --recurse-submodules https://github.com/ease-lab/firecracker-containerd
41+
cd firecracker-containerd
42+
make image
43+
make firecracker
44+
make all
45+
46+
# copy binaries to vhive/bin
47+
# cp runtime/containerd-shim-aws-firecracker $PWD/../bin/
48+
# cp firecracker-control/cmd/containerd/firecracker-containerd $PWD/../bin/
49+
# cp firecracker-control/cmd/containerd/firecracker-ctr $PWD/../bin/
50+
51+
# cp _submodules/firecracker/build/cargo_target/x86_64-unknown-linux-musl/release/firecracker $PWD/../bin/
52+
# cp _submodules/firecracker/build/cargo_target/x86_64-unknown-linux-musl/release/jailer $PWD/../bin/
53+
54+
# install knative dependencies
55+
VERSION=0.8.1 # choose the latest version
56+
OS=Linux # or Darwin
57+
ARCH=x86_64 # or arm64, i386, s390x
58+
curl -L https://github.com/google/ko/releases/download/v${VERSION}/ko_${VERSION}_${OS}_${ARCH}.tar.gz | tar xzf - ko
59+
chmod +x ./ko
60+
sudo mv ko /usr/bin/
61+
62+
wget -c https://github.com/google/protobuf/releases/download/v3.11.4/protoc-3.11.4-linux-x86_64.zip
63+
sudo unzip protoc-3.11.4-linux-x86_64.zip -d /usr/local
64+
65+
export GOROOT=$(go env GOROOT)
66+
go get github.com/gogo/protobuf/protoc-gen-gogofaster
67+
68+
#build knative
69+
git clone -b $KNATIVE_BRANCH https://github.com/ease-lab/serving
70+
$PWD/serving/hack/generate-yamls.sh $PWD/serving/ $PWD/serving/new-yamls.txt

0 commit comments

Comments
 (0)