1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
5 ========================
6 KVM4NFV SCENARIO-TESTING
7 ========================
12 This document describes the procedure to deploy/test KVM4NFV scenarios in a nested virtualization
13 environment. This has been verified with os-nosdn-kvm-ha, os-nosdn-kvm-noha,os-nosdn-kvm_ovs_dpdk-ha,
14 os-nosdn-kvm_ovs_dpdk-noha and os-nosdn-kvm_ovs_dpdk_bar-ha test scenarios.
19 +-----------------------------+---------------------------------------------+
21 | **Release** | **Features** |
23 +=============================+=============================================+
24 | | - Scenario Testing feature was not part of |
25 | Colorado | the Colorado release of KVMFORNFV |
27 +-----------------------------+---------------------------------------------+
28 | | - High Availability/No-High Availability |
29 | | deployment configuration of KVMFORNFV |
31 | Danube | - Multi-node setup with 3 controller and |
32 | | 2 compute nodes are deployed for HA |
33 | | - Multi-node setup with 1 controller and |
34 | | 3 compute nodes are deployed for NO-HA |
35 | | - Scenarios os-nosdn-kvm_ovs_dpdk-ha, |
36 | | os-nosdn-kvm_ovs_dpdk_bar-ha, |
37 | | os-nosdn-kvm_ovs_dpdk-noha, |
38 | | os-nosdn-kvm_ovs_dpdk_bar-noha |
40 +-----------------------------+---------------------------------------------+
45 The purpose of os-nosdn-kvm_ovs_dpdk-ha,os-nosdn-kvm_ovs_dpdk_bar-ha and
46 os-nosdn-kvm_ovs_dpdk-noha,os-nosdn-kvm_ovs_dpdk_bar-noha scenarios testing is to
47 test the High Availability/No-High Availability deployment and configuration of
48 OPNFV software suite with OpenStack and without SDN software.
50 This OPNFV software suite includes OPNFV KVMFORNFV latest software packages
51 for Linux Kernel and QEMU patches for achieving low latency and also OPNFV Barometer for traffic,
52 performance and platform monitoring.
54 High Availability feature is achieved by deploying OpenStack
55 multi-node setup with 1 Fuel-Master,3 controllers and 2 computes nodes.
57 No-High Availability feature is achieved by deploying OpenStack
58 multi-node setup with 1 Fuel-Master,1 controllers and 3 computes nodes.
60 KVMFORNFV packages will be installed on compute nodes as part of deployment.
61 The scenario testcase deploys a multi-node setup by using OPNFV Fuel deployer.
63 1. System pre-requisites
64 ------------------------
67 - HARD DISK - Minimum 500GB
68 - Linux OS installed and running
69 - Nested Virtualization enabled, which can be checked by,
73 $ cat /sys/module/kvm_intel/parameters/nested
76 $ cat /proc/cpuinfo | grep vmx
79 If Nested virtualization is disabled, enable it by,
85 $ echo Y > /sys/module/kvm_intel/parameters/nested
89 $ cat << EOF > /etc/modprobe.d/kvm_intel.conf
90 options kvm-intel nested=1
91 options kvm-intel enable_shadow_vmcs=1
92 options kvm-intel enable_apicv=1
93 options kvm-intel ept=1
95 $ cat << EOF > /etc/sysctl.d/98-rp-filter.conf
96 net.ipv4.conf.default.rp_filter = 0
97 net.ipv4.conf.all.rp_filter = 0
104 **2.1 Configuring Proxy**
105 ~~~~~~~~~~~~~~~~~~~~~~~~~~
108 Create an apt.conf file in /etc/apt if it doesn't exist. Used to set proxy for apt-get if working behind a proxy server.
112 Acquire::http::proxy "http://<username>:<password>@<proxy>:<port>/";
113 Acquire::https::proxy "https://<username>:<password>@<proxy>:<port>/";
114 Acquire::ftp::proxy "ftp://<username>:<password>@<proxy>:<port>/";
115 Acquire::socks::proxy "socks://<username>:<password>@<proxy>:<port>/";
118 Edit /etc/yum.conf to work behind a proxy server by adding the below line.
122 $ echo "proxy=http://<username>:<password>@<proxy>:<port>/" >> /etc/yum.conf
124 **2.2 Network Time Protocol (NTP) setup and configuration**
125 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
131 $ sudo apt-get update
132 $ sudo apt-get install -y ntp
134 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:
136 .. _link: /usr/share/doc/ntp-doc/html/accopt.html
141 fudge 127.127.1.0 stratum 10
143 Restart the ntp server to apply the changes
147 $ sudo service ntp restart
152 There are three ways of performing scenario testing,
154 - 3.2 OPNFV-Playground
155 - 3.3 Jenkins Project
160 **3.1.1 Clone the fuel repo :**
164 $ git clone https://gerrit.opnfv.org/gerrit/fuel.git
166 **3.1.2 Checkout to the specific version of the branch to deploy by:**
168 The default branch is master, to use a stable release-version use the below.,
171 To check the current branch
174 To check out a specific branch
175 $ git checkout stable/Colorado
177 **3.1.3 Building the Fuel iso :**
184 Provide the necessary options that are required to build an iso.
185 Create a ``customized iso`` as per the deployment needs.
192 (OR) Other way is to download the latest stable fuel iso from `here`_.
194 .. _here: http://artifacts.opnfv.org/fuel.html
198 http://artifacts.opnfv.org/fuel.html
200 **3.1.4 Creating a new deployment scenario**
202 ``(i). Naming the scenario file:``
204 Include the new deployment scenario yaml file in ~/fuel/deploy/scenario/. The file name should adhere to the following format:
208 <ha | no-ha>_<SDN Controller>_<feature-1>_..._<feature-n>.yaml
211 The deployment configuration file should contain configuration metadata as stated below:
215 deployment-scenario-metadata:
220 ``(iii). “stack-extentions” Module``
221 To include fuel plugins in the deployment configuration file, use the “stack-extentions” key:
227 - module: fuel-plugin-collectd-ceilometer
228 module-config-name: fuel-barometer
229 module-config-version: 1.0.0
230 module-config-override:
231 #module-config overrides
234 The “module-config-name” and “module-config-version” should be same as the name of plugin configuration file.
236 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/.
238 ``(iv). “dea-override-config” Module``
239 To configure the HA/No-HA mode, network segmentation types and role to node assignments, use the “dea-override-config” key.
247 net_segment_type: tun
250 interfaces: interfaces_1
251 role: mongo,controller,opendaylight
253 interfaces: interfaces_1
254 role: mongo,controller
256 interfaces: interfaces_1
257 role: mongo,controller
259 interfaces: interfaces_1
260 role: ceph-osd,compute
262 interfaces: interfaces_1
263 role: ceph-osd,compute
268 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).
269 label: Ceph RBD for ephemeral volumes (Nova)
274 description: Configures Glance to use the Ceph RBD backend to store images.If enabled, this option will prevent Swift from installing.
275 label: Ceph RBD for images (Glance)
277 - settings:storage.images_vcenter.value == true: Only one Glance backend could be selected.
282 Under the “dea-override-config” should provide atleast {environment:{mode:'value},{net_segment_type:'value'}
283 and {nodes:1,2,...} and can also enable additional stack features such ceph,heat which overrides
284 corresponding keys in the dea_base.yaml and dea_pod_override.yaml.
286 ``(v). “dha-override-config” Module``
287 In order to configure the pod dha definition, use the “dha-override-config” key.
288 This is an optional key present at the ending of the scenario file.
290 ``(vi). Mapping to short scenario name``
291 The scenario.yaml file is used to map the short names of scenario's to the one or more deployment scenario configuration yaml files.
292 The short scenario names should follow the scheme below:
296 [os]-[controller]-[feature]-[mode]-[option]
301 Please note that this field is needed in order to select parent jobs to list and do blocking relations between them.
306 [controller]: mandatory
307 example values: nosdn, ocl, odl, onos
310 possible values: ha, noha
314 Used for the scenarios those do not fit into naming scheme.
315 Optional field in the short scenario name should not be included if there is no optional scenario.
321 2. os-nosdn-kvm_ovs_dpdk_bar-ha
324 Example of how short scenario names are mapped to configuration yaml files:
328 os-nosdn-kvm_ovs_dpdk-ha:
329 configfile: ha_nfv-kvm_nfv-ovs-dpdk_heat_ceilometer_scenario.yaml
333 - ( - ) used for separator of fields. [os-nosdn-kvm_ovs_dpdk-ha]
335 - ( _ ) used to separate the values belong to the same field. [os-nosdn-kvm_ovs_bar-ha].
337 **3.1.5 Deploying the scenario**
340 Command to deploy the os-nosdn-kvm_ovs_dpdk-ha scenario:
345 $ sudo ./deploy.sh -f -b file:///tmp/opnfv-fuel/deploy/config -l devel-pipeline -p default -s ha_nfv-kvm_nfv-ovs-dpdk_heat_ceilometer_scenario.yaml -i file:///tmp/opnfv.iso
348 ``-b`` is used to specify the configuration directory
350 ``-f`` is used to re-deploy on the existing deployment
352 ``-i`` is used to specify the image downloaded from artifacts.
354 ``-l`` is used to specify the lab name
356 ``-p`` is used to specify POD name
358 ``-s`` is used to specify the scenario file
364 Check $ sudo ./deploy.sh -h for further information.
370 Install OPNFV-playground (the tool chain to deploy/test CI scenarios in fuel@opnfv, ):
375 $ git clone https://github.com/jonasbjurel/OPNFV-Playground.git
376 $ cd OPNFV-Playground/ci_fuel_opnfv/
378 - Follow the README.rst in this ~/OPNFV-Playground/ci_fuel_opnfv sub-holder to complete all necessary installation and setup.
379 - Section “RUNNING THE PIPELINE” in README.rst explain how to use this ci_pipeline to deploy/test CI test scenarios, you can also use
383 ./ci_pipeline.sh --help ##to learn more options.
387 ``3.2.1 Downgrade paramiko package from 2.x.x to 1.10.0``
389 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.
391 Check paramiko package version by following below steps in your system:
394 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.
396 >>> print paramiko.__version__
399 You will get the current paramiko package version, if it is 2.x.x, uninstall this version by
403 $ sudo pip uninstall paramiko
405 Ubuntu 14.04 LTS has python-paramiko package (1.10.0), install it by
409 $ sudo apt-get install python-paramiko
412 Verify it by following:
418 >>> print paramiko.__version__
422 ``3.2.2 Clone the fuel@opnfv``
424 Check out the specific version of specific branch of fuel@opnfv
429 $ git clone https://gerrit.opnfv.org/gerrit/fuel.git
431 By default it will be master branch, in-order to deploy on the Colorado/Danube branch, do:
432 $ git checkout stable/Danube
435 ``3.2.3 Creating the scenario``
437 Implement the scenario file as described in 3.1.4
439 ``3.2.4 Deploying the scenario``
441 You can use the following command to deploy/test os-nosdn kvm_ovs_dpdk-(no)ha and os-nosdn-kvm_ovs_dpdk_bar-(no)ha scenario
445 $ cd ~/OPNFV-Playground/ci_fuel_opnfv/
447 For os-nosdn-kvm_ovs_dpdk-ha :
451 $ ./ci_pipeline.sh -r ~/fuel -i /root/fuel.iso -B -n intel-sc -s os-nosdn-kvm_ovs_dpdk-ha
453 For os-nosdn-kvm_ovs_dpdk_bar-ha:
457 $ ./ci_pipeline.sh -r ~/fuel -i /root/fuel.iso -B -n intel-sc -s os-nosdn-kvm_ovs_dpdk_bar-ha
459 The “ci_pipeline.sh” first clones the local fuel repo, then deploys the
460 os-nosdn-kvm_ovs_dpdk-ha/os-nosdn-kvm_ovs_dpdk_bar-ha scenario from the given ISO, and run Functest
461 and Yarstick test. The log of the deployment/test (ci.log) can be found in
462 ~/OPNFV-Playground/ci_fuel_opnfv/artifact/master/YYYY-MM-DD—HH.mm, where YYYY-MM-DD—HH.mm is the
463 date/time you start the “ci_pipeline.sh”.
469 Check $ ./ci_pipeline.sh -h for further information.
475 os-nosdn-kvm_ovs_dpdk-(no)ha and os-nosdn-kvm_ovs_dpdk_bar-(no)ha scenario can be executed from the jenkins project :
478 1. "fuel-os-nosdn-kvm_ovs_dpdk-ha-baremetal-daily-master" (os-nosdn-kvm_ovs_dpdk-ha)
479 2. "fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-baremetal-daily-master" (os-nosdn-kvm_ovs_dpdk_bar-ha)
482 1. "fuel-os-nosdn-kvm_ovs_dpdk-noha-baremetal-daily-master" (os-nosdn-kvm_ovs_dpdk-noha)
483 2. "fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-baremetal-daily-master" (os-nosdn-kvm_ovs_dpdk_bar-noha)