Merge "Fixed typo in setting up ARP timers"
[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.
25
26 You will need an image that has the PROX tool installed.
27 The best way to do this is to use the packer tool to build an image for a target of your choice.
28 You can also build this image manually by executing all the commands described in the deploycentos1.sh
29 and deploycentos2.sh file.
30 The default name of the qcow2 file should is rapidVM.qcow2
31
32 When using the packer tool, the first step is to upload an
33 existing CentOs cloud image from the internet into OpenStack.
34 Check out: https://cloud.centos.org/centos/7/images/
35 You should now source the proper .rc file so Packer can connect to your OpenStack.
36 There are 3 files: centos.json, deploycentos1.sh and deploycentos2.sh, allowing you to create
37 an image automatically. Run
38   # packer build centos.json
39 Edit centos.json to reflect the settings of your environment: The following fields need to
40 be the ID's of your system:
41   - "source_image": Needs to be the id of the Centos cloud image
42   - "flavor": Needs to be the ID of the flavor existing in your OpenStack environment that will be used
43     to start the VM in which we will install all tools
44   - "networks": ID of the network that will be used for the VM
45   - "use_floating_ip": true or false
46   - "floating_ip_pool": ID of the floating ip pool in case floating ip are being used
47   - "security_groups": ID of the security group being used
48
49 Note that this procedure is not only installing the necessary tools to run PROX,
50 but also does some system optimizations (tuned).
51
52 Now you can run the createrapid.py file. Use help for more info on the usage:
53   # ./createrapid.py --help
54
55 createrapid.py will use the OpenStack CLI to create the flavor, key-pair, network, image,
56 servers, ...
57 It will create a <STACK>.env file containing all info that will be used by runrapid.py
58 to actually run the tests. Logging can be found in the CREATE<STACK>.log file
59 You can use floating IP addresses by specifying the floating IP network
60 --floating_network NETWORK
61 or directly connect throught the INTERNAL_NETWORK by using the following parameter:
62 --floating_network NO
63 /etc/resolv.conf will contain DNS info from the "best" interface. Since we are
64 deploying VMs with multiple interface on different networks, this info might be
65 taken from the "wrong" network (e.g. the dataplane network). It is good to provide
66 also a working DNS on that network.
67
68 Now you can run the runrapid.py file. Use help for more info on the usage:
69   # ./runrapid.py --help
70 The script will connect to all machines that have been instantiated and it will launch
71 PROX in all machines. This will be done through the admin IP assigned to the machines.
72 Once that is done it will connect to the PROX tcp socket and start sending
73 commands to run the actual test.
74 It will print test results on the screen while running.
75 The actual test that is running is described in <TEST>.test.
76
77 Notes about prox_user_data.sh script:
78 - The script contains commands that will be executed using cloud-init at
79   startup of the VMs.
80 - huge pages are allocated for DPDK on node 0 (hard-coded) in the VM.
81
82 Note on using SRIOV ports:
83 Before running createrapid, make sure the network, subnet and ports are already created
84 This can be done as follows (change the parameters to your needs):
85 openstack network create --share --external --provider-network-type flat --provider-physical-network physnet2 fast-network
86 openstack subnet create --network  fast-network  --subnet-range 20.20.20.0/24 --gateway none fast-subnet
87 openstack port create --network fast-network --vnic-type direct --fixed-ip subnet=fast-subnet Port1
88 openstack port create --network fast-network --vnic-type direct --fixed-ip subnet=fast-subnet Port2
89 openstack port create --network fast-network --vnic-type direct --fixed-ip subnet=fast-subnet Port3
90 Make sure to use the network and subnet in the createrapid parameters list. Port1, Port2 and Port3
91 are being used in the *.env file.
92
93 Note when doing tests using the gateway functionality on OVS:
94 When a GW VM is sending packets on behalf of another VM (e.g. the generator), we need to make sure the OVS
95 will allow those packets to go through. Therefore you need to the IP address of the generator in the
96 "allowed address pairs" of the GW VM.
97
98 Note when doing tests using encryption on OVS:
99 Your OVS configuration might block encrypted packets. To allow packets to go through,
100 you can disable port_security. You can do this by using the following commands
101 neutron port-update xxxxxx --no-security-groups
102 neutron port-update xxxxxx --port_security_enabled=False
103
104 An example of the env file generated by createrapid.py can be found below.
105 Note that this file can be created manually in case the stack is created in a
106 different way (not using the createrapid.py). This can be useful in case you are
107 not using OpenStack as a VIM or when using special configurations that cannot be
108 achieved using createrapid.py. Fields needed for runrapid are:
109 * all info in the [Mx] sections
110 * the key information in the [OpenStack] section
111 * the total_number_of_vms information in the [rapid] section
112
113 [DEFAULT]
114 admin_ip = none
115
116 [M1]
117 admin_ip = 192.168.4.130
118 dp_ip = 10.10.10.6
119 dp_mac = fa:16:3e:3c:1e:12
120
121 [M2]
122 admin_ip = 192.168.4.140
123 dp_ip = 10.10.10.9
124 dp_mac = fa:16:3e:2a:00:5d
125
126 [M3]
127 admin_ip = 192.168.4.138
128 dp_ip = 10.10.10.11
129 dp_mac = fa:16:3e:ae:fa:86
130
131 [OpenStack]
132 stack = rapid
133 yaml = 3VMrapid.yaml
134 key = prox
135 flavor = prox_flavor
136 image = rapidVM
137 image_file = rapidVM.qcow2
138 dataplane_network = dataplane-network
139 subnet = dpdk-subnet
140 subnet_cidr = 10.10.10.0/24
141 internal_network = admin_internal_net
142 floating_network = admin_floating_net
143
144 [rapid]
145 loglevel = DEBUG
146 version = 17.10.25
147 total_number_of_vms = 3
148