the new kamailio build system€¦ · the build architecture distributed cloud infrastructure...

17
The new Kamailio Build System Andreas Granig <[email protected]>

Upload: others

Post on 25-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 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

The new Kamailio Build System

Andreas Granig<[email protected]>

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

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

How did it work in the past?● Bootstrap target chroots once● For each target, manually do:

– pkg/kamailio/deb/$target → debian/– dpkg­buildpackage ­S

– source packages → chroot– dpkg­buildpackage

– 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

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

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

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

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
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

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

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

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

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

You can replicate the setup

● 100% open source● General Information on Michael Prokop's blog

http://michael­prokop.at/blog/2014/03/25/building­debianubuntu­packages­on­ec2/

● Documented in our repo athttps://github.com/sipwise/kamailio­deb­jenkins

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

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

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

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

Page 17: 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

Questions?

<[email protected]>