In this step, we will verify that your system provides all necessary tools to run SeBS.
Check Python version:
python --versionTo use SeBS, you need Python 3.7 or newer.
docker --version
docker run hello-worldIf you see a permission denied error:
sudo usermod -aG docker $USERThen, try to run the hello-world command again in a new shell.
In the tutorial, we use jq to parse JSON outputs. Additionally, we recommend installing cURL dependencies to avoid issues when installing pycurl library.
First, check that jq is functional:
sudo apt-get update && sudo apt-get install -y jq
echo '{"name": "test"}' | jq '.name'Expected output: "test"
On Ubuntu, these packages should be sufficient to install pycurl:
sudo apt-get install libssl-dev libcurl4-openssl-devIn this step, we will clone the SeBS repository and install it with support for all cloud and local platforms. SeBS will create a Python virtual environment to manage dependencies. After these steps, we will be ready to deploy benchmarks.
git clone --recursive https://github.com/spcl/serverless-benchmarks.git
cd serverless-benchmarksSet Tutorial Directory Path:
Throughout this tutorial, we reference configuration files from the tutorial directory. Set this variable to make commands easier to copy:
export TUTORIAL_DIR=/path/to/sebs-tutorial
# Example: If you cloned the tutorial to ~/sebs-tutorial, use:
export TUTORIAL_DIR=~/sebs-tutorialInstall SeBS with local and OpenWhisk support
./install.py --aws --azure --gcp --local --openwhiskActivate Python virtual environment
source python-venv/bin/activateVerify SeBS installation
./sebs.py --helpExpected output:
Usage: sebs.py [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
benchmark
experiment
local
resources
storageSeBS has four main commands:
benchmark: Deploy and invoke individual functions.experiment: Run systematic experiments (perf-cost, invocation overhead, container eviction, etc.)storage: Manage object storage (MinIO and ScyllaDB for local deployment or OpenWhisk)local: Manage local Docker deploymentsresources: Manage resources created in the cloud.
Here are a few essential concepts that will help you understand SeBS:
- SeBS Workflow:
benchmark code → build code package / container → deploy to platform → invoke → measure
- Caching: SeBS manages a cache in the
cachedirectory to remember all resources created in the cloud, as well as cache all built code packages and containers. - Resource ID: each SeBS deployment uses a randomly generated resource ID to uniquely identify resources (functions, storage buckets, etc.) created in the cloud. When setting up a new cache directory in SeBS, you can provide a custom resource ID to reuse existing resources.