SlideShare a Scribd company logo
Continuous Integration
          For
Open Source Distributions


   Sriram Narayanan
   sriram@belenix.org
      @sriramnrn
About me


Belenix Tester + Developer



     Thoughtworker
Why we work on distros
●   Innovate
    ●   more versatile installation
    ●   faster boot up times
    ●   experimental drivers


●   Learn package management (Rolling updates!)


●   Learn how a distro works (LFS,BLFS + more)
Pain points for a Distro Maintainer
●   Repeat Tasks


●   Dependency Tracking and Management


●   Manual Testing
Pain points for a Distro Maintainer
●   Repeat Tasks
    ●   Track upstream changes and fixes
    ●   Regular Distro builds
    ●   Changelog and Release Notes
    ●   Documentation Updates


●   Dependency Tracking and Management


●   Manual Testing
Pain points for a Distro Maintainer
●   Repeat Tasks


●   Dependency Tracking and Management
    ●   Dependencies Expressed by not Tested
    ●   Insufficient Integration Tests
    ●   Heavily dependent on manual testing


●   Manual Testing
Pain points for a Distro Maintainer
●   Repeat Tasks
●   Dependency Tracking and Management
●   Manual Tests
    ●   Package Integration
    ●   Installation
    ●   Desktop Application Functionality
    ●   Service Functionality


    ●   Testing at too many levels
    ●   Not just exploratory (More exploratory is good)
Continuous Integration - Basics
●   “Integrate changes continuously”
●   Checkout source, make, make test, package
●   Usual Implementation
    ●   Automated Agents that perform tasks
    ●   Farm of Agents depending upon scale and budget
         –   Great for packaging multiple apps in parallel
         –   Parallel Tests
Continuous Integration - Benefits
●   Detect issues earlier
●   Package software earlier
●   Automate various tasks
    ●   Packaging
    ●   Testing
    ●   Integration
    ●   Generate ChangeLog + Release Notes skeleton
    ●   Pending Documentation Hints to Documentation
        Team
    ●   Build the ISO!
Continuous Integration Today
●   Isolated build environments
    ●   Based on chroot jails
    ●   Used by Fedora, Debian, Suse, et al
●   Continuous Integration servers
    ●   Jenkins/Hudson
    ●   Koji
    ●   Others (distro specific)
Continuous Integration
               – What's missing
●   Dependency awareness
    ●   A “Green” upstream should trigger downstream
        builds
    ●   Complex Dependency graph builds and tests
    ●   Prevents Automated Consolidation Releases



●   A Variety of Testing
    ●   “make test” is not enough!
Continuous Integration
                   – What's missing
 ●   Dependency Awareness
                                                                 httpd
                                                         apr

                                                               subversion




Image Credits: http://cd-with-thoughtworks-go.blogspot.in/
Why “make test” is not enough
        ./configure           make          make test          package



●   Tests the app only on the compiled system
●   No tests post installation
    ●    Packaging occurs after make test
    ●    Packaging errors are not detected
          –   Incorrect placement, ownership and permissions
          –   Conflicting requirements
          –   Missing files
●   Integration Tests needed
Testing


The Test Pyramid – Mike Cohn

                                        User
                                      Interface



                                    Service Layer
                                     (Integration)



                                         Unit



                    http://martinfowler.com/bliki/TestPyramid.html
About Unit Tests
●   Unit Tests
    ●   Requirements in executable form
    ●   Detect what exact functionality has broken
About Integration Tests


●   Service Level Tests
    ●   Is ComponentA correctly calling ComponentB?
    ●   Is ComponentA fulfilling its public API contract?
About UI Level Tests


●   Test End to End Functionality
    ●   e.g. Sahi based tests
What Tests tell you


●   UI Tests - “Something in this feature broke”


●   Integration Tests - “Component B returned an
    unexpected response to Component A”


●   Unit Tests - “When we introduce functionality
    requirement #13 into Component B, then our
    code causes requirements #7 and #9 to break”.
Post – Installation Integration Tests
●   CentOS package level tests
    ●   A good start!


●   Some useful tests for distro maintainers
        –   Is httpd able to serve files ? (selinux issues!)
        –   Is SSH accepting connections ?
        –   Did the network subsystem initialize correctly?
        –   Did the installer set the MBR + active partition correctly?
        –   Is the DNS server accepting queries ?
    ●   Is the application behaving as required?
CI in Belenix
 nginx
  httpd

postgres   WebStack
                                             Distro + package level
python                                     smoke tests


 shell
  httpd

   vi      Userland
                        Integration       Automated       Post Install
  awk                      Tests            Install         Tests



             ssh
                                      ●   Distro tests +
                                          Consolidation level
            kernel
                                          smoke tests
Roadmap - CI and Belenix
●   Package early
●   Consolidations – kernel, userland, subsystems
    (storage, firewall, load balancer)
●   Custom distros – CoreOS, storage, firewall,
    load balancer
    ●   Each with its own functional test suite!
●   CI for open source projects that we bundle
    ●   Potential inter-distro inter-project collaboration
Thanks!


www.belenix.org


   @belenix


 @sriramNRN

More Related Content

PPTX
Jenkins presentation
PDF
2013 10-28 php ug presentation - ci using phing and hudson
PDF
Jenkins Pipeline Tutorial | Continuous Delivery Pipeline Using Jenkins | DevO...
PDF
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
PPTX
Java build tools
PPTX
Pipeline as code using Jenkins -Ministry of Testing
PPTX
Jenkins days workshop pipelines - Eric Long
PDF
Jenkins Declarative Pipelines 101
Jenkins presentation
2013 10-28 php ug presentation - ci using phing and hudson
Jenkins Pipeline Tutorial | Continuous Delivery Pipeline Using Jenkins | DevO...
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
Java build tools
Pipeline as code using Jenkins -Ministry of Testing
Jenkins days workshop pipelines - Eric Long
Jenkins Declarative Pipelines 101

What's hot (20)

PPTX
PPTX
Ci jenkins maven svn
PDF
Hacking Jenkins
PPTX
Pipeline as code - new feature in Jenkins 2
PPTX
Embrace Maven
ODP
Jenkins 101: Continuos Integration with Jenkins
PDF
Jenkins Meetup Pune
ODP
Pipeline based deployments on Jenkins
PDF
Codifying the Build and Release Process with a Jenkins Pipeline Shared Library
PDF
Puppet & Jenkins
PDF
Deploying software at Scale
PDF
7 Habits of Highly Effective Jenkins Users
PDF
JavaOne 2016 - Pipeline as code
PPTX
CI/CD on Android project via Jenkins Pipeline
PPTX
Continuous integration with teamcity
PDF
Continuous Development Pipeline
PDF
Building an Extensible, Resumable DSL on Top of Apache Groovy
PDF
Jenkins : Pipeline As Code
PPTX
Supermondays: Jenkins CI lightning talk
PPTX
Visual Regression Testing: In search of an Ember solution
Ci jenkins maven svn
Hacking Jenkins
Pipeline as code - new feature in Jenkins 2
Embrace Maven
Jenkins 101: Continuos Integration with Jenkins
Jenkins Meetup Pune
Pipeline based deployments on Jenkins
Codifying the Build and Release Process with a Jenkins Pipeline Shared Library
Puppet & Jenkins
Deploying software at Scale
7 Habits of Highly Effective Jenkins Users
JavaOne 2016 - Pipeline as code
CI/CD on Android project via Jenkins Pipeline
Continuous integration with teamcity
Continuous Development Pipeline
Building an Extensible, Resumable DSL on Top of Apache Groovy
Jenkins : Pipeline As Code
Supermondays: Jenkins CI lightning talk
Visual Regression Testing: In search of an Ember solution
Ad

Similar to Continuous integration for open source distros v 3.0 (20)

PDF
Let’s start Continuous Integration with jenkins
KEY
Continuous Integration In A PHP World
PDF
Ashwini - Effective use of CI by QA
PDF
Continuous integration (eng)
PDF
Enabling Agile Testing Through Continuous Integration Agile2009
ZIP
Introduction To Continuous Integration
PDF
Ci tips and_tricks_linards_liepins
PDF
What is Continuous Integration Testing.pdf
PDF
Practical CI/CD Insights: Avoiding Pitfalls in Implementations
PDF
Agile Bodensee - Testautomation & Continuous Delivery Workshop
PDF
What is Continuous Integration_ - A Comprehensive Guide.pdf
PPT
PowerPoint Presentation
PDF
Continuous Integration In Php
PPTX
Linuxtag 2012 - continuous delivery - dream to reality
PDF
Continuous Testing
PDF
Building Security in Using CI
PDF
Core Principles Of Ci
PDF
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
PDF
Quickstart for continuous integration
PDF
Into The Box 2018 CI Deep Dive
Let’s start Continuous Integration with jenkins
Continuous Integration In A PHP World
Ashwini - Effective use of CI by QA
Continuous integration (eng)
Enabling Agile Testing Through Continuous Integration Agile2009
Introduction To Continuous Integration
Ci tips and_tricks_linards_liepins
What is Continuous Integration Testing.pdf
Practical CI/CD Insights: Avoiding Pitfalls in Implementations
Agile Bodensee - Testautomation & Continuous Delivery Workshop
What is Continuous Integration_ - A Comprehensive Guide.pdf
PowerPoint Presentation
Continuous Integration In Php
Linuxtag 2012 - continuous delivery - dream to reality
Continuous Testing
Building Security in Using CI
Core Principles Of Ci
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
Quickstart for continuous integration
Into The Box 2018 CI Deep Dive
Ad

More from Sriram Narayanan (6)

PDF
Making cd happen thought works talks tech 27 march 2019
PDF
PDF
Migrating your it policies to the cloud
PDF
Segregation of Duties and Continuous Delivery
PPTX
Linux – routing and firewall for beginners v 1.0
ODP
Build your own san
Making cd happen thought works talks tech 27 march 2019
Migrating your it policies to the cloud
Segregation of Duties and Continuous Delivery
Linux – routing and firewall for beginners v 1.0
Build your own san

Continuous integration for open source distros v 3.0

  • 1. Continuous Integration For Open Source Distributions Sriram Narayanan [email protected] @sriramnrn
  • 2. About me Belenix Tester + Developer Thoughtworker
  • 3. Why we work on distros ● Innovate ● more versatile installation ● faster boot up times ● experimental drivers ● Learn package management (Rolling updates!) ● Learn how a distro works (LFS,BLFS + more)
  • 4. Pain points for a Distro Maintainer ● Repeat Tasks ● Dependency Tracking and Management ● Manual Testing
  • 5. Pain points for a Distro Maintainer ● Repeat Tasks ● Track upstream changes and fixes ● Regular Distro builds ● Changelog and Release Notes ● Documentation Updates ● Dependency Tracking and Management ● Manual Testing
  • 6. Pain points for a Distro Maintainer ● Repeat Tasks ● Dependency Tracking and Management ● Dependencies Expressed by not Tested ● Insufficient Integration Tests ● Heavily dependent on manual testing ● Manual Testing
  • 7. Pain points for a Distro Maintainer ● Repeat Tasks ● Dependency Tracking and Management ● Manual Tests ● Package Integration ● Installation ● Desktop Application Functionality ● Service Functionality ● Testing at too many levels ● Not just exploratory (More exploratory is good)
  • 8. Continuous Integration - Basics ● “Integrate changes continuously” ● Checkout source, make, make test, package ● Usual Implementation ● Automated Agents that perform tasks ● Farm of Agents depending upon scale and budget – Great for packaging multiple apps in parallel – Parallel Tests
  • 9. Continuous Integration - Benefits ● Detect issues earlier ● Package software earlier ● Automate various tasks ● Packaging ● Testing ● Integration ● Generate ChangeLog + Release Notes skeleton ● Pending Documentation Hints to Documentation Team ● Build the ISO!
  • 10. Continuous Integration Today ● Isolated build environments ● Based on chroot jails ● Used by Fedora, Debian, Suse, et al ● Continuous Integration servers ● Jenkins/Hudson ● Koji ● Others (distro specific)
  • 11. Continuous Integration – What's missing ● Dependency awareness ● A “Green” upstream should trigger downstream builds ● Complex Dependency graph builds and tests ● Prevents Automated Consolidation Releases ● A Variety of Testing ● “make test” is not enough!
  • 12. Continuous Integration – What's missing ● Dependency Awareness httpd apr subversion Image Credits: http://cd-with-thoughtworks-go.blogspot.in/
  • 13. Why “make test” is not enough ./configure make make test package ● Tests the app only on the compiled system ● No tests post installation ● Packaging occurs after make test ● Packaging errors are not detected – Incorrect placement, ownership and permissions – Conflicting requirements – Missing files ● Integration Tests needed
  • 14. Testing The Test Pyramid – Mike Cohn User Interface Service Layer (Integration) Unit http://martinfowler.com/bliki/TestPyramid.html
  • 15. About Unit Tests ● Unit Tests ● Requirements in executable form ● Detect what exact functionality has broken
  • 16. About Integration Tests ● Service Level Tests ● Is ComponentA correctly calling ComponentB? ● Is ComponentA fulfilling its public API contract?
  • 17. About UI Level Tests ● Test End to End Functionality ● e.g. Sahi based tests
  • 18. What Tests tell you ● UI Tests - “Something in this feature broke” ● Integration Tests - “Component B returned an unexpected response to Component A” ● Unit Tests - “When we introduce functionality requirement #13 into Component B, then our code causes requirements #7 and #9 to break”.
  • 19. Post – Installation Integration Tests ● CentOS package level tests ● A good start! ● Some useful tests for distro maintainers – Is httpd able to serve files ? (selinux issues!) – Is SSH accepting connections ? – Did the network subsystem initialize correctly? – Did the installer set the MBR + active partition correctly? – Is the DNS server accepting queries ? ● Is the application behaving as required?
  • 20. CI in Belenix nginx httpd postgres WebStack Distro + package level python smoke tests shell httpd vi Userland Integration Automated Post Install awk Tests Install Tests ssh ● Distro tests + Consolidation level kernel smoke tests
  • 21. Roadmap - CI and Belenix ● Package early ● Consolidations – kernel, userland, subsystems (storage, firewall, load balancer) ● Custom distros – CoreOS, storage, firewall, load balancer ● Each with its own functional test suite! ● CI for open source projects that we bundle ● Potential inter-distro inter-project collaboration
  • 22. Thanks! www.belenix.org @belenix @sriramNRN