Download - The challenge - testing the oVirt project
![Page 1: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/1.jpg)
1
Jenkins User Conference #jenkinsconf
July 5, 2012
The Challenge:
Testing the oVirt Project
Eyal Edri
Software Engineer
Red Hat Virtualization Management
2012
Herzelia, July 5 2012
![Page 2: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/2.jpg)
2
Jenkins User Conference #jenkinsconf
July 5, 2012
● Introduction
● The Problem – How to test a Virtualization project
● The Solution – Integration & Provisioning
● The Building Blocks
● oVirt – the open virtualization project
● Puppet – configuration management
● Foreman – machine life cycle management
● Jenkins job test case
● Videos & screenshots
● Summary
● Q&A
Agenda
![Page 3: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/3.jpg)
3
Jenkins User Conference #jenkinsconf
July 5, 2012
● Tired of spending time installing Jenkins slaves all day?
● Can't get budget from your manager to buy new hosts?
● Do you sleep in the network room waiting for hosts to be installed?
● Does your jenkins environment keep growing ?
Introduction
You need a Provisioning Framework!
![Page 4: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/4.jpg)
4
Jenkins User Conference #jenkinsconf
July 5, 2012The Complexity of testing a virtualization project...
Hours of manual work
Physical & Virtual Servers Multiple teams
collaboration and effort (IT, ENG, QA, Integration)
![Page 5: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/5.jpg)
5
Jenkins User Conference #jenkinsconf
July 5, 2012
OVIRT RHEVM 3.0 RHEVM 3.1
Project Version Ovirt 3.1 RHEVM 3.0 RHEVM 3.1
Host OS Fedora 16/17 RHEL 6.2/6.3 RHEL 6.3
Manager OS Fedora 16 RHEL 6.2/6.3 RHEL 6.3
Engine git gerrit.ovirt.org rhevm:master engine:build
Jboss Version 7.1 AS 5.1.2 EAP 6.0 EAP
JDK Vesrion OpenJDK 1.7.0 Sun JDK 6.0 OpenJDK 1.7.0
Maven Version 3.0.X 2.2.1 3.0.x
Vdsm-* rpm 4.9.6-0.63.git258c.. 4.9-112.10.el6.x86_64 4.9.6-6.el6.x86_64
Libvirt-* rpm 0.9.10-2.fc16 0.9.4-23.el6_2.4 0.9.10-9.el6
Small complexity matrix for testing oVirt/RHEVM
![Page 6: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/6.jpg)
6
Jenkins User Conference #jenkinsconf
July 5, 2012Why bother changing our CI testing framework?
Time Consuming
Costly
Error Prone
![Page 7: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/7.jpg)
7
Jenkins User Conference #jenkinsconf
July 5, 2012
● We combined Foreman, Puppet & oVirt with custom
python code to build a testing framework for Jenkins.
The Solution: Framework Introduction
● Foreman was used for provisioning the hosts or VMs
● Puppet configured hosts with our needed profiles.
● oVirt enabled us to create VMs for running the tests.
![Page 8: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/8.jpg)
8
Jenkins User Conference #jenkinsconf
July 5, 2012Framework: Building Blocks
![Page 9: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/9.jpg)
9
Jenkins User Conference #jenkinsconf
July 5, 2012
Facter produces a profile of each host, and makes system information available to Puppet as variables.
Puppet: Configuration Management
Client – Server implementation
'Adding users', 'installing packages', and 'updating server configurations'
GIT
![Page 10: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/10.jpg)
10
Jenkins User Conference #jenkinsconf
July 5, 2012
● The fundamental unit of modeling in Puppet is a resource.
● Resources can be: a file, a service, a package, or perhaps even a custom resource that you have developed.
Puppet: Resources
![Page 11: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/11.jpg)
11
Jenkins User Conference #jenkinsconf
July 5, 2012Foreman: Machine Life Cycle Management
![Page 12: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/12.jpg)
12
Jenkins User Conference #jenkinsconf
July 5, 2012
● Large scale, centralized management solution for server and desktop virtualization
● an opensource alternative to vCenter/vSphere
● Has multiple APIs:
● Python SDK
● Ruby gem
● Ovirt CLI
● REST
oVirt: Create and Manage Virtual Machines
![Page 13: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/13.jpg)
13
Jenkins User Conference #jenkinsconf
July 5, 2012
So what was the goal of this framework...
To be able to test a complex virtualization project in Jenkins with limited resources, time and effort.
And do it in a reproducible and scalable way.
OK,
So how do all these projects integrate with Jenkins?
Revising the purpose...
v
![Page 14: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/14.jpg)
14
Jenkins User Conference #jenkinsconf
July 5, 2012
● You guessed it... ,it had to be a Jenkins plugin.
● A Jenkins Foreman Plugin that will enable any job to request a resource (host or vm) with a specific profile.
Jenkins Integration: Foreman Plugin
![Page 15: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/15.jpg)
15
Jenkins User Conference #jenkinsconf
July 5, 2012Jenkins Foreman Plugin Mock-up: configure screen
● Configure foreman server details in Jenkins.
● All cloud related info will be set inside foreman
![Page 16: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/16.jpg)
16
Jenkins User Conference #jenkinsconf
July 5, 2012Foreman Plugin Mock
![Page 17: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/17.jpg)
17
Jenkins User Conference #jenkinsconf
July 5, 2012
● Foreman 'Physical Hosts Pool Feature'
The Bare (metal) Essentials...
RESERVED
FREE
![Page 18: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/18.jpg)
18
Jenkins User Conference #jenkinsconf
July 5, 2012Provision Host CLI
![Page 19: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/19.jpg)
19
Jenkins User Conference #jenkinsconf
July 5, 2012
● Show me the list of available profiles to use (which are in fact 'host-groups' in foreman)
Host Pool: show profiles
![Page 20: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/20.jpg)
20
Jenkins User Conference #jenkinsconf
July 5, 2012
● Show me the list of available hosts in pool currently free for use
Framework: Screen-shots – Command Line Interface
![Page 21: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/21.jpg)
21
Jenkins User Conference #jenkinsconf
July 5, 2012
● Show me the list of reserved hosts in pool currently used. (due to job/debug/error/static assignment)
Provision Host: show reserved hosts
![Page 22: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/22.jpg)
22
Jenkins User Conference #jenkinsconf
July 5, 2012
● Request 1 host with profile 'P-RHEL63-CANDIDATE'
Framework: Screen-shots – Command Line Interface
Client requests '1' physical host with 'RHEL 6.3' profile
Foreman finds 'cinteg27' server avaliable
Foreman applies new profile to the server & start provisioning
Client polls foreman for status
Client verifies ssh access to host
Host is ready to use with new profile (RESERVED)
![Page 23: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/23.jpg)
23
Jenkins User Conference #jenkinsconf
July 5, 2012Example Flow Diagram
oVirt contributor1 Sends a git patch in ovirt-engine for review
Gerrit code Review
2 Patch is reviewed, verified and approved 3 merge patch in the ovirt-engine master
branch
Poll SCM
4 Found new commit -> trigger job A
![Page 24: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/24.jpg)
24
Jenkins User Conference #jenkinsconf
July 5, 2012Example Flow Diagram in JenkinsJOB A JOB B
![Page 25: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/25.jpg)
25
Jenkins User Conference #jenkinsconf
July 5, 2012
LIVE DEMO
● Foreman provisioning
● Ovirt UI
● Foreman CLI code
DEMO
![Page 26: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/26.jpg)
26
Jenkins User Conference #jenkinsconf
July 5, 2012
Foreman web server provisioning..
● installing webserver via foreman
Videos Examples
![Page 27: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/27.jpg)
27
Jenkins User Conference #jenkinsconf
July 5, 2012oVirt: How does it look like?
![Page 28: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/28.jpg)
28
Jenkins User Conference #jenkinsconf
July 5, 2012Framework: Screen-shots - Hosts view
![Page 29: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/29.jpg)
29
Jenkins User Conference #jenkinsconf
July 5, 2012Framework: Screen-shots - Host-group view
Build a host-group by selecting existing puppet classes
![Page 30: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/30.jpg)
30
Jenkins User Conference #jenkinsconf
July 5, 2012Framework: Screen-shots - Hosts Statistics
![Page 31: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/31.jpg)
31
Jenkins User Conference #jenkinsconf
July 5, 2012
● Jenkins Foreman plugin
● Foreman (Jenkins) slaves manager plugin
● Jenkins Custom Testing Plugin
● Control Jenkins jobs via puppet (job as a resource)
● Extending Jenkinsapi python library
Present & Future
![Page 32: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/32.jpg)
32
Jenkins User Conference #jenkinsconf
July 5, 2012
● You can get into the action and join any of those projects, patches are welcome :)
Summary: Join the fun – Contribute!
Foreman https://github.com/theforeman/foreman
oVirt http://www.ovirt.org/project/community/
Puppet http://www.ovirt.org/project/community/
![Page 33: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/33.jpg)
33
Jenkins User Conference #jenkinsconf
July 5, 2012
● http://ovirt.org
● http://theforeman.org
● http://puppetlabs.com/community/overview/
● http://jenkins-ci.org
● https://github.com/eedri/foreman
Summary: Links
![Page 34: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/34.jpg)
34
Jenkins User Conference #jenkinsconf
July 5, 2012
Still awake..? Good!
Any Questions?
Q&A
![Page 35: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/35.jpg)
35
Jenkins User Conference #jenkinsconf
July 5, 2012Summary: Thanks
PlatinumSponsors
SilverSponsor
![Page 36: The challenge - testing the oVirt project](https://reader033.vdocuments.mx/reader033/viewer/2022060108/554f82feb4c9052a518b4dbb/html5/thumbnails/36.jpg)
36
Jenkins User Conference #jenkinsconf
July 5, 2012
Eyal edri
irc.freenode.net
#ovirt, #theforeman, #jenkins
Still got questions?