File tree Expand file tree Collapse file tree 4 files changed +78
-4
lines changed
configs/knative_workloads Expand file tree Collapse file tree 4 files changed +78
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : vHive stock-only stargz tests
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+ paths-ignore :
7
+ - ' docs/**'
8
+ - ' **.md'
9
+ - ' function-images/**'
10
+ pull_request :
11
+ branches : [ main ]
12
+ paths-ignore :
13
+ - ' docs/**'
14
+ - ' **.md'
15
+ - ' function-images/**'
16
+ workflow_dispatch :
17
+
18
+ env :
19
+ GOOS : linux
20
+ GO111MODULE : on
21
+
22
+ jobs :
23
+ stargz-container-test :
24
+ name : Test running stargz-based image using kn
25
+ runs-on : ubuntu-20.04
26
+ steps :
27
+
28
+ - name : Set up Go 1.18
29
+ uses : actions/setup-go@v3
30
+ with :
31
+ go-version : 1.18
32
+
33
+ - name : Check out code into the Go module directory
34
+ uses : actions/checkout@v3
35
+
36
+ - name : Setup stock-only node
37
+ run : sudo ./scripts/cloudlab/setup_node.sh stock-only use-stargz
38
+
39
+ - name : Check containerd service is running
40
+ run : sudo screen -list | grep "containerd"
41
+
42
+ - name : Check stargz-snapshotter is running
43
+ run : sudo systemctl is-active --quiet stargz-snapshotter
44
+
45
+ - name : Setup single-node cluster
46
+ run : sudo ./scripts/cluster/create_one_node_cluster.sh stock-only
47
+
48
+ - name : Run test container with kn
49
+ run : sudo kn service apply stargz-test -f ./configs/knative_workloads/stargz-node.yaml --concurrency-target 1
50
+
51
+ - name : Curl container
52
+ run : curl http://stargz-test.default.192.168.1.240.sslip.io | grep "Hello World"
53
+
Original file line number Diff line number Diff line change
1
+ apiVersion : serving.knative.dev/v1
2
+ kind : Pod
3
+ metadata :
4
+ name : stargz-test
5
+ spec :
6
+ template :
7
+ spec :
8
+ containers :
9
+ - name : nodejs-stargz
10
+ image : ghcr.io/stargz-containers/node:17.8.0-esgz
11
+ command : ["node"]
12
+ args :
13
+ - -e
14
+ - var http = require('http');
15
+ http.createServer(function(req, res) {
16
+ res.writeHead(200);
17
+ res.end('Hello World!\n');
18
+ }).listen(80);
19
+ ports :
20
+ - containerPort : 80
Original file line number Diff line number Diff line change @@ -60,9 +60,9 @@ if [ "$SANDBOX" == "firecracker" ]; then
60
60
fi
61
61
62
62
if [ -z " $USE_STARGZ " ]; then
63
- USE_STARGZ=false
63
+ USE_STARGZ=" no-stargz "
64
64
fi
65
65
66
- if [ " $USE_STARGZ " = true ]; then
66
+ if [ " $USE_STARGZ " == " use-stargz " ]; then
67
67
$SCRIPTS /stargz/setup_stock_only_stargz.sh
68
68
fi
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
4
- ROOT=" $( cd $DIR && cd .. && pwd) "
4
+ ROOT=" $( cd $DIR && cd ../.. && pwd) "
5
5
BINS=$ROOT /bin
6
6
CONFIGS=$ROOT /configs/stargz
7
7
8
8
# Get stargz snapshotter tar
9
9
wget --continue --quiet https://github.com/containerd/stargz-snapshotter/releases/download/v0.13.0/stargz-snapshotter-v0.13.0-linux-amd64.tar.gz
10
10
11
11
# Copy stargz config
12
- sudo cp $CONFIGS /config.toml /etc/containerd/
12
+ sudo mkdir -p /etc/containerd
13
+ sudo cp $CONFIGS /config.toml /etc/containerd/config.toml
13
14
14
15
# Unzip stargz binary and install it
15
16
sudo tar -C /usr/local/bin -xvf stargz-snapshotter-v0.13.0-linux-amd64.tar.gz containerd-stargz-grpc ctr-remote
You can’t perform that action at this time.
0 commit comments