the new kamailio build system€¦ · the build architecture distributed cloud infrastructure...
TRANSCRIPT
![Page 2: The new Kamailio Build System€¦ · The Build Architecture Distributed Cloud Infrastructure Jenkins-Master on EC2 m1.small poll git.sip-router.org for changes source & repos jobs](https://reader030.vdocuments.net/reader030/viewer/2022041109/5f0d21477e708231d438d3bf/html5/thumbnails/2.jpg)
deb.kamailio.org
squeeze, wheezy, jessie
Precise
stable nightly4.1, 4.0, 3.3 master, 4.1, 4.0, 3.3
amd64 i386
![Page 3: The new Kamailio Build System€¦ · The Build Architecture Distributed Cloud Infrastructure Jenkins-Master on EC2 m1.small poll git.sip-router.org for changes source & repos jobs](https://reader030.vdocuments.net/reader030/viewer/2022041109/5f0d21477e708231d438d3bf/html5/thumbnails/3.jpg)
How did it work in the past?● Bootstrap target chroots once● For each target, manually do:
– pkg/kamailio/deb/$target → debian/– dpkgbuildpackage S
– source packages → chroot– dpkgbuildpackage
– reprepro
● For each new release, resulting in– Non-reproducable builds– Potentially broken dependencies– Still, better than nothing!
![Page 4: The new Kamailio Build System€¦ · The Build Architecture Distributed Cloud Infrastructure Jenkins-Master on EC2 m1.small poll git.sip-router.org for changes source & repos jobs](https://reader030.vdocuments.net/reader030/viewer/2022041109/5f0d21477e708231d438d3bf/html5/thumbnails/4.jpg)
Continuous Integration to the rescue
● Jenkins CI● Jenkins-debian-glue
Pardon, what?
![Page 5: The new Kamailio Build System€¦ · The Build Architecture Distributed Cloud Infrastructure Jenkins-Master on EC2 m1.small poll git.sip-router.org for changes source & repos jobs](https://reader030.vdocuments.net/reader030/viewer/2022041109/5f0d21477e708231d438d3bf/html5/thumbnails/5.jpg)
A Primer to Continuous Integration
![Page 6: The new Kamailio Build System€¦ · The Build Architecture Distributed Cloud Infrastructure Jenkins-Master on EC2 m1.small poll git.sip-router.org for changes source & repos jobs](https://reader030.vdocuments.net/reader030/viewer/2022041109/5f0d21477e708231d438d3bf/html5/thumbnails/6.jpg)
A brief intro to Jenkins CI
● An application that monitors executions of repeated jobs
● Specifically for– Building and testing of software projects– Monitoring executions of external jobs
![Page 7: The new Kamailio Build System€¦ · The Build Architecture Distributed Cloud Infrastructure Jenkins-Master on EC2 m1.small poll git.sip-router.org for changes source & repos jobs](https://reader030.vdocuments.net/reader030/viewer/2022041109/5f0d21477e708231d438d3bf/html5/thumbnails/7.jpg)
How Jenkins CI works (in theory)
unittests
sourcebuild
binarybuild
packagebuild
integrationtests
repositoryupdate
git pushtrigger
Catch errors early and often!
![Page 8: The new Kamailio Build System€¦ · The Build Architecture Distributed Cloud Infrastructure Jenkins-Master on EC2 m1.small poll git.sip-router.org for changes source & repos jobs](https://reader030.vdocuments.net/reader030/viewer/2022041109/5f0d21477e708231d438d3bf/html5/thumbnails/8.jpg)
![Page 9: The new Kamailio Build System€¦ · The Build Architecture Distributed Cloud Infrastructure Jenkins-Master on EC2 m1.small poll git.sip-router.org for changes source & repos jobs](https://reader030.vdocuments.net/reader030/viewer/2022041109/5f0d21477e708231d438d3bf/html5/thumbnails/9.jpg)
Woah, hold on for a second!
![Page 10: The new Kamailio Build System€¦ · The Build Architecture Distributed Cloud Infrastructure Jenkins-Master on EC2 m1.small poll git.sip-router.org for changes source & repos jobs](https://reader030.vdocuments.net/reader030/viewer/2022041109/5f0d21477e708231d438d3bf/html5/thumbnails/10.jpg)
How it works for Kamailio today
nightlybuild
releasesand
snapshots
newcommits
found
newtags
found
![Page 11: The new Kamailio Build System€¦ · The Build Architecture Distributed Cloud Infrastructure Jenkins-Master on EC2 m1.small poll git.sip-router.org for changes source & repos jobs](https://reader030.vdocuments.net/reader030/viewer/2022041109/5f0d21477e708231d438d3bf/html5/thumbnails/11.jpg)
The Build Architecture
● Currently four types of jobs
sourcejobs
binariesjobs
piupartsjobs
reposjobs
~3h overall build time per release for all targets and architectures(i386 and amd64 for Debian squeezy, wheezy and jessie and Ubuntu Precise)
![Page 12: The new Kamailio Build System€¦ · The Build Architecture Distributed Cloud Infrastructure Jenkins-Master on EC2 m1.small poll git.sip-router.org for changes source & repos jobs](https://reader030.vdocuments.net/reader030/viewer/2022041109/5f0d21477e708231d438d3bf/html5/thumbnails/12.jpg)
The Build Architecture● Distributed Cloud Infrastructure
Jenkins-Masteron
EC2 m1.small
poll git.sip-router.org for changes
source & reposjobs fire up
Jenkins-Slaves
Jenkins-Slaveon
EC2 m1.large
binaries & piupartsjobs
Jenkins-Slaveon
EC2 m1.large
binaries & piupartsjobs
Jenkins-Slaveon
EC2 m1.large
binaries & piupartsjobs
Jenkins-Slaveon
EC2 m1.large
binaries & piupartsjobs
![Page 13: The new Kamailio Build System€¦ · The Build Architecture Distributed Cloud Infrastructure Jenkins-Master on EC2 m1.small poll git.sip-router.org for changes source & repos jobs](https://reader030.vdocuments.net/reader030/viewer/2022041109/5f0d21477e708231d438d3bf/html5/thumbnails/13.jpg)
You can replicate the setup
● 100% open source● General Information on Michael Prokop's blog
http://michaelprokop.at/blog/2014/03/25/buildingdebianubuntupackagesonec2/
● Documented in our repo athttps://github.com/sipwise/kamailiodebjenkins
![Page 14: The new Kamailio Build System€¦ · The Build Architecture Distributed Cloud Infrastructure Jenkins-Master on EC2 m1.small poll git.sip-router.org for changes source & repos jobs](https://reader030.vdocuments.net/reader030/viewer/2022041109/5f0d21477e708231d438d3bf/html5/thumbnails/14.jpg)
What's next?● Build per push only makes sense with testing● Improve overall test coverage● Introduce lint/static tests● Introduce long-term tests
(mem leaks, performance degrations)● Improve and automate system integration tests
(black-box tests of module functions)
![Page 15: The new Kamailio Build System€¦ · The Build Architecture Distributed Cloud Infrastructure Jenkins-Master on EC2 m1.small poll git.sip-router.org for changes source & repos jobs](https://reader030.vdocuments.net/reader030/viewer/2022041109/5f0d21477e708231d438d3bf/html5/thumbnails/15.jpg)
What about Code Review?
● Do we want to use Gerrit?– Everybody pushes branches to
Gerrit – Jenkins signs it off if tests are ok– Core Devs review, iterate and
approve → automatic merge– Feedback and code in one place
![Page 16: The new Kamailio Build System€¦ · The Build Architecture Distributed Cloud Infrastructure Jenkins-Master on EC2 m1.small poll git.sip-router.org for changes source & repos jobs](https://reader030.vdocuments.net/reader030/viewer/2022041109/5f0d21477e708231d438d3bf/html5/thumbnails/16.jpg)
How you can help?● Let's start a discussion about what makes
sense● How to motivate ourselves to write tests?● Anyone with experience on anything mentioned
here willing to share experience?– Code tests/analysis– Gerrit use cases