jenkins with superpowers

Download Jenkins with superpowers

Post on 07-Jan-2017

918 views

Category:

Technology

0 download

Embed Size (px)

TRANSCRIPT

  • JENKINS WITH SUPER POWERS

    Alessandro Mazzoli am@ideato.it@alendmazz

    mailto:am@ideato.it?subject=

  • Why I should prefer on-premise Jenkins

    vs SaaS like Travis or CircleCI ?

  • Lets talk about $$$

    TravisCI startup plan costs 130$/monthly for 2 concurrent builds and several limits

    c4.xlarge( 4 core, 8GB RAM,1Gb/s) ~ 130$/monthly

    but I have to spend some time to configure Jenkins

  • Lets talk about $$$

    why should I keep my CI server always ON even outside work hours??!!

    here it comes on demand

    C4xlarge for 180h/720h ~ 32$

  • Lets talk about $$$

    but my sysadmin has to switch on/off every day??!!

    lot of waste and boring things!

  • Lets talk about $$$

    AWS CLI + CRON JOBS!!!20 9 * * 1-5 root/usr/local/bin/jenkins_on.sh50 19 * * 1-5 root /usr/local/bin/jenkins_off.sh

    code will be available on https://www.ideato.it/blog

    https://www.ideato.it/blog

  • Lets talk about heterogeneity

    we have heterogeneous projects

    PHP versions(5.4, 5.5,5.6) Elasticsearch(0.9->1.4) NodeJS .

    with TravisCI I can easily set several PHP versions, how can I run tests for these on JenkinsCI ?

  • Lets talk about heterogeneity

  • Lets talk about heterogeneity

  • Lets talk about heterogeneity

    docker images and reusability

  • Lets talk about heterogeneity

    docker images and reusability

  • Lets talk about heterogeneity

    docker images and reusability

  • a possible workflow

    All the additional software(ES, mongoDB..) required should be defined in a Dockerfile, committed inside the project repository

    and built on top of CI image

    Jenkins job will launch composer install,build the image

    and run tests inside the container

  • Our Dockerfile

    for i.e we need Elasticsearch 1.4.2 & Node.js

    run_tests will launch services inside the container

  • Our Dockerfile

    run_tests will launch services and tests through Idephix inside the container

  • Lets talk about performance

    but you build the Dockerfile every time?

    Not reallyDocker use AUFS & caching layers!!!

  • How do you manage the code??

    git pull inside the container or

    shared code through Docker Volumes??

  • first approach more clean and isolatebut Composer?

    Composer for large project is a bottleneck with our connectivity

    on c4.xlarge we have 1Gb/s

  • Lets go on Jenkins

  • Resuming.

    1 day for Jenkins setup 1/2 day for AWS cli cronjob

    ~ 550 (one time cost)

    + AWS c4.xlarge 32 x 12=384 = 934

    vs TravisCI Startup Plan 114 x 12 = 1368

  • Thanks for watching

    Useful links: http://getidephix.com/

    https://www.ideato.it/blog

    http://getidephix.com/https://www.ideato.it/blog