Splitting the script in 2 parts: createrapid.py and runrapid.py
[samplevnf.git] / VNFs / DPPD-PROX / helper-scripts / openstackrapid / README
1 ##
2 ## Copyright (c) 2010-2017 Intel Corporation
3 ##
4 ## Licensed under the Apache License, Version 2.0 (the "License");
5 ## you may not use this file except in compliance with the License.
6 ## You may obtain a copy of the License at
7 ##
8 ##     http://www.apache.org/licenses/LICENSE-2.0
9 ##
10 ## Unless required by applicable law or agreed to in writing, software
11 ## distributed under the License is distributed on an "AS IS" BASIS,
12 ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ## See the License for the specific language governing permissions and
14 ## limitations under the License.
15 ##
16
17 rapid (Rapid Automated Performance Indication for Dataplane)
18 ************************************************************
19
20 rapid is a set of files offering an easy way to do a sanity check of the
21 dataplane performance of an OpenStack environment.
22
23 Copy the files in a directory on a machine that can run the OpenStack CLI
24 commands and that can reach the OpenStack public network. Also create a qcow2
25 image in the same directory with the following characteristics:
26 * Name of the qcow2 file should be: rapidVM.qcow2
27   This default name can be changed on the rapid command line
28 * Should have DPDK and PROX installed. PROX should be in /root/prox/ directory
29 * Image should have cloud-init installed
30
31 Source the openrc file of the OpenStack environment so that the OpenStack CLI
32 commands can be run:
33   # source openrc
34 Now you can run the createrapid.py file. Use help for more info on the usage:
35   # ./createrapid.py --help
36
37 runrapid.py will use the OpenStack CLI to create the flavor, key-pair, network, image,
38 stack, ...
39 It will create a <STACK>.cfg file containing all info that will be used by runrapid.py
40 to actually run the tests. Logging can be found in the CREATE<STACK>.log file
41
42 Now you can run the runrapid.py file. Use help for more info on the usage:
43   # ./runrapid.py --help
44 The script will connect to the 2 VMs that have been instantiated and it will launch
45 PROX in both VMs.
46 Once that is done it will connect to the PROX tcp socket and start sending
47 commands to run the actual test.
48 It will print test results on the screen while running.
49 The PROX instance in the Generator VM will generate packets which will arrive in
50 the PROX instance running on the SUT (System Under Test) VM. The SUT will then
51 send the packets back to the generator by swapping source and destination.
52
53 Notes about prox_user_data.sh script:
54 - The script contains commands that will be executed using cloud-init at
55   startup of the VMs.
56 - The script also assumes some specific DPDK directory and tools which might
57   change over different DPDK release. This release has been tested with DPDK-17.02.
58
59 An example of the cfg file generated by createrapid.py can be found below.
60 Note that this file can be created manually in case the stack is created in a
61 different way (not using the createrapid.py). This can be useful in case you are
62 not using OpenStack as a VIM or when using special configurations that cannot be
63 achieved using createrapid.py. Only the [Generator] and [SUT] section are used as
64 input for runrapid.py. In the [SUT] section, you can also set admin_ip = 'none'.
65 In that case, only the generator will be controlled by runrapid.py and you must
66 start the SUT manually.
67
68 [Generator]
69 admin_ip = 192.168.3.139
70 dp_ip = 10.10.10.3
71 hex_dp_ip = 0a 0a 0a 03
72 dp_mac = fa:16:3e:96:6c:e7
73
74 [SUT]
75 admin_ip = 192.168.3.133
76 dp_ip = 10.10.10.6
77 hex_dp_ip = 0a 0a 0a 06
78 dp_mac = fa:16:3e:0b:9c:57
79
80 [OpenStack]
81 stack = rapidTestEnv
82 yaml = rapid.yaml
83 key = prox
84 flavor = prox_flavor
85 image = rapidVM
86 image_file = rapidVM.qcow2
87 dataplane_network = dataplane-network
88 subnet = dpdk-subnet
89 subnet_cidr = 10.10.10.0/24
90 admin_network = admin_internal_net
91
92 [rapid]
93 loglevel = DEBUG
94 version = 17.09.03
95