3123a0e2df8d9e46e2af7626bbf863e992295ae1
[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 overruled on the rapid command line (--image_file)
28 * Should have DPDK and PROX installed. PROX should be in /root/prox/ directory
29 * Image should have cloud-init installed
30 * /mnt/huge should exist to support a command that is executed at startup of the VM: 'mount  -t hugetlbfs nodev /mnt/huge'
31 * Compile prox with 'make crc=soft'. This is a workaround for some cases where the crc calculation offload is not working as expected.
32 * Compile dpdk to support AESN-NI Multi Buffer Crypto Poll Mode Driver: http://dpdk.org/doc/guides/cryptodevs/aesni_mb.html
33
34 Source the openrc file of the OpenStack environment so that the OpenStack CLI
35 commands can be run:
36   # source openrc
37 Now you can run the createrapid.py file. Use help for more info on the usage:
38   # ./createrapid.py --help
39
40 createrapid.py will use the OpenStack CLI to create the flavor, key-pair, network, image,
41 stack, ...
42 It will create a <STACK>.env file containing all info that will be used by runrapid.py
43 to actually run the tests. Logging can be found in the CREATE<STACK>.log file
44 You can use floating IP addresses by specifying the floating IP network
45 --floating_network NETWORK
46 or directly connect throught the INTERNAL_NETWORK by using the following parameter:
47 --floating_network NO
48
49 Now you can run the runrapid.py file. Use help for more info on the usage:
50   # ./runrapid.py --help
51 The script will connect to all VMs that have been instantiated and it will launch
52 PROX in all VMs. This will be done through the admin IP assigned to the VMs.
53 Once that is done it will connect to the PROX tcp socket and start sending
54 commands to run the actual test.
55 It will print test results on the screen while running.
56 The actual test that is running is described in <TEST>.test.
57
58 Notes about prox_user_data.sh script:
59 - The script contains commands that will be executed using cloud-init at
60   startup of the VMs.
61 - The script also assumes some specific DPDK directory and tools which might
62   change over different DPDK release. This release has been tested with DPDK-17.02.
63 - huge pages are allocated for DPDK on node 0 (hard-coded) in the VM.
64
65 Note on using SRIOV ports:
66 Before running createrapid, make sure the network, subnet and ports are already created
67 This can be done as follows (change the parameters to your needs):
68 openstack network create --share --external --provider-network-type flat --provider-physical-network physnet2 fast-network
69 openstack subnet create --network  fast-network  --subnet-range 20.20.20.0/24 --gateway none fast-subnet
70 openstack port create --network fast-network --vnic-type direct --fixed-ip subnet=fast-subnet Port1
71 openstack port create --network fast-network --vnic-type direct --fixed-ip subnet=fast-subnet Port2
72 openstack port create --network fast-network --vnic-type direct --fixed-ip subnet=fast-subnet Port3
73 Make sure to use the network and subnet in the createrapid parameters list. Port1, Port2 and Port3
74 are being used in the yaml files.
75
76 Note when doing tests using the gateway functionality on OVS:
77 When a GW VM is sending packets on behalf of another VM (e.g. the generator), we need to make sure the OVS
78 will allow those packets to go through. Therefore you need to the IP address of the generator in the
79 "allowed address pairs" of the GW VM.
80
81 Note when doing tests using encryption on OVS:
82 Your OVS configuration might block encrypted packets. To allow packets to go through,
83 you can disable port_security. You can do this by using the following commands
84 neutron port-update xxxxxx --no-security-groups
85 neutron port-update xxxxxx --port_security_enabled=False
86
87 An example of the env file generated by createrapid.py can be found below.
88 Note that this file can be created manually in case the stack is created in a
89 different way (not using the createrapid.py). This can be useful in case you are
90 not using OpenStack as a VIM or when using special configurations that cannot be
91 achieved using createrapid.py. Only the [VMx] sections are used as
92 input for runrapid.py.
93 [DEFAULT]
94 admin_ip = none
95
96 [VM1]
97 admin_ip = 192.168.4.130
98 dp_ip = 10.10.10.6
99 dp_mac = fa:16:3e:3c:1e:12
100
101 [VM2]
102 admin_ip = 192.168.4.140
103 dp_ip = 10.10.10.9
104 dp_mac = fa:16:3e:2a:00:5d
105
106 [VM3]
107 admin_ip = 192.168.4.138
108 dp_ip = 10.10.10.11
109 dp_mac = fa:16:3e:ae:fa:86
110
111 [OpenStack]
112 stack = rapid
113 yaml = 3VMrapid.yaml
114 key = prox
115 flavor = prox_flavor
116 image = rapidVM
117 image_file = rapidVM.qcow2
118 dataplane_network = dataplane-network
119 subnet = dpdk-subnet
120 subnet_cidr = 10.10.10.0/24
121 internal_network = admin_internal_net
122 floating_network = admin_floating_net
123
124 [rapid]
125 loglevel = DEBUG
126 version = 17.10.25
127 total_number_of_vms = 3
128