aboutsummaryrefslogblamecommitdiff
path: root/prepare.py
blob: 60d58c1a2cc7e853ee5bea61c475a5fe358b8a85 (plain) (tree)


























                                                    


                                      





                                                                            
#!/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 artifacts ---")
from scenarios.fragments import flavor
flavor.download()

print("""done! now, run:
> sudo -i
> source ./.venv/bin/activate
> ./mknet scenario ./topo/with-vdsl.yml ./scenarios/garage-s3lat garage-v0.8
""")