1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
5 ==============================
6 KVMFORNFV Scenario-Description
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.
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 **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 **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,
160 **1 Clone the fuel repo :**
164 $ git clone https://gerrit.opnfv.org/gerrit/fuel.git
166 **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 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 **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
212 The deployment configuration file should contain configuration metadata as stated below:
216 deployment-scenario-metadata:
221 ``(iii). “stack-extentions” Module``
223 To include fuel plugins in the deployment configuration file, use the “stack-extentions” key:
229 - module: fuel-plugin-collectd-ceilometer
230 module-config-name: fuel-barometer
231 module-config-version: 1.0.0
232 module-config-override:
233 #module-config overrides
236 The “module-config-name” and “module-config-version” should be same as the name of plugin configuration file.
238 The “module-config-override” is used to configure the plugin by overrriding the corresponding keys in
239 the plugin config yaml file present in ~/fuel/deploy/config/plugins/.
241 ``(iv). “dea-override-config” Module``
243 To configure the HA/No-HA mode, network segmentation types and role to node assignments, use the “dea-override-config” key.
251 net_segment_type: tun
254 interfaces: interfaces_1
255 role: mongo,controller,opendaylight
257 interfaces: interfaces_1
258 role: mongo,controller
260 interfaces: interfaces_1
261 role: mongo,controller
263 interfaces: interfaces_1
264 role: ceph-osd,compute
266 interfaces: interfaces_1
267 role: ceph-osd,compute
272 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).
273 label: Ceph RBD for ephemeral volumes (Nova)
278 description: Configures Glance to use the Ceph RBD backend to store images.If enabled, this option will prevent Swift from installing.
279 label: Ceph RBD for images (Glance)
281 - settings:storage.images_vcenter.value == true: Only one Glance backend could be selected.
286 Under the “dea-override-config” should provide atleast {environment:{mode:'value},{net_segment_type:'value'}
287 and {nodes:1,2,...} and can also enable additional stack features such ceph,heat which overrides
288 corresponding keys in the dea_base.yaml and dea_pod_override.yaml.
290 ``(v). “dha-override-config” Module``
292 In order to configure the pod dha definition, use the “dha-override-config” key.
293 This is an optional key present at the ending of the scenario file.
295 ``(vi). Mapping to short scenario name``
297 The scenario.yaml file is used to map the short names of scenario's to the one or more deployment scenario configuration yaml files.
298 The short scenario names should follow the scheme below:
302 [os]-[controller]-[feature]-[mode]-[option]
307 Please note that this field is needed in order to select parent jobs to list and do blocking relations between them.
312 [controller]: mandatory
313 example values: nosdn, ocl, odl, onos
316 possible values: ha, noha
320 Used for the scenarios those do not fit into naming scheme.
321 Optional field in the short scenario name should not be included if there is no optional scenario.
327 2. os-nosdn-kvm_ovs_dpdk_bar-ha
330 Example of how short scenario names are mapped to configuration yaml files:
334 os-nosdn-kvm_ovs_dpdk-ha:
335 configfile: ha_nfv-kvm_nfv-ovs-dpdk_heat_ceilometer_scenario.yaml
339 - ( - ) used for separator of fields. [os-nosdn-kvm_ovs_dpdk-ha]
341 - ( _ ) used to separate the values belong to the same field. [os-nosdn-kvm_ovs_bar-ha].
343 **5 Deploying the scenario**
345 Command to deploy the os-nosdn-kvm_ovs_dpdk-ha scenario:
350 $ 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
353 ``-b`` is used to specify the configuration directory
355 ``-f`` is used to re-deploy on the existing deployment
357 ``-i`` is used to specify the image downloaded from artifacts.
359 ``-l`` is used to specify the lab name
361 ``-p`` is used to specify POD name
363 ``-s`` is used to specify the scenario file
369 Check $ sudo ./deploy.sh -h for further information.
375 Install OPNFV-playground (the tool chain to deploy/test CI scenarios in fuel@opnfv, ):
380 $ git clone https://github.com/jonasbjurel/OPNFV-Playground.git
381 $ cd OPNFV-Playground/ci_fuel_opnfv/
383 - Follow the README.rst in this ~/OPNFV-Playground/ci_fuel_opnfv sub-holder to complete all necessary installation and setup.
384 - Section “RUNNING THE PIPELINE” in README.rst explain how to use this ci_pipeline to deploy/test CI test scenarios, you can also use
388 ./ci_pipeline.sh --help ##to learn more options.
392 ``1 Downgrade paramiko package from 2.x.x to 1.10.0``
394 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.
396 Check paramiko package version by following below steps in your system:
401 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.
404 >>> print paramiko.__version__
407 You will get the current paramiko package version, if it is 2.x.x, uninstall this version by
411 $ sudo pip uninstall paramiko
413 Ubuntu 14.04 LTS has python-paramiko package (1.10.0), install it by
417 $ sudo apt-get install python-paramiko
420 Verify it by following:
426 >>> print paramiko.__version__
430 ``2 Clone the fuel@opnfv``
432 Check out the specific version of specific branch of fuel@opnfv
437 $ git clone https://gerrit.opnfv.org/gerrit/fuel.git
439 By default it will be master branch, in-order to deploy on the Colorado/Danube branch, do:
440 $ git checkout stable/Danube
443 ``3 Creating the scenario``
445 Implement the scenario file as described in 3.1.4
447 ``4 Deploying the scenario``
449 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
453 $ cd ~/OPNFV-Playground/ci_fuel_opnfv/
455 For os-nosdn-kvm_ovs_dpdk-ha :
459 $ ./ci_pipeline.sh -r ~/fuel -i /root/fuel.iso -B -n intel-sc -s os-nosdn-kvm_ovs_dpdk-ha
461 For os-nosdn-kvm_ovs_dpdk_bar-ha:
465 $ ./ci_pipeline.sh -r ~/fuel -i /root/fuel.iso -B -n intel-sc -s os-nosdn-kvm_ovs_dpdk_bar-ha
467 The “ci_pipeline.sh” first clones the local fuel repo, then deploys the
468 os-nosdn-kvm_ovs_dpdk-ha/os-nosdn-kvm_ovs_dpdk_bar-ha scenario from the given ISO, and run Functest
469 and Yarstick test. The log of the deployment/test (ci.log) can be found in
470 ~/OPNFV-Playground/ci_fuel_opnfv/artifact/master/YYYY-MM-DD—HH.mm, where YYYY-MM-DD—HH.mm is the
471 date/time you start the “ci_pipeline.sh”.
477 Check $ ./ci_pipeline.sh -h for further information.
483 os-nosdn-kvm_ovs_dpdk-(no)ha and os-nosdn-kvm_ovs_dpdk_bar-(no)ha scenario can be executed from the jenkins project :
486 1. "fuel-os-nosdn-kvm_ovs_dpdk-ha-baremetal-daily-master" (os-nosdn-kvm_ovs_dpdk-ha)
487 2. "fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-baremetal-daily-master" (os-nosdn-kvm_ovs_dpdk_bar-ha)
490 1. "fuel-os-nosdn-kvm_ovs_dpdk-noha-virtual-daily-master" (os-nosdn-kvm_ovs_dpdk-noha)
491 2. "fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-virtual-daily-master" (os-nosdn-kvm_ovs_dpdk_bar-noha)