diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2022-09-16 15:43:58 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2022-09-16 15:43:58 +0200 |
commit | b95db09b96d6a901004fdf3ccccc98e297c9102d (patch) | |
tree | 4291b3771aefaeb9c758c314c494be7bbabc3b3e /prepare.py | |
parent | 4bec653fe9c404b09d30882283541ea18b8b6fc2 (diff) | |
download | mknet-b95db09b96d6a901004fdf3ccccc98e297c9102d.tar.gz mknet-b95db09b96d6a901004fdf3ccccc98e297c9102d.zip |
Create a prepare script
Diffstat (limited to 'prepare.py')
-rwxr-xr-x | prepare.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/prepare.py b/prepare.py new file mode 100755 index 0000000..d902c65 --- /dev/null +++ b/prepare.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +from pathlib import Path +from scenarios.fragments import shared +import os, venv + +me = Path(os.path.dirname(__file__)) +print("--- git submodule ---") +shared.exec("git submodule update --init") + +print("--- compile go benchmarks ---") +os.chdir(me / "benchmarks" / "warp") +shared.exec("go build") +os.chdir(me / "benchmarks" / "s3concurrent") +shared.exec("go build") +os.chdir(me / "benchmarks" / "s3lat") +shared.exec("go build") +os.chdir(me) + +print("--- install python dependencies ---") +venv.create(".venv", with_pip=True) +shared.exec(""" +source .venv/bin/activate +which python3 +python3 -m pip install . +python3 -m pip install -r scenarios/requirements.txt +""") + +print("--- download garage artifacts ---") +from scenarios.fragments import garage +garage.download() + +print("""done! now, run: +> sudo -i +> source ./.venv/bin/activate +> ./mknet scenario ./topo/with-vdsl.yml ./scenarios/garage-s3lat garage-v0.8 +""") |