summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/helper-scripts/openstackrapid/README
blob: cc940fc6072c7e796ac9032a2338bfc84f676cb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
##
## Copyright (c) 2010-2017 Intel Corporation
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
##     http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##

rapid (Rapid Automated Performance Indication for Dataplane)
************************************************************

rapid is a set of files offering an easy way to do a sanity check of the
dataplane performance of an OpenStack environment.

Copy the files in a directory on a machine that can run the OpenStack CLI
commands and that can reach the OpenStack public network.
One option is to create a qcow2 image in the same directory with the
following characteristics:
* Name of the qcow2 file should be: rapidVM.qcow2
  This default name can be overruled on the rapid command line (--image_file)
* Should have DPDK and PROX installed. PROX should be in /root/prox/ directory
* Image should have cloud-init installed
* /mnt/huge should exist to support a command that is executed at startup of the VM: 'mount  -t hugetlbfs nodev /mnt/huge'
* Compile prox with 'make crc=soft'. This is a workaround for some cases where the crc calculation offload is not working as expected.
* Compile dpdk to support AESN-NI Multi Buffer Crypto Poll Mode Driver: http://dpdk.org/doc/guides/cryptodevs/aesni_mb.html

Alternatively, you can create an image in OpenStack using Packer and then specify
the image to be used as a parameter to createrapid.py. First step is to upload an
existing CentOs cloud image from the internet into OpenStack.
Check out: https://cloud.centos.org/centos/7/images/
You should now source the proper .rc file so Packer can connect to your OpenStack.
There are 2 files: centos.json and deploycentos.sh, allowing you to create
an image automatically. Run
  # packer build centos.json
Note that this procedure is not only installing the necessary tools to run PROX,
but also does some system optimizations (tuned).

Now that the image exists in OpenStack, source the openrc file of the OpenStack
environment so that the OpenStack CLI commands can be run:
  # source openrc
Now you can run the createrapid.py file. Use help for more info on the usage:
  # ./createrapid.py --help

createrapid.py will use the OpenStack CLI to create the flavor, key-pair, network, image,
servers, ...
It will create a <STACK>.env file containing all info that will be used by runrapid.py
to actually run the tests. Logging can be found in the CREATE<STACK>.log file
You can use floating IP addresses by specifying the floating IP network
--floating_network NETWORK
or directly connect throught the INTERNAL_NETWORK by using the following parameter:
--floating_network NO
/etc/resolv.conf will contain DNS info from the "best" interface. Since we are
deploying VMs with multiple interface on different networks, this info might be
taken from the "wrong" network (e.g. the dataplane network). It is good to provide
also a working DNS on that network.

Now you can run the runrapid.py file. Use help for more info on the usage:
  # ./runrapid.py --help
The script will connect to all machines that have been instantiated and it will launch
PROX in all machines. This will be done through the admin IP assigned to the machines.
Once that is done it will connect to the PROX tcp socket and start sending
commands to run the actual test.
It will print test results on the screen while running.
The actual test that is running is described in <TEST>.test.

Notes about prox_user_data.sh script:
- The script contains commands that will be executed using cloud-init at
  startup of the VMs.
- The script also assumes some specific DPDK directory and tools which might
  change over different DPDK release. This release has been tested with DPDK-17.02.
- huge pages are allocated for DPDK on node 0 (hard-coded) in the VM.

Note on using SRIOV ports:
Before running createrapid, make sure the network, subnet and ports are already created
This can be done as follows (change the parameters to your needs):
openstack network create --share --external --provider-network-type flat --provider-physical-network physnet2 fast-network
openstack subnet create --network  fast-network  --subnet-range 20.20.20.0/24 --gateway none fast-subnet
openstack port create --network fast-network --vnic-type direct --fixed-ip subnet=fast-subnet Port1
openstack port create --network fast-network --vnic-type direct --fixed-ip subnet=fast-subnet Port2
openstack port create --network fast-network --vnic-type direct --fixed-ip subnet=fast-subnet Port3
Make sure to use the network and subnet in the createrapid parameters list. Port1, Port2 and Port3
are being used in the *.env file.

Note when doing tests using the gateway functionality on OVS:
When a GW VM is sending packets on behalf of another VM (e.g. the generator), we need to make sure the OVS
will allow those packets to go through. Therefore you need to the IP address of the generator in the
"allowed address pairs" of the GW VM.

Note when doing tests using encryption on OVS:
Your OVS configuration might block encrypted packets. To allow packets to go through,
you can disable port_security. You can do this by using the following commands
neutron port-update xxxxxx --no-security-groups
neutron port-update xxxxxx --port_security_enabled=False

An example of the env file generated by createrapid.py can be found below.
Note that this file can be created manually in case the stack is created in a
different way (not using the createrapid.py). This can be useful in case you are
not using OpenStack as a VIM or when using special configurations that cannot be
achieved using creater needed for runrapid are:
* all info in the [Mx] sections
* the key information in the [OpenStack] section
* the total_number_of_vms information in the [rapid] section

[DEFAULT]
admin_ip = none

[M1]
admin_ip = 192.168.4.130
dp_ip = 10.10.10.6
dp_mac = fa:16:3e:3c:1e:12

[M2]
admin_ip = 192.168.4.140
dp_ip = 10.10.10.9
dp_mac = fa:16:3e:2a:00:5d

[M3]
admin_ip = 192.168.4.138
dp_ip = 10.10.10.11
dp_mac = fa:16:3e:ae:fa:86

[OpenStack]
stack = rapid
yaml = 3VMrapid.yaml
key = prox
flavor = prox_flavor
image = rapidVM
image_file = rapidVM.qcow2
dataplane_network = dataplane-network
subnet = dpdk-subnet
subnet_cidr = 10.10.10.0/24
internal_network = admin_internal_net
floating_network = admin_floating_net

[rapid]
loglevel = DEBUG
version = 17.10.25
total_number_of_vms = 3