Last active
October 25, 2017 00:39
-
-
Save dmcgowan/66ded5c6acd9ccd03bb46e5ed1bbf44f to your computer and use it in GitHub Desktop.
Containerd stress run script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=containerd container runtime | |
Documentation=https://containerd.io | |
After=network.target | |
[Service] | |
ExecStartPre=/sbin/modprobe overlay | |
ExecStart=/usr/local/bin/containerd | |
Delegate=yes | |
KillMode=process | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Run containerd stress tests using the provided containerd build tar | |
# | |
# Source at https://gist.github.com/dmcgowan/66ded5c6acd9ccd03bb46e5ed1bbf44f | |
# | |
# Builds can be obtained from https://github.com/containerd/containerd/releases | |
# Local builds can be used doing `make binaries && tar -czf localbuild.tgz bin` | |
# | |
# Notes: | |
# Builds are extracted into /usr/local/bin/ where systemd must be | |
# configured to use containerd from. | |
set -e | |
TARFILE=$1 | |
if [ -z "$TARFILE" ]; then | |
echo "Tar file must be provided" | |
exit 1 | |
fi | |
if [ ! -f $TARFILE ]; then | |
echo "Tar file does not exist" | |
exit 1 | |
fi | |
systemctl stop containerd | |
rm -rf /var/lib/containerd | |
rm -rf /run/containerd | |
tar -xzf $TARFILE -C /usr/local | |
VERSION=$(containerd --version) | |
echo "Running $VERSION from $TARFILE" | |
systemctl start containerd | |
sleep 1 | |
set -x | |
containerd-stress -d 2m -c 1 | |
containerd-stress -d 2m -c 2 | |
containerd-stress -d 2m -c 5 | |
containerd-stress -d 2m -c 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment