SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Jenkins User Conference Israel #jenkinsconf
Presenter Name
Ohad Basan
Presenter Company
Www.redhat.com
July 16, 2014
Managing jenkins with multiple
components project
#jenkinsconf
Who am I
● Ohad Basan
● CI engineer at Red Hat
● Member of the RHEV (Red Hat Enterprise
Virtualization) CI team
● Full time geek
Agenda
● Testing multiple components w/o loosing your
mind AKA 'Factory Flow'
● “Puppet for jenkins jobs”, possible?
● Giving developers access to automation infra
● Automate cool tasks in jenkins, foreman and
other devops tools via fabric
What is Factory flow?
Problems with testing multiple
components project at once
● Project is made out of multiple components that
are constantly changing and depend on each
other
● If two or more components change before the
tests being – you have no idea which
component broke the functionality
● We had to isolate the environment of each
component while keep the other component
stable.
What we had
●
Every job builds all the components
– Time consuming.
– Load on git.
– Error prone.
● In order to isolate the environments we created distinct jenkins
slaves for each component. Each job compiles its own product.
– Time Consuming
– Error prone.
– Increase load of git.
– Resource heavy. (many slaves)
Solution - FACTORY
Listener job > Polls for SCM changes.
Create custom rpms > Builds the relevant component
Add missing from stable – Links the compiled component with the rest of the missing stable
component and
Publish - publishes the files on a repository that contains all the needed components. (full project)
Automation jobs – Receive the repository link from the publisher, deploy it on the jenkins slaves
and run the tests.
How did we solve it? Multijob!
Multijob Jenkins Plugin
● Pros
– Really easy to configure
– Nice and comfortable view
● Cons
– Huge mess when running the the same job concurrently.
– Not flexible – can't dynamically chose which jobs to run.
– Can't pass dynamic parameters from upstream jobs.
Evolution – Build Flow Plugin
● Pros
– Very dynamic and flexible
– Highly maintained
● Cons
– View is not always comfortable (We customized it to
make it more readable)
– Graphs not always working
How do we configure so many jobs?
● We test a huge matrix
– Different operating systems versions
– Different product components
– Different product versions
– Backward compatible restrictions
– Layered products consumption (jboss, kvm)
Layered product
● Ovirt (Backend) > Application Server (JBOSS)
> Operating system (Red Hat Linux).
● VDSM (Hypervisor) > Libvirt > KVM (Kernel
Virtual Machine) > Operating system
● Red Hat does ALL the components and
EVERYTHING is changing all the time.
“Puppet for jenkins jobs”, possible?
Meet jenkins-job builder
● http://ci.openstack.org/jenkins_jobs.html
● This tool uses YAML files that act as template
file to generate jenkins jobs with different
values and configuration
Example of YAML file
Giving developers access to
automation infra
How can a dev test a patch?
● Unit tests
● Lint
● Very basic sanity
But for system tests, they need massive infra to
run it, almost impossible for a dev
Mission: Patches verification
● Every patch has to be verified before merging
● Some patches are really hard to verify and
require a complicated setup (several bare metal
machines, storage servers, complicated
configuration and preparation)
● The Solution...
Developer job
Developer job
● We give developers a special job to test their
patches with
● It will checkout their branch, build the
component that they chose and will run an
automation job that they can choose.
● Build flow to rescue.. (again!)
● Using the factory flow infrastructure.
Managing the system
● Keeping track on problems can get complicated
● Problems can originate in infrastructure
problems, automation problems, or product
problems.
● We are using python fabric task to maintain and
keep track on our environment.
What is fabric?
● Fabric is a python library and cli for easy
deployments through ssh
● http://www.fabfile.org/
● We use it as a wrapper for performing all sorts
of commands on our ci environment.
● We use Foreman api to use Fabric for foreman
tasks.
JENKINS TASKS
Foreman Tasks
one can perform a command on a
foreman query with fabric.
What is fabric?
● Fabric is a python library and cli for easy
deployments through ssh
● http://www.fabfile.org/
● We use it as a wrapper for performing all sorts
of commands on our ci environment.
● We use Foreman api to use Fabric for foreman
tasks.
Fabric view update tasks
● We keep track on automation problems with
JIRA ticket tracking system. For bugs we use
bugzilla.
● We have fabric task that keeps the jobs
description updated for tracking the bugs'
statuses. (using jira and bugzilla api)
● All you have to do is write BZ:XX in the
description and a cronjob with fabric will update
the status
The Future
● Provisioner – provisioning slaves dynamically at the
beginning of each test and then tearing them down at
the end. Provisioning from foreman hostgroup using an
openstack setup
● Nested virtualization – Run the hypervisor tests on a vm
using nested kvm.
● Adding more flow and components to the factory flow
● Adopting these solutions to other Red Hat products
Links
● Fabric - http://www.fabfile.org/
● Build flow - https://wiki.jenkins-
ci.org/display/JENKINS/Build+Flow+Plugin
● Multi job - https://wiki.jenkins-
ci.org/display/JENKINS/Multijob+Plugin
● Job builder - http://ci.openstack.org/jenkins-job-
builder/
● Foreman api - https://pypi.python.org/pypi/python-
foreman
Open Source
● Red Hat Enterprise Virtualization is using code
from the upstream project “oVirt” - an open
source virtual data center manager.
● http://www.ovirt.org
● Public gerrit is on gerrit.ovirt.org
● FEEL FREE TO CONTRIBUTE CODE!
● My E-mail: obasan@redhat.com
Jenkins User Conference Israel #jenkinsconf
Thank You To Our Sponsors
Platinum
Gold
Silver

Weitere ähnliche Inhalte

Was ist angesagt?

Master Continuous Delivery with CloudBees Jenkins Platform
Master Continuous Delivery with CloudBees Jenkins PlatformMaster Continuous Delivery with CloudBees Jenkins Platform
Master Continuous Delivery with CloudBees Jenkins Platform
dcjuengst
 
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSAutomated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Bamdad Dashtban
 
Jenkins Workflow Webinar - Dec 10, 2014
Jenkins Workflow Webinar - Dec 10, 2014Jenkins Workflow Webinar - Dec 10, 2014
Jenkins Workflow Webinar - Dec 10, 2014
CloudBees
 
Yale Jenkins Show and Tell
Yale Jenkins Show and TellYale Jenkins Show and Tell
Yale Jenkins Show and Tell
E. Camden Fisher
 

Was ist angesagt? (20)

Large scale automation with jenkins
Large scale automation with jenkinsLarge scale automation with jenkins
Large scale automation with jenkins
 
Puppet & Jenkins
Puppet & JenkinsPuppet & Jenkins
Puppet & Jenkins
 
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
 
Master Continuous Delivery with CloudBees Jenkins Platform
Master Continuous Delivery with CloudBees Jenkins PlatformMaster Continuous Delivery with CloudBees Jenkins Platform
Master Continuous Delivery with CloudBees Jenkins Platform
 
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSAutomated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
 
Jenkins Workflow Webinar - Dec 10, 2014
Jenkins Workflow Webinar - Dec 10, 2014Jenkins Workflow Webinar - Dec 10, 2014
Jenkins Workflow Webinar - Dec 10, 2014
 
Securing jenkins
Securing jenkinsSecuring jenkins
Securing jenkins
 
Javaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with JenkinsJavaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with Jenkins
 
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-CodeSD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
 
Continuous Delivery with Jenkins Workflow
Continuous Delivery with Jenkins WorkflowContinuous Delivery with Jenkins Workflow
Continuous Delivery with Jenkins Workflow
 
Rise of the Machines - Automate your Development
Rise of the Machines - Automate your DevelopmentRise of the Machines - Automate your Development
Rise of the Machines - Automate your Development
 
Rundeck + Nexus (from Nexus Live on June 5, 2014)
Rundeck + Nexus (from Nexus Live on June 5, 2014)Rundeck + Nexus (from Nexus Live on June 5, 2014)
Rundeck + Nexus (from Nexus Live on June 5, 2014)
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for Testing
 
Yale Jenkins Show and Tell
Yale Jenkins Show and TellYale Jenkins Show and Tell
Yale Jenkins Show and Tell
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
 
Getting started with Jenkins
Getting started with JenkinsGetting started with Jenkins
Getting started with Jenkins
 
Let’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsLet’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkins
 
Journée DevOps : De l'intégration continue au déploiement continu avec Jenkins
Journée DevOps : De l'intégration continue au déploiement continu avec JenkinsJournée DevOps : De l'intégration continue au déploiement continu avec Jenkins
Journée DevOps : De l'intégration continue au déploiement continu avec Jenkins
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Jenkins Introduction
Jenkins IntroductionJenkins Introduction
Jenkins Introduction
 

Ähnlich wie Jenkinsconf Presentation - Advance jenkins management with multiple projects.

Ähnlich wie Jenkinsconf Presentation - Advance jenkins management with multiple projects. (20)

DrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration ToolboxDrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration Toolbox
 
CIbox - OpenSource solution for making your #devops better
CIbox - OpenSource solution for making your #devops betterCIbox - OpenSource solution for making your #devops better
CIbox - OpenSource solution for making your #devops better
 
Devops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftDevops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShift
 
Continuous integration for open source distros v 3.0
Continuous integration for open source distros v 3.0Continuous integration for open source distros v 3.0
Continuous integration for open source distros v 3.0
 
MoldCamp - multidimentional testing workflow. CIBox.
MoldCamp  - multidimentional testing workflow. CIBox.MoldCamp  - multidimentional testing workflow. CIBox.
MoldCamp - multidimentional testing workflow. CIBox.
 
Jenkins 101: Continuos Integration with Jenkins
Jenkins 101: Continuos Integration with JenkinsJenkins 101: Continuos Integration with Jenkins
Jenkins 101: Continuos Integration with Jenkins
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
 
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
 
Steamlining your puppet development workflow
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflow
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
 
CI from scratch with Jenkins (EN)
CI from scratch with Jenkins (EN)CI from scratch with Jenkins (EN)
CI from scratch with Jenkins (EN)
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Developing and Testing with Enhanced Oscar
Developing and Testing with Enhanced OscarDeveloping and Testing with Enhanced Oscar
Developing and Testing with Enhanced Oscar
 
Puppet Camp Denver 2015: Developing and Testing with Enhanced Oscar
Puppet Camp Denver 2015: Developing and Testing with Enhanced OscarPuppet Camp Denver 2015: Developing and Testing with Enhanced Oscar
Puppet Camp Denver 2015: Developing and Testing with Enhanced Oscar
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with server
 
How to build a tool for operating Flink on Kubernetes
How to build a tool for operating Flink on KubernetesHow to build a tool for operating Flink on Kubernetes
How to build a tool for operating Flink on Kubernetes
 
Agile Software Development & Tools
Agile Software Development & ToolsAgile Software Development & Tools
Agile Software Development & Tools
 
Automation - fabric, django and more
Automation - fabric, django and moreAutomation - fabric, django and more
Automation - fabric, django and more
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scaling
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
 

Kürzlich hochgeladen

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 

Kürzlich hochgeladen (20)

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 

Jenkinsconf Presentation - Advance jenkins management with multiple projects.

  • 1. Jenkins User Conference Israel #jenkinsconf Presenter Name Ohad Basan Presenter Company Www.redhat.com July 16, 2014 Managing jenkins with multiple components project #jenkinsconf
  • 2. Who am I ● Ohad Basan ● CI engineer at Red Hat ● Member of the RHEV (Red Hat Enterprise Virtualization) CI team ● Full time geek
  • 3. Agenda ● Testing multiple components w/o loosing your mind AKA 'Factory Flow' ● “Puppet for jenkins jobs”, possible? ● Giving developers access to automation infra ● Automate cool tasks in jenkins, foreman and other devops tools via fabric
  • 5.
  • 6. Problems with testing multiple components project at once ● Project is made out of multiple components that are constantly changing and depend on each other ● If two or more components change before the tests being – you have no idea which component broke the functionality ● We had to isolate the environment of each component while keep the other component stable.
  • 7. What we had ● Every job builds all the components – Time consuming. – Load on git. – Error prone. ● In order to isolate the environments we created distinct jenkins slaves for each component. Each job compiles its own product. – Time Consuming – Error prone. – Increase load of git. – Resource heavy. (many slaves)
  • 8. Solution - FACTORY Listener job > Polls for SCM changes. Create custom rpms > Builds the relevant component Add missing from stable – Links the compiled component with the rest of the missing stable component and Publish - publishes the files on a repository that contains all the needed components. (full project) Automation jobs – Receive the repository link from the publisher, deploy it on the jenkins slaves and run the tests.
  • 9. How did we solve it? Multijob!
  • 10. Multijob Jenkins Plugin ● Pros – Really easy to configure – Nice and comfortable view ● Cons – Huge mess when running the the same job concurrently. – Not flexible – can't dynamically chose which jobs to run. – Can't pass dynamic parameters from upstream jobs.
  • 11. Evolution – Build Flow Plugin ● Pros – Very dynamic and flexible – Highly maintained ● Cons – View is not always comfortable (We customized it to make it more readable) – Graphs not always working
  • 12.
  • 13.
  • 14. How do we configure so many jobs? ● We test a huge matrix – Different operating systems versions – Different product components – Different product versions – Backward compatible restrictions – Layered products consumption (jboss, kvm)
  • 15. Layered product ● Ovirt (Backend) > Application Server (JBOSS) > Operating system (Red Hat Linux). ● VDSM (Hypervisor) > Libvirt > KVM (Kernel Virtual Machine) > Operating system ● Red Hat does ALL the components and EVERYTHING is changing all the time.
  • 16.
  • 17. “Puppet for jenkins jobs”, possible? Meet jenkins-job builder ● http://ci.openstack.org/jenkins_jobs.html ● This tool uses YAML files that act as template file to generate jenkins jobs with different values and configuration
  • 19.
  • 20. Giving developers access to automation infra How can a dev test a patch? ● Unit tests ● Lint ● Very basic sanity But for system tests, they need massive infra to run it, almost impossible for a dev
  • 21.
  • 22. Mission: Patches verification ● Every patch has to be verified before merging ● Some patches are really hard to verify and require a complicated setup (several bare metal machines, storage servers, complicated configuration and preparation) ● The Solution...
  • 24. Developer job ● We give developers a special job to test their patches with ● It will checkout their branch, build the component that they chose and will run an automation job that they can choose. ● Build flow to rescue.. (again!) ● Using the factory flow infrastructure.
  • 25.
  • 26. Managing the system ● Keeping track on problems can get complicated ● Problems can originate in infrastructure problems, automation problems, or product problems. ● We are using python fabric task to maintain and keep track on our environment.
  • 27. What is fabric? ● Fabric is a python library and cli for easy deployments through ssh ● http://www.fabfile.org/ ● We use it as a wrapper for performing all sorts of commands on our ci environment. ● We use Foreman api to use Fabric for foreman tasks.
  • 29.
  • 30. one can perform a command on a foreman query with fabric.
  • 31. What is fabric? ● Fabric is a python library and cli for easy deployments through ssh ● http://www.fabfile.org/ ● We use it as a wrapper for performing all sorts of commands on our ci environment. ● We use Foreman api to use Fabric for foreman tasks.
  • 32. Fabric view update tasks ● We keep track on automation problems with JIRA ticket tracking system. For bugs we use bugzilla. ● We have fabric task that keeps the jobs description updated for tracking the bugs' statuses. (using jira and bugzilla api) ● All you have to do is write BZ:XX in the description and a cronjob with fabric will update the status
  • 33.
  • 34. The Future ● Provisioner – provisioning slaves dynamically at the beginning of each test and then tearing them down at the end. Provisioning from foreman hostgroup using an openstack setup ● Nested virtualization – Run the hypervisor tests on a vm using nested kvm. ● Adding more flow and components to the factory flow ● Adopting these solutions to other Red Hat products
  • 35. Links ● Fabric - http://www.fabfile.org/ ● Build flow - https://wiki.jenkins- ci.org/display/JENKINS/Build+Flow+Plugin ● Multi job - https://wiki.jenkins- ci.org/display/JENKINS/Multijob+Plugin ● Job builder - http://ci.openstack.org/jenkins-job- builder/ ● Foreman api - https://pypi.python.org/pypi/python- foreman
  • 36. Open Source ● Red Hat Enterprise Virtualization is using code from the upstream project “oVirt” - an open source virtual data center manager. ● http://www.ovirt.org ● Public gerrit is on gerrit.ovirt.org ● FEEL FREE TO CONTRIBUTE CODE! ● My E-mail: obasan@redhat.com
  • 37.
  • 38. Jenkins User Conference Israel #jenkinsconf Thank You To Our Sponsors Platinum Gold Silver