1 .. _DPDK: http://dpdk.org/doc/nics
2 .. _DPDK-pktgen: https://github.com/Pktgen/Pktgen-DPDK/
3 .. _SRIOV: https://wiki.openstack.org/wiki/SR-IOV-Passthrough-For-Networking
4 .. _PORTSEC: https://wiki.openstack.org/wiki/Neutron/ML2PortSecurityExtensionDriver
6 ===========================
7 Apexlake installation guide
8 ===========================
9 ApexLake is a framework that provides automatic execution of experiments and related data collection to help
10 the user validating the infrastructure from the perspective of a Virtual Network Function.
11 To do so in the context of Yardstick, the virtual Traffic Classifier network function is utilized.
14 Hardware dependencies to run the framework
15 ==========================================
16 In order to run the framework some hardware dependencies are required to run ApexLake.
18 The framework needs to be installed on a physical node where the DPDK packet DPDK-pktgen_
19 can be correctly installed and executed.
20 That requires for the packet generator to have 2 NICs DPDK_ Compatible.
22 The 2 NICs will be connected to the switch where the Openstack VM network is managed.
24 The switch is required to support multicast traffic and snooping protocol.
26 The corresponding ports to which the cables are connected will be configured as VLAN trunks
27 using two of the VLAN IDs available for Neutron.
28 The mentioned VLAN IDs will be required in further configuration steps.
31 Software dependencies to run the framework
32 ==========================================
33 Before to start the framework, a set of dependencies are required to be installed.
34 In the following a set of instructions to be executed on the Linux shell to install dependencies
35 and configure the environment is presented.
37 1. Install dependencies.
39 To install the dependencies required by the framework it is necessary install the following packages.
40 The following example is provided for Ubuntu and need to be executed as root.
43 apt-get install python-dev
44 apt-get install python-pip
45 apt-get install python-mock
46 apt-get install tcpreplay
47 apt-get install libpcap-dev
49 2. Source OpenStack openrc file.
55 3. Configure Openstack Neutron
57 In order to support traffic generation and management by the virtual Traffic Classifier,
58 the configuration of the port security driver extension is required for Neutron.
59 For further details please follow the following link: PORTSEC_
60 This step can be skipped in case the target OpenStack is Juno or Kilo release,
61 but it is required to support Liberty.
62 It is therefore required to indicate the release version in the configuration file apexlake.conf.
64 4. Create 2 Networks based on VLANs in Neutron.
66 In order for the network communication between the packet generator and the Compute node to
67 work fine, it is required to create through Neutron two networks and map those on the VLAN IDs
68 that have been previously used for the configuration on the physical switch.
69 The underlying switch needs to be configured accordingly.
75 neutron net-create apexlake_inbound_network \
76 --provider:network_type vlan \
77 --provider:segmentation_id $VLAN_1 \
78 --provider:physical_network $PHYSNET
80 neutron subnet-create apexlake_inbound_network \
81 192.168.0.0/24 --name apexlake_inbound_subnet
83 neutron net-create apexlake_outbound_network \
84 --provider:network_type vlan \
85 --provider:segmentation_id $VLAN_2 \
86 --provider:physical_network $PHYSNET
88 neutron subnet-create apexlake_outbound_network 192.168.1.0/24 \
89 --name apexlake_outbound_subnet
91 5. Download Ubuntu Cloud Image and load it on Glance
93 The virtual Traffic Classifier is supported on top of Ubuntu 14.04 cloud image.
94 The image can be downloaded on the local machine and loaded on Glance using the following commands:
97 wget cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img
102 --container-format bare \
103 --file trusty-server-cloudimg-amd64-disk1.img
105 6. Configure the Test Cases.
107 The VLAN tags are also required into the test case Yardstick yaml file as parameters the following test cases:
114 Install and configure DPDK Pktgen
115 +++++++++++++++++++++++++++++++++
116 The execution of the framework is based on DPDK Pktgen.
117 If DPDK Pktgen has not been installed on the system by the user, it is necessary to download, compile and configure it.
118 The user can create a directory and download the dpdk packet generator source code:
121 cd experimental_framework/libraries
123 git clone https://github.com/pktgen/Pktgen-DPDK.git
125 For the installation and configuration of DPDK and DPDK Pktgen please follow the official DPDK Pktgen README file.
126 Once the installation is completed, it is necessary to load the DPDK kernel driver, as follow:
130 insmod DPDK_DIR/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
132 It is required to properly set the configuration file according to the system on Pktgen runs on.
133 A description of the required configuration parameters and examples is provided in the following:
137 packet_generator = dpdk_pktgen
139 # This is the directory where the packet generator is installed
140 # (if the user previously installed dpdk-pktgen,
141 # it is required to provide the director where it is installed).
142 pktgen_directory = /home/user/software/dpdk_pktgen/dpdk/examples/pktgen/
144 # This is the directory where DPDK is installed
145 dpdk_directory = /home/user/apexlake/experimental_framework/libraries/Pktgen-DPDK/dpdk/
147 # Name of the dpdk-pktgen program that starts the packet generator
148 program_name = app/app/x86_64-native-linuxapp-gcc/pktgen
150 # DPDK coremask (see DPDK-Pktgen readme)
153 # DPDK memory channels (see DPDK-Pktgen readme)
156 # Name of the interface of the pktgen to be used to send traffic (vlan_sender)
159 # Name of the interface of the pktgen to be used to receive traffic (vlan_receiver)
162 # PCI bus address correspondent to if_1
163 bus_slot_nic_1 = 01:00.0
165 # PCI bus address correspondent to if_2
166 bus_slot_nic_2 = 01:00.1
169 To find the parameters related to names of the NICs and addresses of the PCI buses
170 the user may find useful to run the DPDK tool nic_bind as follows:
173 DPDK_DIR/tools/dpdk_nic_bind.py --status
175 which lists the NICs available on the system, show the available drivers and bus addresses for each interface.
176 Please make sure to select NICs which are DPDK compatible.
178 Installation and configuration of smcroute
179 ++++++++++++++++++++++++++++++++++++++++++
180 The user is required to install smcroute which is used by the framework to support multicast communications.
181 In the following a list of commands to be ran to download and install smroute is provided.
185 git clone https://github.com/troglobit/smcroute.git
187 git reset --hard c3f5c56
188 sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh
189 sed -i 's/automake-1.11/automake/g' ./autogen.sh
196 It is required to do the reset to the specified commit ID.
197 It is also required to create a configuration file using the following command:
199 SMCROUTE_NIC=(name of the nic)
201 where name of the nic is the name used previously for the variable "name_if_2".
202 In the example it would be:
207 Then create the smcroute configuration file /etc/smcroute.conf
210 echo mgroup from $SMCROUTE_NIC group 224.192.16.1 > /etc/smcroute.conf
213 At the end of this procedure it will be necessary to perform the following actions to add the user to the sudoers:
216 adduser USERNAME sudo
217 echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
220 Experiment using SR-IOV configuration on the compute node
221 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
222 In order to enable SR-IOV interfaces on the physical NIC of the compute node, a compatible NIC is required.
223 NIC configuration depends on model and vendor. After proper configuration to support SR-IOV,
224 a proper configuration of openstack is required.
225 For further information, please look at the _SRIOV configuration guide
228 Finalize installation the framework on the system
229 =================================================
231 The installation of the framework on the system requires the setup of the project.
232 After entering into the apexlake directory, it is sufficient to run the following command.
235 python setup.py install
237 Since some elements are copied into the /tmp directory (see configuration file) it could be necessary
238 to repeat this step after a reboot of the host.