Skip to content

Commit 119ed7f

Browse files
DavidBuzatu-Marianustiugov
authored andcommitted
Added scipt and configuration files for eStargz support in stock only
Fixed inverted condition in setup scripts Signed-off-by: davidbuzatu-marian <[email protected]>
1 parent 2afae14 commit 119ed7f

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

configs/stargz/config.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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"

scripts/cloudlab/setup_node.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ ROOT="$( cd $DIR && cd .. && cd .. && pwd)"
2727
SCRIPTS=$ROOT/scripts
2828

2929
SANDBOX=$1
30+
USE_STARGZ=$2
3031

3132
if [ -z "$SANDBOX" ]; then
3233
SANDBOX="firecracker"
@@ -58,3 +59,10 @@ if [ "$SANDBOX" == "firecracker" ]; then
5859
$SCRIPTS/create_devmapper.sh
5960
fi
6061

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
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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)"

0 commit comments

Comments
 (0)