1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
7 ============================
8 KVM4NFV Scenario-Description
9 ============================
14 This document describes the procedure to deploy/test KVM4NFV scenarios in a nested virtualization
15 environment. This has been verified with os-nosdn-kvm-ha, os-nosdn-kvm-noha,os-nosdn-kvm_ovs_dpdk-ha,
16 os-nosdn-kvm_ovs_dpdk-noha and os-nosdn-kvm_ovs_dpdk_bar-ha test scenarios.
21 +-----------------------------+---------------------------------------------+
23 | **Release** | **Features** |
25 +=============================+=============================================+
26 | | - Scenario Testing feature was not part of |
27 | Colorado | the Colorado release of KVM4NFV |
29 +-----------------------------+---------------------------------------------+
30 | | - High Availability/No-High Availability |
31 | | deployment configuration of KVM4NFV |
33 | Danube | - Multi-node setup with 3 controller and |
34 | | 2 compute nodes are deployed for HA |
35 | | - Multi-node setup with 1 controller and |
36 | | 3 compute nodes are deployed for NO-HA |
37 | | - Scenarios os-nosdn-kvm_ovs_dpdk-ha, |
38 | | os-nosdn-kvm_ovs_dpdk_bar-ha, |
39 | | os-nosdn-kvm_ovs_dpdk-noha, |
40 | | os-nosdn-kvm_ovs_dpdk_bar-noha |
42 +-----------------------------+---------------------------------------------+
47 The purpose of os-nosdn-kvm_ovs_dpdk-ha,os-nosdn-kvm_ovs_dpdk_bar-ha and
48 os-nosdn-kvm_ovs_dpdk-noha,os-nosdn-kvm_ovs_dpdk_bar-noha scenarios testing is to
49 test the High Availability/No-High Availability deployment and configuration of
50 OPNFV software suite with OpenStack and without SDN software.
52 This OPNFV software suite includes OPNFV KVM4NFV latest software packages
53 for Linux Kernel and QEMU patches for achieving low latency and also OPNFV Barometer for traffic,
54 performance and platform monitoring.
56 High Availability feature is achieved by deploying OpenStack
57 multi-node setup with 1 Fuel-Master,3 controllers and 2 computes nodes.
59 No-High Availability feature is achieved by deploying OpenStack
60 multi-node setup with 1 Fuel-Master,1 controllers and 3 computes nodes.
62 KVM4NFV packages will be installed on compute nodes as part of deployment.
63 The scenario testcase deploys a multi-node setup by using OPNFV Fuel deployer.
69 - HARD DISK - Minimum 500GB
70 - Linux OS installed and running
71 - Nested Virtualization enabled, which can be checked by,
75 $ cat /sys/module/kvm_intel/parameters/nested
78 $ cat /proc/cpuinfo | grep vmx
81 If Nested virtualization is disabled, enable it by,
87 $ echo Y > /sys/module/kvm_intel/parameters/nested
91 $ cat << EOF > /etc/modprobe.d/kvm_intel.conf
92 options kvm-intel nested=1
93 options kvm-intel enable_shadow_vmcs=1
94 options kvm-intel enable_apicv=1
95 options kvm-intel ept=1
97 $ cat << EOF > /etc/sysctl.d/98-rp-filter.conf
98 net.ipv4.conf.default.rp_filter = 0
99 net.ipv4.conf.all.rp_filter = 0
106 **Configuring Proxy**
107 ~~~~~~~~~~~~~~~~~~~~~
110 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.
114 Acquire::http::proxy "http://<username>:<password>@<proxy>:<port>/";
115 Acquire::https::proxy "https://<username>:<password>@<proxy>:<port>/";
116 Acquire::ftp::proxy "ftp://<username>:<password>@<proxy>:<port>/";
117 Acquire::socks::proxy "socks://<username>:<password>@<proxy>:<port>/";
120 Edit /etc/yum.conf to work behind a proxy server by adding the below line.
124 $ echo "proxy=http://<username>:<password>@<proxy>:<port>/" >> /etc/yum.conf
126 **Network Time Protocol (NTP) setup and configuration**
127 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133 $ sudo apt-get update
134 $ sudo apt-get install -y ntp
136 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:
138 .. _link: /usr/share/doc/ntp-doc/html/accopt.html
143 fudge 127.127.1.0 stratum 10
145 Restart the ntp server to apply the changes
149 $ sudo service ntp restart
154 There are three ways of performing scenario testing,
162 **1 Clone the fuel repo :**
166 $ git clone https://gerrit.opnfv.org/gerrit/fuel.git
168 **2 Checkout to the specific version of the branch to deploy by:**
170 The default branch is master, to use a stable release-version use the below.,
173 To check the current branch
176 To check out a specific branch
177 $ git checkout stable/Colorado
179 **3 Building the Fuel iso :**
186 Provide the necessary options that are required to build an iso.
187 Create a ``customized iso`` as per the deployment needs.
194 (OR) Other way is to download the latest stable fuel iso from `here`_.
196 .. _here: http://artifacts.opnfv.org/fuel.html
200 http://artifacts.opnfv.org/fuel.html
202 **4 Creating a new deployment scenario**
204 ``(i). Naming the scenario file``
206 Include the new deployment scenario yaml file in ~/fuel/deploy/scenario/. The file name should adhere to the following format:
210 <ha | no-ha>_<SDN Controller>_<feature-1>_..._<feature-n>.yaml
214 The deployment configuration file should contain configuration metadata as stated below:
218 deployment-scenario-metadata:
223 ``(iii). “stack-extentions” Module``
225 To include fuel plugins in the deployment configuration file, use the “stack-extentions” key:
231 - module: fuel-plugin-collectd-ceilometer
232 module-config-name: fuel-barometer
233 module-config-version: 1.0.0
234 module-config-override:
235 #module-config overrides
238 The “module-config-name” and “module-config-version” should be same as the name of plugin configuration file.
240 The “module-config-override” is used to configure the plugin by overrriding the corresponding keys in
241 the plugin config yaml file present in ~/fuel/deploy/config/plugins/.
243 ``(iv). “dea-override-config” Module``
245 To configure the HA/No-HA mode, network segmentation types and role to node assignments, use the “dea-override-config” key.
253 net_segment_type: tun
256 interfaces: interfaces_1
257 role: mongo,controller,opendaylight
259 interfaces: interfaces_1
260 role: mongo,controller
262 interfaces: interfaces_1
263 role: mongo,controller
265 interfaces: interfaces_1
266 role: ceph-osd,compute
268 interfaces: interfaces_1
269 role: ceph-osd,compute
274 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).
275 label: Ceph RBD for ephemeral volumes (Nova)
280 description: Configures Glance to use the Ceph RBD backend to store images.If enabled, this option will prevent Swift from installing.
281 label: Ceph RBD for images (Glance)
283 - settings:storage.images_vcenter.value == true: Only one Glance backend could be selected.
288 Under the “dea-override-config” should provide atleast {environment:{mode:'value},{net_segment_type:'value'}
289 and {nodes:1,2,...} and can also enable additional stack features such ceph,heat which overrides
290 corresponding keys in the dea_base.yaml and dea_pod_override.yaml.
292 ``(v). “dha-override-config” Module``
294 In order to configure the pod dha definition, use the “dha-override-config” key.
295 This is an optional key present at the ending of the scenario file.
297 ``(vi). Mapping to short scenario name``
299 The scenario.yaml file is used to map the short names of scenario's to the one or more deployment scenario configuration yaml files.
300 The short scenario names should follow the scheme below:
304 [os]-[controller]-[feature]-[mode]-[option]
309 Please note that this field is needed in order to select parent jobs to list and do blocking relations between them.
314 [controller]: mandatory
315 example values: nosdn, ocl, odl, onos
318 possible values: ha, noha
322 Used for the scenarios those do not fit into naming scheme.
323 Optional field in the short scenario name should not be included if there is no optional scenario.
329 2. os-nosdn-kvm_ovs_dpdk_bar-ha
332 Example of how short scenario names are mapped to configuration yaml files:
336 os-nosdn-kvm_ovs_dpdk-ha:
337 configfile: ha_nfv-kvm_nfv-ovs-dpdk_heat_ceilometer_scenario.yaml
341 - ( - ) used for separator of fields. [os-nosdn-kvm_ovs_dpdk-ha]
343 - ( _ ) used to separate the values belong to the same field. [os-nosdn-kvm_ovs_bar-ha].
345 **5 Deploying the scenario**
347 Command to deploy the os-nosdn-kvm_ovs_dpdk-ha scenario:
352 $ 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
355 ``-b`` is used to specify the configuration directory
357 ``-f`` is used to re-deploy on the existing deployment
359 ``-i`` is used to specify the image downloaded from artifacts.
361 ``-l`` is used to specify the lab name
363 ``-p`` is used to specify POD name
365 ``-s`` is used to specify the scenario file
371 Check $ sudo ./deploy.sh -h for further information.
377 Install OPNFV-playground (the tool chain to deploy/test CI scenarios in fuel@opnfv, ):
382 $ git clone https://github.com/jonasbjurel/OPNFV-Playground.git
383 $ cd OPNFV-Playground/ci_fuel_opnfv/
385 - Follow the README.rst in this ~/OPNFV-Playground/ci_fuel_opnfv sub-holder to complete all necessary installation and setup.
386 - Section “RUNNING THE PIPELINE” in README.rst explain how to use this ci_pipeline to deploy/test CI test scenarios, you can also use
390 ./ci_pipeline.sh --help ##to learn more options.
394 ``1 Downgrade paramiko package from 2.x.x to 1.10.0``
396 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.
398 Check paramiko package version by following below steps in your system:
403 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.
406 >>> print paramiko.__version__
409 You will get the current paramiko package version, if it is 2.x.x, uninstall this version by
413 $ sudo pip uninstall paramiko
415 Ubuntu 14.04 LTS has python-paramiko package (1.10.0), install it by
419 $ sudo apt-get install python-paramiko
422 Verify it by following:
428 >>> print paramiko.__version__
432 ``2 Clone the fuel@opnfv``
434 Check out the specific version of specific branch of fuel@opnfv
439 $ git clone https://gerrit.opnfv.org/gerrit/fuel.git
441 By default it will be master branch, in-order to deploy on the Colorado/Danube branch, do:
442 $ git checkout stable/Danube
445 ``3 Creating the scenario``
447 Implement the scenario file as described in 3.1.4
449 ``4 Deploying the scenario``
451 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
455 $ cd ~/OPNFV-Playground/ci_fuel_opnfv/
457 For os-nosdn-kvm_ovs_dpdk-ha :
461 $ ./ci_pipeline.sh -r ~/fuel -i /root/fuel.iso -B -n intel-sc -s os-nosdn-kvm_ovs_dpdk-ha
463 For os-nosdn-kvm_ovs_dpdk_bar-ha:
467 $ ./ci_pipeline.sh -r ~/fuel -i /root/fuel.iso -B -n intel-sc -s os-nosdn-kvm_ovs_dpdk_bar-ha
469 The “ci_pipeline.sh” first clones the local fuel repo, then deploys the
470 os-nosdn-kvm_ovs_dpdk-ha/os-nosdn-kvm_ovs_dpdk_bar-ha scenario from the given ISO, and run Functest
471 and Yarstick test. The log of the deployment/test (ci.log) can be found in
472 ~/OPNFV-Playground/ci_fuel_opnfv/artifact/master/YYYY-MM-DD—HH.mm, where YYYY-MM-DD—HH.mm is the
473 date/time you start the “ci_pipeline.sh”.
479 Check $ ./ci_pipeline.sh -h for further information.
485 os-nosdn-kvm_ovs_dpdk-(no)ha and os-nosdn-kvm_ovs_dpdk_bar-(no)ha scenario can be executed from the jenkins project :
488 1. "fuel-os-nosdn-kvm_ovs_dpdk-ha-baremetal-daily-master" (os-nosdn-kvm_ovs_dpdk-ha)
489 2. "fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-baremetal-daily-master" (os-nosdn-kvm_ovs_dpdk_bar-ha)
492 1. "fuel-os-nosdn-kvm_ovs_dpdk-noha-virtual-daily-master" (os-nosdn-kvm_ovs_dpdk-noha)
493 2. "fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-virtual-daily-master" (os-nosdn-kvm_ovs_dpdk_bar-noha)