1##########################################################################
2# Copyright (c) 2009, ETH Zurich.
3# All rights reserved.
4#
5# This file is distributed under the terms in the attached LICENSE file.
6# If you do not find this file, copies can be found by writing to:
7# ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
8##########################################################################
9
10import getpass
11import siteconfig
12
13# FIXME: Check why exactly ikq03 does not want to run httperf
14LOADGEN_HOSTS = ['emmentaler%d.ethz.ch' % n for n in range(1,4)]
15#LOADGEN_HOSTS = ['ikq0%d.ethz.ch' % n for n in range(4,5)]
16
17class ETH(siteconfig.BaseSite):
18    # site-specific configuration variables for ETH
19    WEBSERVER_NFS_HOST = 'emmentaler.in.barrelfish.org'
20    NFS_SERVER_HOST = 'tomme1.in.barrelfish.org'
21    WEBSERVER_NFS_PATH_FULL = '/mnt/local/nfs/barrelfish_website'
22    WEBSERVER_NFS_TEST_PATH = '/mnt/local/nfs/pravin/website/bftest_crash'
23    WEBSERVER_VM_PATH = '/mnt/local/nfs/harness'
24    WEBSERVER_1G_PATH = '/mnt/local/nfs/harness_nfs'
25    WEBSERVER_1G_FILE = 'G1.file'
26#    WEBSERVER_NFS_PATH = WEBSERVER_NFS_TEST_PATH
27    WEBSERVER_NFS_PATH = WEBSERVER_NFS_PATH_FULL
28    WEBSERVER_LOCAL_PATH = WEBSERVER_NFS_PATH
29    HTTPERF_PATH = '/home/netos/tools/i686-pc-linux-gnu/bin/httperf'
30    HTTPERF_MAXCLIENTS = len(LOADGEN_HOSTS * 2) # max number of load generators
31    IPBENCH_PATH = '/home/netos/tools/ipbench/bin/ipbench.py'
32    IPBENCHD_PATH = '/home/netos/tools/ipbench/bin/ipbenchd.py'
33    SSH_ARGS='-x -o StrictHostKeyChecking=no -o ControlPath=none -p 8006'
34    HAGFISH_LOCATION='/home/netos/tftpboot/Hagfish.efi'
35
36    def __init__(self):
37        self._loadgen_hosts = LOADGEN_HOSTS
38
39    def get_load_generator(self):
40        # take the first host, but put it on the back in case we
41        # need more clients than available hosts (ie. rotate the list)
42        host = self._loadgen_hosts.pop(0)
43        self._loadgen_hosts.append(host)
44        return getpass.getuser(), host
45
46siteconfig.site = ETH()
47
48# also cause the ETH machines to be loaded/initialised
49import machines.eth
50