Merge "Support of configurable background load and implementation of LTD.CPU.RFC2544...
[vswitchperf.git] / docs / installation.rst
1 Installing vswitchperf
2 ======================
3
4 The test suite requires Python 3.3 and relies on a number of other
5 packages. These need to be installed for the test suite to function. To
6 install Python 3.3 in CentOS 7, an additional repository, Software
7 Collections (see
8 https://www.softwarecollections.org/en/scls/rhscl/python33) should be
9 enabled.
10
11 Install the requirements as specified below.
12
13 Enable Software Collections (SCL)
14 ---------------------------------
15
16   .. code-block:: console
17
18    yum -y install scl-utils
19    yum -y install https://www.softwarecollections.org/en/scls/rhscl/python33/epel-7-x86_64/download/rhscl-python33-epel-7-x86_64.noarch.rpm
20
21 (Optional) Enable Repoforge (for stress)
22 ----------------------------------------
23 Allows optional installation of stress tool, which is required by load tests.
24
25   .. code-block:: console
26
27    yum -y install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
28
29 System packages
30 -----------------
31 There are a number of packages that must be installed using `yum`. These can be installed like so:
32
33   .. code-block:: console
34
35    yum -y --exclude=python33-mod_wsgi* install python33-* pciutils
36
37 Optional installation of stress tool
38
39   .. code-block:: console
40
41    yum -y install stress
42
43 Python 3 Packages
44 -----------------
45
46 To avoid file permission errors and Python version issues, use
47 virtualenv to create an isolated environment with Python3. The required
48 Python 3 packages can be found in the ``requirements.txt`` file in the
49 root of the test suite. They can be installed in your virtual
50 environment like so:
51
52   .. code-block:: bash
53
54     scl enable python33 bash
55     # Create virtual environment
56     virtualenv vsperfenv
57     cd vsperfenv
58     source bin/activate
59     pip install -r requirements.txt
60
61 You need to activate the virtual environment every time you start a new
62 shell session. To activate, simple run:
63
64 .. code:: bash
65
66     scl enable python33 bash
67     cd vsperfenv
68     source bin/activate
69
70 --------------
71
72 Working Behind a Proxy
73 ======================
74
75 If you're behind a proxy, you'll likely want to configure this before
76 running any of the above. For example:
77
78   .. code:: bash
79
80     export http_proxy=proxy.mycompany.com:123
81     export https_proxy=proxy.mycompany.com:123