Skip to content

Commit c8f6831

Browse files
committed
setup: build tahoe-1.10.0 if it isn't there already
1 parent 6b3345a commit c8f6831

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

instance-setup-warner.py

+22-9
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ def log(s):
1212
print s
1313
sys.stdout.flush()
1414

15-
def calls(s):
16-
return call(s.split())
15+
def calls(s, cwd=None):
16+
return call(s.split(), cwd=None)
1717

1818
if exists("instance-setup-warner.stamp"):
1919
log("instance-setup-warner.stamp exists, exiting")
@@ -48,6 +48,7 @@ def get_metadata(name, type="instance"):
4848
from rewrite_config import reconfig
4949

5050
introducer_furl = get_metadata("introducer-furl", "project")
51+
perf_rootcap = get_metadata("perf-rootcap", "project")
5152

5253
for nodename in get_metadata("tahoeperf-nodes").split(","):
5354
if nodename.startswith("storage"):
@@ -61,13 +62,25 @@ def get_metadata(name, type="instance"):
6162
log("started %s" % nodedir)
6263

6364
if nodename == "client":
64-
pass
65-
## TAHOE = expanduser("~/bin/tahoe")
66-
## if not exists(expanduser("~/.tahoe")):
67-
## log("creating %s" % nodename)
68-
## call([TAHOE, "create-client", "-n", nodename, "-i", introducer_furl])
69-
## call([TAHOE, "start"])
70-
## log("started %s" % nodename)
65+
# fetch tahoe tarball, unpack, setup.py build
66+
if not exists("allmydata-tahoe-1.10.0"):
67+
calls("wget https://tahoe-lafs.org/source/tahoe-lafs/releases/allmydata-tahoe-1.10.0.zip")
68+
calls("unzip allmydata-tahoe-1.10.0.zip")
69+
calls("python setup.py build",
70+
cwd=expanduser("allmydata-tahoe-1.10.0"))
71+
if not exists(expanduser("~/bin/tahoe")):
72+
os.symlink(expanduser("~/allmydata-tahoe-1.10.0/bin/tahoe"),
73+
expanduser("~/bin/tahoe"))
74+
TAHOE = expanduser("~/bin/tahoe")
75+
if not exists(expanduser("~/.tahoe")):
76+
# create client
77+
log("creating/starting %s" % nodename)
78+
call([TAHOE, "create-client", "-n", nodename, "-i",introducer_furl])
79+
# start node
80+
call([TAHOE, "start"])
81+
# configure perf: alias
82+
call([TAHOE, "add-alias", "perf", perf_rootcap])
83+
log("started %s" % nodename)
7184
## log("running start-client.py")
7285
## call([sys.executable, expanduser("~/perf-tests/./start-client.py")])
7386

start-client.py

+5
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,8 @@ def wait_for_connections():
4444
wait_for_connections()
4545

4646
#call([TAHOE, "create-alias", "perf"])
47+
48+
# for each trial:
49+
# add_grid_config.py (optional, for new server config or client instance type)
50+
# that yields a grid_config_id
51+
# download.py --max-time 1200 --notes .. -g GRID_CONFIG_ID partial-100MB

0 commit comments

Comments
 (0)