File tree Expand file tree Collapse file tree 3 files changed +49
-0
lines changed Expand file tree Collapse file tree 3 files changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ version = 2
2
+
3
+ # Enable stargz snapshotter for CRI
4
+ [plugins ."io .containerd .grpc .v1 .cri" .containerd ]
5
+ snapshotter = " stargz"
6
+ disable_snapshot_annotations = false
7
+
8
+ # Plug stargz snapshotter into containerd
9
+ [proxy_plugins ]
10
+ [proxy_plugins .stargz ]
11
+ type = " snapshot"
12
+ address = " /run/containerd-stargz-grpc/containerd-stargz-grpc.sock"
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ ROOT="$( cd $DIR && cd .. && cd .. && pwd)"
27
27
SCRIPTS=$ROOT /scripts
28
28
29
29
SANDBOX=$1
30
+ USE_STARGZ=$2
30
31
31
32
if [ -z " $SANDBOX " ]; then
32
33
SANDBOX=" firecracker"
@@ -58,3 +59,10 @@ if [ "$SANDBOX" == "firecracker" ]; then
58
59
$SCRIPTS /create_devmapper.sh
59
60
fi
60
61
62
+ if [ -z " $USE_STARGZ " ]; then
63
+ USE_STARGZ=false
64
+ fi
65
+
66
+ if [ " $USE_STARGZ " = true]; then
67
+ $SCRIPTS /stargz/setup_stock_only_stargz.sh
68
+ fi
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
4
+ ROOT=" $( cd $DIR && cd .. && pwd) "
5
+ BINS=$ROOT /bin
6
+ CONFIGS=$ROOT /configs/stargz
7
+
8
+ # Get stargz snapshotter tar
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
+
11
+ # Copy stargz config
12
+ sudo cp $CONFIGS /config.toml /etc/containerd/
13
+
14
+ # Unzip stargz binary and install it
15
+ sudo tar -C /usr/local/bin -xvf stargz-snapshotter-v0.13.0-linux-amd64.tar.gz containerd-stargz-grpc ctr-remote
16
+
17
+ # Download stargz snapshotter service configuration file
18
+ sudo wget -O /etc/systemd/system/stargz-snapshotter.service https://raw.githubusercontent.com/containerd/stargz-snapshotter/main/script/config/etc/systemd/system/stargz-snapshotter.service
19
+
20
+ # Enable stargz snapshotter
21
+ sudo systemctl enable --now stargz-snapshotter
22
+
23
+ # Check if containerd process is running and stop if true
24
+ if sudo screen -list | grep " containerd" ; then
25
+ sudo screen -XS containerd quit
26
+ fi
27
+
28
+ # Start containerd
29
+ sudo screen -dmS containerd bash -c " containerd > >(tee -a /tmp/vhive-logs/containerd.stdout) 2> >(tee -a /tmp/vhive-logs/containerd.stderr >&2)"
You can’t perform that action at this time.
0 commit comments