1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
4 ========================
5 KVM4NFV SCENARIO-TESTING
6 ========================
11 This document describes the procedure to deploy/test KVM4NFV scenario in a nested virtualization
12 environment in a single system. This has been verified with os-nosdn-kvm-ha, os-nosdn-kvm-noha,
13 os-nosdn-kvm_ovs_dpdk-ha, os-nosdn-kvm_ovs_dpdk-noha and os-nosdn-kvm_ovs_dpdk_bar-ha test scenario.
18 +-----------------------------+---------------------------------------------+
20 | **Release** | **Features** |
22 +=============================+=============================================+
23 | | - Scenario Testing feature was not part of |
24 | Colorado | the Colorado release of KVMFORNFV |
26 +-----------------------------+---------------------------------------------+
27 | | - High Availability deployment and |
28 | | configuration of KVMFORNFV software suite |
29 | Danube | - Multi-node setup with 3 controllers and |
30 | | 2 computes nodes are deployed |
31 | | - Scenarios os-nosdn-kvm_ovs_dpdk-ha and |
32 | | os-nosdn-kvm_ovs_dpdk_bar-ha are supported|
34 +-----------------------------+---------------------------------------------+
39 The purpose of os-nosdn-kvm_ovs_dpdk-ha and os-nosdn-kvm_ovs_dpdk_bar-ha scenario testing is to
40 test the High Availability deployment and configuration of OPNFV software suite with OpenStack and
41 without SDN software. This OPNFV software suite includes OPNFV KVMFORNFV latest software packages
42 for Linux Kernel and QEMU patches for achieving low latency and also OPNFV Barometer for traffic,
43 performance and platform monitoring. High Availability feature is achieved by deploying OpenStack
44 multi-node setup with 1 Fuel-Master,3 controllers and 2 computes nodes.
46 KVMFORNFV packages will be installed on compute nodes as part of deployment. The scenario testcase deploys a multi-node setup by using OPNFV Fuel deployer.
48 1. System pre-requisites
49 ------------------------
52 - HARD DISK - Minimum 500GB
53 - Linux OS installed and running
54 - Nested Virtualization enabled, which can be checked by,
58 $ cat /sys/module/kvm_intel/parameters/nested
61 $ cat /proc/cpuinfo | grep vmx
64 If Nested virtualization is disabled, enable it by,
70 $ echo Y > /sys/module/kvm_intel/parameters/nested
74 $ cat << EOF > /etc/modprobe.d/kvm_intel.conf
75 options kvm-intel nested=1
76 options kvm-intel enable_shadow_vmcs=1
77 options kvm-intel enable_apicv=1
78 options kvm-intel ept=1
80 $ cat << EOF > /etc/sysctl.d/98-rp-filter.conf
81 net.ipv4.conf.default.rp_filter = 0
82 net.ipv4.conf.all.rp_filter = 0
89 **2.1 Configure apt.conf in /etc/apt**
91 Create an apt.conf file in /etc/apt if it doesn't exist. Used to set proxy for apt-get if workin behind a proxy server.
95 Acquire::http::proxy "http://<username>:<password>@<proxy>:<port>/";
96 Acquire::https::proxy "https://<username>:<password>@<proxy>:<port>/";
97 Acquire::ftp::proxy "ftp://<username>:<password>@<proxy>:<port>/";
98 Acquire::socks::proxy "socks://<username>:<password>@<proxy>:<port>/";
100 **2.2 Network Time Protocol (NTP) setup and configuration**
106 $ sudo apt-get update
107 $ sudo apt-get install -y ntp
109 Insert the following two lines after “server ntp.ubuntu.com” line and before “ # Access control configuration; see `link`_ for” line in /etc/ntp.conf file:
111 .. _link: /usr/share/doc/ntp-doc/html/accopt.html
114 fudge 127.127.1.0 stratum 10
116 Restart the ntp server
120 $ sudo service ntp restart
125 There are three ways of performing scenario testing,
127 - 3.2 OPNFV-Playground
128 - 3.3 Jenkins Project
133 **3.1.1 Clone the fuel repo :**
137 git clone https://gerrit.opnfv.org/gerrit/fuel.git
139 **3.1.2 Checkout to the specific version of the branch to deploy by:**
143 git checkout stable/Colorado
145 **3.1.3 Building the Fuel iso :**
152 Provides the necessary options that are required to build an iso. Creates a ``customized iso`` as per the deployment needs.
159 (OR) Other way is to download the latest stable fuel iso from `here`_.
161 .. _here: http://artifacts.opnfv.org/fuel/colorado/opnfv-colorado.3.0.iso
163 **3.1.4 Creating a new deployment scenario**
165 ``(i). Naming the scenario file:``
167 Include the new deployment scenario yaml file in deploy/scenario/. The file name should adhere to the following format :
171 <ha | no-ha>_<SDN Controller>_<feature-1>_..._<feature-n>.yaml
173 ``(ii). The deployment configuration file should contain configuration metadata as stated below:``
177 deployment-scenario-metadata:
182 ``(iii). To include fuel plugins in the deployment configuration file, use the “stack-extentions” key:``
188 - module: fuel-plugin-collectd-ceilometer
189 module-config-name: fuel-barometer
190 module-config-version: 1.0.0
191 module-config-override:
192 #module-config overrides
195 The “module-config-name” and “module-config-version” should be same as the name of plugin configuration file.
198 The “module-config-override” is used to configure the plugin by overrriding the corresponding keys in the plugin config yaml file present in ~/fuel/deploy/config/plugins/.
200 ``(iv). To configure the HA/No-Ha mode, network segmentation types and role to node assignments, use the “dea-override-config” key.``
208 net_segment_type: tun
211 interfaces: interfaces_1
212 role: mongo,controller,opendaylight
214 interfaces: interfaces_1
215 role: mongo,controller
217 interfaces: interfaces_1
218 role: mongo,controller
220 interfaces: interfaces_1
221 role: ceph-osd,compute
223 interfaces: interfaces_1
224 role: ceph-osd,compute
229 description: Configures Nova to store ephemeral volumes in RBD. This works best if Ceph is enabled for volumes and images, too. Enables live migration of all types of Ceph backed VMs (without this option, live migration will only work with VMs launched from Cinder volumes).
230 label: Ceph RBD for ephemeral volumes (Nova)
235 description: Configures Glance to use the Ceph RBD backend to store images.If enabled, this option will prevent Swift from installing.
236 label: Ceph RBD for images (Glance)
238 - settings:storage.images_vcenter.value == true: Only one Glance backend could be selected.
243 Under the “dea-override-config” should provide atleast {environment:{mode:'value},{net_segment_type:'value'}
244 and {nodes:1,2,...} and can also enable additional stack features such ceph,heat which overrides
245 corresponding keys in the dea_base.yaml and dea_pod_override.yaml.
247 ``(v). In order to configure the pod dha definition, use the “dha-override-config” key.``
249 The “dha-override-config” key is an optional key present at the ending of the scenario file.
251 ``(vi). The scenario.yaml file is used to map the short names of scenario's to the one or more deployment scenario configuration yaml files.``
253 The short scenario names should follow the scheme below:
257 [os]-[controller]-[feature]-[mode]-[option]
262 please note that this field is needed in order to select parent jobs to list and do blocking relations between them.
267 [controller]: mandatory
268 example values: nosdn, ocl, odl, onos
271 possible values: ha, noha
275 used for the scenarios those do not fit into naming scheme.
276 optional field in the short scenario name should not be included if there is no optional scenario.
282 2. os-nosdn-kvm_ovs_dpdk_bar-ha
285 Example of how short scenario names are mapped to configuration yaml files:
289 os-nosdn-kvm_ovs_dpdk-ha:
290 configfile: ha_nfv-kvm_nfv-ovs-dpdk_heat_ceilometer_scenario.yaml
294 - ( - ) used for separator of fields. [os-nosdn-kvm_ovs_dpdk-ha]
296 - ( _ ) used to separate the values belong to the same field. [os-nosdn-kvm_ovs_bar-ha].
298 **3.1.5 Deploying the scenario**
301 Command to deploy the os-nosdn-kvm_ovs_dpdk-ha scenario:
306 $ sudo ./deploy.sh -f -b file:///tmp/opnfv-fuel/deploy/config -l devel-pipeline -p default -s no-ha_nfv-kvm_nfv-ovsdpdk_heat_ceilometer_scenario.yaml -i file:///tmp/opnfv.iso
309 -b is used to specify the configuration directory
311 -i is used to specify the image downloaded from artifacts.
317 Check $ sudo ./deploy.sh -h for further information.
323 Install OPNFV-playground (the tool chain to deploy/test CI scenarios in fuel@opnfv, ):
328 $ git clone https://github.com/jonasbjurel/OPNFV-Playground.git
329 $ cd OPNFV-Playground/ci_fuel_opnfv/
331 - Follow the README.rst in this ~/OPNFV-Playground/ci_fuel_opnfv sub-holder to complete all necessary installation and setup.
332 - Section “RUNNING THE PIPELINE” in README.rst explain how to use this ci_pipeline to deploy/test CI test scenarios, you can also use
336 ./ci_pipeline.sh --help ##to learn more options.
340 ``3.2.1 Downgrade paramiko package from 2.x.x to 1.10.0``
342 The paramiko package 2.x.x doesn’t work with OPNFV-playground tool chain now, Jira ticket FUEL - 188 has been raised for the same.
344 Check paramiko package version by following below steps in your system:
347 Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information.
349 >>> print paramiko.__version__
352 You will get the current paramiko package version, if it is 2.x.x, uninstall this version by
356 $ sudo pip uninstall paramiko
358 Ubuntu 14.04 LTS has python-paramiko package (1.10.0), install it by
362 $ sudo apt-get install python-paramiko
365 Verify it by following:
371 >>> print paramiko.__version__
375 ``3.2.2 Clone the fuel@opnfv``
377 Check out the specific version of specific branch of fuel@opnfv
382 $ git clone https://gerrit.opnfv.org/gerrit/fuel.git
384 $ git checkout stable/Colorado
387 ``3.2.3 Creating the scenario``
389 Implement the scenario file as described in 3.1.4
391 ``3.2.4 Deploying the scenario``
393 You can use the following command to start to deploy/test os-nosdn kvm_ovs_dpdk-noha and os-nosdn-kvm_ovs_dpdk-ha scenario
397 $ cd ~/OPNFV-Playground/ci_fuel_opnfv/
399 For os-nosdn-kvm_ovs_dpdk-ha :
403 $ ./ci_pipeline.sh -r ~/fuel -i /root/fuel.iso -B -n intel-sc -s os-nosdn-kvm_ovs_dpdk-ha
405 For os-nosdn-kvm_ovs_dpdk_bar-ha:
409 $ ./ci_pipeline.sh -r ~/fuel -i /root/fuel.iso -B -n intel-sc -s os-nosdn-kvm_ovs_dpdk_bar-ha
411 The “ci_pipeline.sh” first clones the local fuel repo, then deploys the
412 os-nosdn-kvm_ovs_dpdk-ha/os-nosdn-kvm_ovs_dpdk-noha scenario from the given ISO, and run Func test
413 and Yarstick test. The log of the deployment/test (ci.log) can be found in
414 ~/OPNFV-Playground/ci_fuel_opnfv/artifact/master/YYYY-MM-DD—HH.mm, where YYYY-MM-DD—HH.mm is the
415 date/time you start the “ci_pipeline.sh”.
421 Check $ ./ci_pipeline.sh -h for further information.
427 os-nosdn-kvm_ovs_dpdk-ha and os-nosdn-kvm_ovs_dpdk_bar-ha scenario can be executed from the jenkins project :
429 1. "fuel-os-nosdn-kvm_ovs_dpdk-ha-baremetal-daily-master" (os-nosdn-kvm_ovs_dpdk-ha)
430 2. "fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-baremetal-daily-master" (os-nosdn-kvm_ovs_dpdk_bar-ha)