Project

General

Profile

root / trunk / doc / manual / install.tex @ 632

1
Haizea has been tested only on Unix systems, and these installation instructions are given with a Unix system in mind. However, Haizea includes a small amount of platform-specific code, and should run fine on other systems with minimal effort. If there is enough interest, we can produce installers and installation instructions for other platforms.
2

    
3
Installing Haizea can be accomplished in four simple steps:
4

    
5
\section{Install dependencies}
6

    
7
Haizea has a couple of software dependencies. Let's get them out of the way first:
8

    
9
\begin{itemize}
10
\item Python 2.5. (\url{http://www.python.org/})
11
\item mxDateTime 3.1.0 (\url{http://www.egenix.com/products/python/mxBase/mxDateTime/}), part of the eGenix.com mx Base Distribution).
12
\item Optional: Mako Templates for Python 0.2.2 (\url{http://www.makotemplates.org/}). This package is only necessary if you want to automate running multiple simulation experiments (if this doesn't make any sense, you can skip this prerequisite for now; you will be pointed to this prerequisite again in the documentation when you get to running multiple experiments).
13
\item Optional: Psyco 1.6 (\url{http://psyco.sourceforge.net/}). This package optimises the execution of Python code, resulting in the simulation code running much faster. You can skip this prerequisite if you are not going to use Haizea to run simulations, or if you are only going to run short simulations.
14
\end{itemize}
15

    
16
Note that mxDateTime, Mako, and Psyco are all available as packages (DEB, RPM, etc.) on most Linux distributions. If you don't install any of the optional dependencies, Haizea will still run fine, but some functionality may not be available, as noted above.
17

    
18
\section{Download Haizea}
19

    
20
Go to the \htmladdnormallink{download page}{http://haizea.cs.uchicago.edu/download.html} and download the latest version of Haizea. This will be a tarball called \texttt{haizea-XXX.tar.gz}, where XXX will be the version number. For the remainder of the instructions, let's assume that you've saved this file in a directory called \texttt{\$HAIZEA\_INST}.
21

    
22
\section{Install Haizea}
23

    
24
Go into directory \texttt{\$HAIZEA\_INST} and un-tar the installation package:
25

    
26
\begin{shellverbatim}
27
tar xvzf haizea-XXX.tar.gz
28
\end{shellverbatim}
29

    
30
This will create a directory called \texttt{haizea-XXX} in \texttt{\$HAIZEA\_INST}. Go into that directory, and as root, run the following:
31

    
32
\begin{shellverbatim}
33
python setup.py install
34
\end{shellverbatim}
35

    
36
If you do not have root access, or want to install Haizea in your home directory, run the following:
37

    
38
\begin{shellverbatim}
39
python setup.py install --home=$HOME
40
\end{shellverbatim}
41

    
42
Note: If you have never installed a Python package in your home directory before, make sure you set the environment variable \texttt{PYTHONPATH} appropriately so Python will be aware of the Haizea modules.
43

    
44
\begin{shellverbatim}
45
export PYTHONPATH=$HOME/lib/python
46
\end{shellverbatim}
47

    
48
After running the setup script, you should see a long list of installation and build messages, ending with the following:
49

    
50
\begin{wideshellverbatim}
51
creating /usr/share/haizea/traces/multi
52
copying traces/multi/inj1.lwf -> /usr/share/haizea/traces/multi
53
copying traces/multi/inj2.lwf -> /usr/share/haizea/traces/multi
54
copying traces/multi/withprematureend.lwf -> /usr/share/haizea/traces/multi
55
copying traces/multi/withoutprematureend.lwf -> /usr/share/haizea/traces/multi
56
running install_egg_info
57
Writing /usr/lib/python2.5/site-packages/haizea-XXX.egg-info
58
\end{wideshellverbatim}
59

    
60
If you see this, installation has been successful!
61

    
62
\section{Verify installation}
63

    
64
Haizea includes some sample configuration files and lease request tracefiles that you can use to test Haizea. If you installed Haizea as root, you can run the following to test your installation:
65

    
66
\begin{shellverbatim}
67
haizea -c /usr/share/haizea/etc/sample_trace.conf
68
\end{shellverbatim}
69

    
70
This will use a sample configuration file to simulate running the scheduler with no requests, resulting in the following (somewhat anticlimactic) output:
71

    
72
\begin{wideshellverbatim}
73
[2006-11-25 13:00:00.00] TFILE   Loading tracefile /usr/share/haizea/traces/sample.lwf
74
[2006-11-25 13:00:00.00] TFILE   Loaded workload with 0 requests ()
75
[2006-11-25 13:00:00.00] RM      Starting resource manager
76
[2006-11-25 13:00:00.00] CLOCK   Starting simulated clock
77
[2006-11-25 13:00:00.00] CLOCK   Simulated clock has stopped
78
[2006-11-25 13:00:00.00] RM      Stopping resource manager gracefully...
79
[2006-11-25 13:00:00.00] RM      --- Haizea status summary ---
80
[2006-11-25 13:00:00.00] RM      Number of leases (not including completed): 0
81
[2006-11-25 13:00:00.00] RM      Completed leases: 0
82
[2006-11-25 13:00:00.00] RM      Completed best-effort leases: 0
83
[2006-11-25 13:00:00.00] RM      Queue size: 0
84
[2006-11-25 13:00:00.00] RM      Accepted AR leases: 0
85
[2006-11-25 13:00:00.00] RM      Rejected AR leases: 0
86
[2006-11-25 13:00:00.00] RM      Accepted IM leases: 0
87
[2006-11-25 13:00:00.00] RM      Rejected IM leases: 0
88
[2006-11-25 13:00:00.00] RM      ---- End summary ----
89
\end{wideshellverbatim}
90

    
91
Ok, not terribly exciting, but if you see this then the basic machinery is working fine. We will see how to do more elaborate simulations, and how to use Haizea to manage real hardware, in the next chapters.
92

    
93
Note: If you installed Haizea in your home directory, you will have to run the following:
94

    
95
\begin{shellverbatim}
96
haizea -c $HOME/share/haizea/etc/sample_trace.conf
97
\end{shellverbatim}
98

    
99
Additionally, you will have to modify the tracefile option in the sample configuration so it will point to the sample tracefile located in \texttt{\$HOME/share/haizea/traces/sample.lwf} (instead of under the \texttt{/usr} directory).