Tools: Dockerfile to run VSPERF in a Container.
[vswitchperf.git] / tools / docker / docs / test.rst
1 Before using VSPERF client and VSPERF containers, user must run the prepare.sh script which will prepare their local environment.
2
3 locate vsperf-docker/prepare.sh and run:
4 bash prepare.sh
5
6 VSPERF Containers
7 ------------------
8
9 ============
10 deployment
11 ============
12 Users have two choices for deployment, auto and interactive.
13
14 1. auto
15 ^^^^^^^^^^^^^^^^^^^^^
16 This auto deployment container will do everything related with VSPERF set-up automatically. It includes, installation of VSPERF, T-rex and collectd, uploading collectd configuration file on DUT-Host, uploading t-rex configuration files and starting the t-rex traffic generator. Before installing vsperf and t-rex, the container will perform verification process, which includes basic sanity checks such as checking for old installations, huge-page checks, necessary folders and software, etc. User should modify the t-rex(trex_cfg.yaml)and collectd(collectd.conf) configuration files depending on their needs before running the containers.
17
18
19 Pre-Deployment Configuration
20 ******************
21 User has to provide the following in list.env file:
22 1.DUT-Host and TGen-Host related credentials and IP address
23 2.Values for HUGEPAGE_MAX and HUGEPAGE_REQUESTED
24 3.Option for sanity check - YES or NO.
25
26 Build
27 ******************
28 Use **docker-compose build** command to build the container.
29
30 Run
31 ******************
32 Run the container's service with **docker-compose run deploy** command.
33
34
35 2. interactive
36 ^^^^^^^^^^^^^^^^^^^^^
37 The interactive container must run before using the vsperf client. It will start the server on port 50051 for the vsperf client to send commands. Deployment interactive container handles all vsperf set-up related commands from vsperf client and performs the corresponding operation.
38
39
40 Build
41 ******************
42 Run **docker-compose build** command to build the container.
43
44 Run
45 ******************
46 Run the container with **docker-compose up deploy** command.
47 Once the server is running user have to run testcontrol interactive container and then user can run the vsperf client.
48
49
50 ===============
51 testcontrol
52 ===============
53 For testcontrol too, user has two choices- auto and interactive.
54
55 1. auto
56 ^^^^^^^^^^^^^^^^^^^^^
57 This auto testcontrol container will perform test automatically on DUT-Host. This container also performing sanity checks automatically. User will also able to get test-status for all tests. If all sanity check doesn't satisfy then test will not run and container gracefully stopped. User can modify the vsperf.conf file which will be upload on DUT-Host automatically by container and used for performing the vsperf test.
58
59 Pre-Deployment Configuration
60 ******************
61 1.User have to provide all the DUT-Host credentials and IP address of TGen-host in list.env.
62 2.Provide name for VSPERF_TESTS and VSPERF_CONFFILE in list.env.
63 3.Provide option for VSPERF_TRAFFICGEN_MODE and CLEAN_UP [YES or NO] in list.env file.
64
65 Build
66 ******************
67 Run **docker-compose build** command to build the container.
68
69 Run
70 ******************
71 Run the container's service with **docker-compose run testcontrol** command.
72 User can observe the results and perform the another test by just changing the VSPERF_TEST environment variable in list.env file.
73
74
75 2. interactive
76 ^^^^^^^^^^^^^^^^^^^^^
77 This interactive testcontrol container must run before using the vsperf client. It will start the server on port 50052 for the vsperf client. This testcontrol interactive container handle all the test related commands from vsperf client and do the operations. Testcontrol interactive container running server on localhost port 50052.
78
79 Build
80 ******************
81 Run **docker-compose build** command to build the container.
82
83 Run
84 ******************
85 Run the container with **docker-compose up testcontrol** command.
86 After running this container user can use the vsperf client.