continuous integration for open source distros v 3.0
DESCRIPTION
These are the slides of my talk at Foss.IN 2012 on Continuous Integration for Open Source Distribution ecosystems. I have covered how existing Continuous Integration efforts can be improved to ensure greate collaboration between open source projects, developers and distributions to make earlier rTRANSCRIPT
![Page 1: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/1.jpg)
Continuous Integration
For
Open Source Distributions
Sriram Narayanan
@sriramnrn
![Page 2: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/2.jpg)
About me
Belenix Tester + Developer
Thoughtworker
![Page 3: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/3.jpg)
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)
![Page 4: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/4.jpg)
Pain points for a Distro Maintainer
● Repeat Tasks
● Dependency Tracking and Management
● Manual Testing
![Page 5: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/5.jpg)
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
![Page 6: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/6.jpg)
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
![Page 7: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/7.jpg)
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)
![Page 8: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/8.jpg)
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
![Page 9: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/9.jpg)
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!
![Page 10: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/10.jpg)
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)
![Page 11: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/11.jpg)
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!
![Page 12: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/12.jpg)
Continuous Integration – What's missing
● Dependency Awareness
apr
httpd
subversion
Image Credits: http://cd-with-thoughtworks-go.blogspot.in/
![Page 13: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/13.jpg)
Why “make test” is not enough
● 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
./configure makemake make test package
![Page 14: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/14.jpg)
Testing
Unit
Service Layer(Integration)
UserInterface
The Test Pyramid – Mike Cohn
http://martinfowler.com/bliki/TestPyramid.html
![Page 15: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/15.jpg)
About Unit Tests
● Unit Tests● Requirements in executable form● Detect what exact functionality has broken
![Page 16: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/16.jpg)
About Integration Tests
● Service Level Tests● Is ComponentA correctly calling ComponentB?● Is ComponentA fulfilling its public API contract?
![Page 17: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/17.jpg)
About UI Level Tests
● Test End to End Functionality● e.g. Sahi based tests
![Page 18: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/18.jpg)
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”.
![Page 19: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/19.jpg)
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?
![Page 20: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/20.jpg)
CI in Belenix
● Distro tests + Consolidation level smoke testskernel
httpd
postgres
ssh
WebStack
nginx
python
httpd
vi Userland
shell
awkIntegration
Tests
kernel
AutomatedInstall
Post InstallTests
Distro + package levelsmoke tests
![Page 21: Continuous integration for open source distros v 3.0](https://reader034.vdocuments.mx/reader034/viewer/2022052618/554f9eefb4c90586258b4853/html5/thumbnails/21.jpg)
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