SlideShare a Scribd company logo
Continuous Integration
SaaS vs Jenkins in cloud
GLUTEN
FREE
Alessandro Mazzoli
alendmazz
am@ideato.it
Who am I?
sysadmin@ideato
AWS solution architect
Why I should prefer
on premise Jenkins
vs SaaS
like Travis or CircleCI?
What is Jenkins?
Jenkins is a famous
cross-platform,
continuous integration
and continuous delivery
application
cross platform
support SCM tools
released under MIT license
Java based (war file)
job execution monitoring
reports, notifications
rich of plugins(Docker,
Github, Slack, Build Pipeline)
hooks, triggers, conditionals
Continuous Integration: SaaS vs Jenkins in Cloud
Let’s talk about $$$
170 US$
130 US$
Travis Startup AWS c4.xlarge
costs estimated on demand c4.xlarge up for 24h/day
I have also to
configure and
maintain Jenkins…
Continuous Integration: SaaS vs Jenkins in Cloud
Continuous Integration: SaaS vs Jenkins in Cloud
switch on/off
every day???!!
Waste
Boring
Stressful
Continuous Integration: SaaS vs Jenkins in Cloud
Continuous Integration: SaaS vs Jenkins in Cloud
AWS CLI + CRONJOBS
!/bin/bash
EC2_ID=i-abcdefgh
EIP=52.*.*.*.
IAM=ideato_jenkins

aws ec2 start-instances --instance-ids ${EC2_ID}
profile ${IAM}
aws ec2 associate-address --instance-id ${EC2_ID}
--public-ip ${EIP} --profile ${IAM}


exit 0
jenkins_on.sh
!/bin/bash
EC2_ID=i-abcdefgh
IAM=ideato_jenkins

aws ec2 stop-instances --instance-ids ${EC2_ID}
—profile ${IAM}
exit 0
jenkins_off.sh
Let’s talk again about $$$
54 US$
130 US$
Travis Startup AWS c4.xlarge
costs estimated on demand c4.xlarge up for 8h/day
Save more
money?
Put your Jenkins on
Reserved Instances
Reserved Instances
capacity
reservation
for one or
three years
inside an AZ
help AWS on
capacity
planning
hourly billing
rate lower
Reserved Instances
switch AZ within
the same region
Change the
instance size
within the same
instance type
not just
EC2
billing
mechanism
Reserved Instances
reservation
cannot be
refundable
applied to a
single
instance types
restricted
inside a region
Reserved Instances
all upfront 3y save up
70%
all upfront 1y save up
30%
Let’s talk again about $$$
34 US$
130 US$
Travis Startup AWS c4.xlarge
costs estimated on reserved 1y upfront
c4.xlarge up for 8h/day
Ok but….
different stacks?!
• OS (Debian vs RedHat)
• PHP(5.x), Java, Python
• Elasticsearch(0.9->1.7)
• Mongo
• MySQL,PostgreSQL
On Travis I just
have to edit

.travis.yaml
Continuous Integration: SaaS vs Jenkins in Cloud
Continuous Integration: SaaS vs Jenkins in Cloud
~= Python virtualenv
not suited for CI
system
one virtualenv active
at once
Containers history
1979 - chroot
unix syscall to change
root directory
of a process to a new location
only visible by that process
Containers history
2007 - cgroups
used for limiting, isolating and
accounting
defining CPU, RAM, I/O
Containers history
2008 - LXC
first implementation of Linux
containers with several features:
cgroups, namespace, CAP,
API bindings on Ruby,Python..
Containers history
2013 - Docker
Continuous Integration: SaaS vs Jenkins in Cloud
it’s a
container
technology
was LXC
isolation
encapsulation
portability
was LXC
now runc
(Open Container Initiative)
difference
between VM &
Docker??
Containers vs VMs
Continuous Integration: SaaS vs Jenkins in Cloud
Continuous Integration: SaaS vs Jenkins in Cloud
AUFS
Advanced Unification FileSystem
Layered FS
Copy on Write
enable Docker Image layers
Docker Images
read only layer
used to be containers
composed by layers
Continuous Integration: SaaS vs Jenkins in Cloud
Our Docker Images
Our Docker Images
FROM ubuntu:trusty	
RUN apt-get install -yq 
software-properties-common 
python-software-properties 
git 
vim 
wget 
curl
Our Docker Images
Our Docker Images
FROM ideato/trusty	
ENV DEBIAN_FRONTEND noninteractive
RUN add-apt-repository -y ppa:ondrej/php5	
RUN apt-get install -yq --no-install-recommends 
php5 
php5-cli 
php5-common 
php5-dev 
php5-gd 
php5-curl 
php5-mcrypt 
libapache2-mod-php5
Our Docker Images
Our Docker Images
FROM ideato/trusty_php:5.5
RUN apt-get install -yq mysql-server-5.5
RUN wget https://phar.phpunit.de/
phpunit.phar
RUN chmod +x phpunit.phar
RUN mv phpunit.phar /usr/local/bin/phpunit
Workflow…
projects should
have their
Dockerfile
Workflow..
these Dockerfiles
should be built on
top of CI Images
Our Docker Images
Example Project
FROM ideato/trusty_php_CI:5.5	
ENV DB default
RUN apt-get install -yq 
npm 
openjdk-7-jre 
openjdk-7-jdk 
nodejs
RUN wget https://download.elastic.co/elasticsearch/
elasticsearch/elasticsearch-1.7.3.deb
RUN dpkg -i elasticsearch-1.7.3.deb
ADD bin/run_tests /
ENTRYPOINT [“./bin/run_tests”]
Example Project
#!/bin/bash
cd /exampleproj/workspace	
service mysql start
service elasticsearch start
bin/idx build
Our Jenkins
web hook
Our Jenkins
web hook
docker build -q -t
ideato:exampleproj
-f Dockerfile .
Our Jenkins
web hook
docker build -q -t
ideato:exampleproj -
f Dockerfile .
docker run --rm=true
-v $WORKSPACE:/example_project
-t ideato:exampleproj
Our Jenkins
web hook
docker build -q -t
ideato:exampleproj -
f Dockerfile .
docker run --rm=true
-v $WORKSPACE:/example_project
-t ideato:exampleproj
channel
notification

Resuming….
1 day for Jenkins setup
~ 280$
(one time cost)
+
AWS c4.xlarge 34$ x 12 ~ 600$
vs
TravisCI Startup Plan 130€ x 12 = 1560$
oh wait…
~ 1/3 build time
than Travis
in the next few
months…
Continuous Integration: SaaS vs Jenkins in Cloud
built in support for
delivery pipelines
pipeline as code
Jenkinsfile!!!
better UX on
pipeline
Continuous Integration: SaaS vs Jenkins in Cloud
finally batteries
included
Continuous Integration: SaaS vs Jenkins in Cloud
fully backward
compatible
try it !
docker pull jenkinsci/
jenkins:2.0-alpha-3
what else?
on dev we are using
OSX + Vagrant + Ansible
and no Docker atm
why?
Add more complexity
to FE devs

customers won’t pay
to migrate old projects
no native support
until now…
https://blog.docker.com/2016/03/
docker-for-mac-windows-beta/
no more VirtualBox,
native hypervisor support
Mac -> xhyve
Windows -> HyperV
on Mac,
Docker Engine will run
inside a Alpine Linux
on top of xhyve
native
Windows/Mac app
on OSX….
volume mounting for
code/data
with auto update
on file changes
(GIT, Sublime,PhpStorm)
tools integrated inside Docker
Toolbox
Docker Engine, Docker Compose,
Kitematic
Links
JenkinsCI
Jenkins 2.0
AWS Reserved Instances
Docker
Docker on OSX & Windows
Thanks!
Questions ??

More Related Content

PPTX
Deploying Symfony2 app with Ansible
ODP
devops@cineca
PDF
Ansible not only for Dummies
PPT
Learn basic ansible using docker
PPTX
PHP development with Docker
PDF
Docker security introduction-task-2016
PPTX
Docker 1.11 Presentation
PDF
Developing and Deploying PHP with Docker
Deploying Symfony2 app with Ansible
devops@cineca
Ansible not only for Dummies
Learn basic ansible using docker
PHP development with Docker
Docker security introduction-task-2016
Docker 1.11 Presentation
Developing and Deploying PHP with Docker

What's hot (20)

PDF
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
PDF
Docker - From Walking To Running
PDF
Vagrant for real (codemotion rome 2016)
PDF
Amazon EC2 Container Service in Action
PDF
[DockerCon 2019] Hardening Docker daemon with Rootless mode
PDF
Plug-ins: Building, Shipping, Storing, and Running - Nandhini Santhanam and T...
PDF
Dockerizing Symfony Applications - Symfony Live Berlin 2014
 
PPTX
Exploring Docker Security
PDF
The state of the swarm
PPTX
Installaling Puppet Master and Agent
PPTX
Architecting .NET Applications for Docker and Container Based Deployments
PDF
Securing Containers, One Patch at a Time - Michael Crosby, Docker
PDF
A Hands-on Introduction to Docker
PDF
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
PPTX
Dockerizing a Symfony2 application
PDF
Docker + Microservices in Production
PDF
Docker Security Deep Dive by Ying Li and David Lawrence
PPTX
Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...
PDF
Ansible 實戰:top down 觀點
PPTX
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker - From Walking To Running
Vagrant for real (codemotion rome 2016)
Amazon EC2 Container Service in Action
[DockerCon 2019] Hardening Docker daemon with Rootless mode
Plug-ins: Building, Shipping, Storing, and Running - Nandhini Santhanam and T...
Dockerizing Symfony Applications - Symfony Live Berlin 2014
 
Exploring Docker Security
The state of the swarm
Installaling Puppet Master and Agent
Architecting .NET Applications for Docker and Container Based Deployments
Securing Containers, One Patch at a Time - Michael Crosby, Docker
A Hands-on Introduction to Docker
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
Dockerizing a Symfony2 application
Docker + Microservices in Production
Docker Security Deep Dive by Ying Li and David Lawrence
Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...
Ansible 實戰:top down 觀點
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
Ad

Viewers also liked (20)

PPTX
An Integrated Pipeline for Private and Public Clouds with Jenkins, Artifactor...
PPTX
How Cloud Foundry is CI'd
PDF
CloudBees Jenkins and Pivotal Cloud Foundry - Continuous Delivery for Cloud N...
KEY
Building Cloud Tools for Netflix with Jenkins
PDF
A developers' journey into building automated tests for IT from the ground up
PDF
Bash-Only Deployment
PPTX
Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)
PDF
Flight training for DevOps & HumanOps - IncontroDevOps 2016
PDF
Le 12 pratiche - Un introduzione a XP (Mini Italian Agile Day)
PDF
Saas vs. private cloud
PPTX
Understanding cloud platform services
PPTX
CSCMP 2014: Traditional vs Cloud-Based WMS -- Cornerstone V Track 18 Warehous...
PDF
Jelastic - Containers Live Migration Behind the Scene
PPTX
Being Agile and Seeing Big Picture
PPTX
High Growth Professional Services Firms
PDF
Introducing the Professional Service Maturity Model
PPT
SaaS vs BPO: Operational Considerations of the SaaS Service Delivery Model
PDF
The Five Most Important KPIs for Services Companies
PDF
Key performance indicators in professional service firms
PDF
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
An Integrated Pipeline for Private and Public Clouds with Jenkins, Artifactor...
How Cloud Foundry is CI'd
CloudBees Jenkins and Pivotal Cloud Foundry - Continuous Delivery for Cloud N...
Building Cloud Tools for Netflix with Jenkins
A developers' journey into building automated tests for IT from the ground up
Bash-Only Deployment
Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)
Flight training for DevOps & HumanOps - IncontroDevOps 2016
Le 12 pratiche - Un introduzione a XP (Mini Italian Agile Day)
Saas vs. private cloud
Understanding cloud platform services
CSCMP 2014: Traditional vs Cloud-Based WMS -- Cornerstone V Track 18 Warehous...
Jelastic - Containers Live Migration Behind the Scene
Being Agile and Seeing Big Picture
High Growth Professional Services Firms
Introducing the Professional Service Maturity Model
SaaS vs BPO: Operational Considerations of the SaaS Service Delivery Model
The Five Most Important KPIs for Services Companies
Key performance indicators in professional service firms
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Ad

Similar to Continuous Integration: SaaS vs Jenkins in Cloud (20)

PPTX
Docker - Demo on PHP Application deployment
PPTX
Docker Security workshop slides
PDF
Omaha (Google Update) server
PPTX
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
PDF
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
PPTX
Docker - Der Wal in der Kiste
PPTX
Develop with docker 2014 aug
PDF
Very Early Review - Rocket(CoreOS)
PPT
Docker, a new LINUX container technology based light weight virtualization
PDF
Digital Forensics and Incident Response in The Cloud Part 3
PDF
Docker intro
PDF
廣宣學堂: 容器進階實務 - Docker進深研究班
PDF
Docker 進階實務班
PPTX
[Codelab 2017] Docker 기초 및 활용 방안
PPTX
Azure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
PDF
codemotion-docker-2014
PDF
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
PDF
Auto deploy symfony app with codeship and elastic beanstalk
PDF
Introduction to Docker
Docker - Demo on PHP Application deployment
Docker Security workshop slides
Omaha (Google Update) server
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
Docker - Der Wal in der Kiste
Develop with docker 2014 aug
Very Early Review - Rocket(CoreOS)
Docker, a new LINUX container technology based light weight virtualization
Digital Forensics and Incident Response in The Cloud Part 3
Docker intro
廣宣學堂: 容器進階實務 - Docker進深研究班
Docker 進階實務班
[Codelab 2017] Docker 기초 및 활용 방안
Azure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
codemotion-docker-2014
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Auto deploy symfony app with codeship and elastic beanstalk
Introduction to Docker

More from Ideato (6)

PDF
serverless, a next level for devops
PDF
Jenkins with superpowers
PDF
Ansible pill09wp
PDF
Ansible inside
PDF
Elk devops
ODP
TogetherJS
serverless, a next level for devops
Jenkins with superpowers
Ansible pill09wp
Ansible inside
Elk devops
TogetherJS

Recently uploaded (20)

PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Empathic Computing: Creating Shared Understanding
PDF
Approach and Philosophy of On baking technology
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Network Security Unit 5.pdf for BCA BBA.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
MYSQL Presentation for SQL database connectivity
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Spectral efficient network and resource selection model in 5G networks
Advanced methodologies resolving dimensionality complications for autism neur...
Encapsulation_ Review paper, used for researhc scholars
Empathic Computing: Creating Shared Understanding
Approach and Philosophy of On baking technology
NewMind AI Weekly Chronicles - August'25 Week I
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
“AI and Expert System Decision Support & Business Intelligence Systems”
The AUB Centre for AI in Media Proposal.docx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Understanding_Digital_Forensics_Presentation.pptx
Machine learning based COVID-19 study performance prediction
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Network Security Unit 5.pdf for BCA BBA.

Continuous Integration: SaaS vs Jenkins in Cloud