SlideShare a Scribd company logo
1 of 33
Jenkins User Conference    New York, May 17 2012   #jenkinsconf


       Best Practices for a Mission-
       Critical Jenkins


                     Mike Rooney
                     Consultant/Jenkins Connoisseur

                           http://linkedin.com/in/mcrooney
Jenkins User Conference    New York, May 17 2012   #jenkinsconf



   Jenkins Uses

     Genius.com
      – staging deployment, code reviews,
        automated branching and merging, monitors
     Canv.as
      – continuous deployment, scoring, monitoring,
        newsletter mailing
     Conductor
      – environment creation, staging / prod
        deployment, selenium monitoring
Jenkins User Conference   New York, May 17 2012   #jenkinsconf


   Hand-check: How critical is your Jenkins?
Jenkins User Conference   New York, May 17 2012   #jenkinsconf



   What problems have you faced?
Jenkins User Conference   New York, May 17 2012   #jenkinsconf



   Problems
     disk failure / data loss
     hardware failure / downtime
     load / latency
Jenkins User Conference    New York, May 17 2012   #jenkinsconf



   Solution
     make Jenkins instance trivial to respin
      – ideally a one-liner that even handles DNS
      – “create.sh jenkins”
Jenkins User Conference      New York, May 17 2012   #jenkinsconf



   Persistence
     $JENKINS_HOME
      – plugins, users, jobs, builds, configuration
Jenkins User Conference    New York, May 17 2012   #jenkinsconf



   Persistence
     git / svn
      – make $JENKINS_HOME a checkout
      – have a Jenkins job that commits daily
      – examples: http://jenkins-
        ci.org/content/keeping-your-configuration-
        and-data-subversion
Jenkins User Conference     New York, May 17 2012   #jenkinsconf



   Persistence
     EBS on AWS
      – put $JENKINS_HOME on an EBS volume
      – snapshot nightly via a Jenkins job
      – trivial to attach to a new host, restore snapshot


     a NAS + RAID / backups works similarly
Jenkins User Conference       New York, May 17 2012   #jenkinsconf



   Environment
     Jenkins is more than $JENKINS_HOME
      –   specific Jenkins .war / .deb / .rpm version
      –   startup options
      –   dependent packages: git, ruby gems, pip
      –   ssh keys, m2 settings
      –   swap, tmpfs, system configuration
Jenkins User Conference       New York, May 17 2012     #jenkinsconf



   Environment
     configuration
     management:Puppet/Chef*




                    * https://wiki.jenkins-ci.org/display/JENKINS/Puppet
Jenkins User Conference   New York, May 17 2012   #jenkinsconf



   Environment
     standalone
      – puppet apply path/to/your/manifest.pp
     puppetmaster
      – set up /etc/puppet.conf, run puppet agent
Jenkins User Conference    New York, May 17 2012   #jenkinsconf



   Putting it Together
     have manifest handle $JENKINS_HOME
      – clone git repo, mount EBS volume, etc
Jenkins User Conference     New York, May 17 2012   #jenkinsconf



   Putting it Together…on AWS
     upload manifests to S3 on check-in
      – a Jenkins SCM job using S3 plugin
     use cloud-init to install puppet, download
     manifests, and run puppet
      – a custom AMI with an rc.local script also works
     when it dies: “create.sh jenkins”
      – ec2-launch-instance config user-data
Jenkins User Conference    New York, May 17 2012   #jenkinsconf



   Monitoring
     … but how do you know when it’s down?
     check out services like Pingdom
      – notifies you when a URL does give HTTP 200 OK
Jenkins User Conference       New York, May 17 2012   #jenkinsconf



   Going further: Elastic Beanstalk
     handles provisioning simply from a .war
     pros
      –   just give it a war
      –   automatically replaces unhealthy instances
      –   behind a load-balancer (consistent URL)
      –   normally hard AWS changes like AMI, Security
          Groups, or Key Pairs are now trivial to make
     cons
      –   behind a load-balancer (cost overhead)
      –   no UI option (yet) for controlling AZ
      –   no great way to pass data to instances for puppet
      –   locked in to Amazon Linux AMI (CentOS)
Jenkins User Conference      New York, May 17 2012   #jenkinsconf



   Going further: Elastic Beanstalk
     set min/max instances to 1
      – ignore scaling triggers, irrelevant in this case
     use beanstalk CLI to set desired AZ (if EBS)
      – https://forums.aws.amazon.com/thread.jspa?t
        hreadID=61409
     puppet
      – use a custom AMI that specifically runs Jenkins
        manifests
      – but this requires a specific AMI for each
        Beanstalk application.
      – let’s get creative…
Jenkins User Conference   New York, May 17 2012   #jenkinsconf



   Going further: Elastic Beanstalk
     passing data to instances




     PARAM1..5 meant as args to .war
     end up in /etc/sysconfig/tomcat7
     JAVA_OPTS
     parse out and:
      – puppet apply –certname=$PARSED_ROLE
Jenkins User Conference   New York, May 17 2012   #jenkinsconf



   Questions?
Jenkins User Conference    New York, May 17 2012   #jenkinsconf



   High Availability Artifacts
     protect: artifacts, reports, userContent
     from:
      – planned downtime:
        Jenkins restarts/upgrades, server upgrades
      – unplanned downtime:
        software/hardware failure
      – unresponsive Jenkins:
        very high load
Jenkins User Conference       New York, May 17 2012   #jenkinsconf



   High(er) Availability Artifacts
     easy mode:
      – put Jenkins behind nginx/apache, shadow
        userContent and relevant directories
      – still available during Jenkins restarts, or very
        high Jenkins load/latency
      – not safe from server downtime
Jenkins User Conference          New York, May 17 2012   #jenkinsconf



     High Availability Artifacts
        advanced mode: S3
        – 99.99% availability, 99.999999999% durability*
            • if you store 10K objects, expect to lose one every 10
              million years
        – use Jenkins S3 plugin to upload artifacts to S3




* http://aws.amazon.com/s3/faqs
Jenkins User Conference     New York, May 17 2012   #jenkinsconf



   Fault-tolerant Jobs
     design with possible downtime in mind
      – SCM triggering is great, but keep polling too
Jenkins User Conference   New York, May 17 2012   #jenkinsconf



   Fault-tolerant Jobs
     */15 * * * *
      – BAD:
          update users where join_time < 15m ago
      – GOOD:
          update users where id > last_id_updated
Jenkins User Conference     New York, May 17 2012   #jenkinsconf



   Error handling
     for non-critical jobs, use email / IM post-
     build notifiers
      – but be careful of creating too much noise,
        people will ignore or filter it out
     for critical jobs, integrate Jenkins with a
     service like PagerDuty
      – Jenkins emails myalert@pagerduty.com
      – PagerDuty texts / calls the people on-call until
        resolved
      – a failing build will wake you up at 4AM
Jenkins User Conference   New York, May 17 2012   #jenkinsconf



   Questions?
Jenkins User Conference   New York, May 17 2012   #jenkinsconf



   Security: Authentication
     read-only
     matrix-based
     HTTP basic auth
Jenkins User Conference   New York, May 17 2012   #jenkinsconf



   Security: Authentication
     but what about traffic sniffing?
Jenkins User Conference      New York, May 17 2012   #jenkinsconf



   Security: HTTPS
     throw nginx/apache in front of Jenkins
      – proxy mode
      – ssl (self-signed or just buy one)
Jenkins User Conference     New York, May 17 2012   #jenkinsconf



   Security: Authorization
     use project-based matrix authentication
     give anonymous/authenticated readonly
     use it if you’ve got it:
     LDAP, Active Directory, UNIX
     Jenkin’s own database also works fine
     ensure each user has their own account
      – each build will have an audit trail
Jenkins User Conference   New York, May 17 2012   #jenkinsconf



   Security: Authorization (AWS)
     when interfacing with AWS API/CLI, use
     IAM so Jenkins can only access what it
     needs
Jenkins User Conference   New York, May 17 2012   #jenkinsconf



   Questions?
Jenkins User Conference   New York, May 17 2012   #jenkinsconf



   Thank You To Our Sponsors
   Platinum
   Sponsor


   Gold
   Sponsors



   Silver
   Sponsors




   Bronze
   Sponsors

More Related Content

What's hot

Introduction to Continuous Integration with Jenkins
Introduction to Continuous Integration with JenkinsIntroduction to Continuous Integration with Jenkins
Introduction to Continuous Integration with JenkinsBrice Argenson
 
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Andrew Bayer
 
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-CodeSD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-CodeBrian Dawson
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandTroublemaker Khunpech
 
OSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating JenkinsOSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating JenkinsNETWAYS
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for TestingCarlos Sanchez
 
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSAutomated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSBamdad Dashtban
 
Jenkins Introduction
Jenkins IntroductionJenkins Introduction
Jenkins IntroductionPavan Gupta
 
Building Jenkins Pipelines at Scale
Building Jenkins Pipelines at ScaleBuilding Jenkins Pipelines at Scale
Building Jenkins Pipelines at ScaleJulien Pivotto
 
Yale Jenkins Show and Tell
Yale Jenkins Show and TellYale Jenkins Show and Tell
Yale Jenkins Show and TellE. Camden Fisher
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To JenkinsKnoldus Inc.
 
Large scale automation with jenkins
Large scale automation with jenkinsLarge scale automation with jenkins
Large scale automation with jenkinsKohsuke Kawaguchi
 
Hacking Jenkins
Hacking JenkinsHacking Jenkins
Hacking JenkinsMiro Cupak
 
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsContinuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsFrancesco Bruni
 
How Nuxeo uses the open-source continuous integration server Jenkins
How Nuxeo uses the open-source continuous integration server JenkinsHow Nuxeo uses the open-source continuous integration server Jenkins
How Nuxeo uses the open-source continuous integration server JenkinsNuxeo
 

What's hot (20)

Introduction to Continuous Integration with Jenkins
Introduction to Continuous Integration with JenkinsIntroduction to Continuous Integration with Jenkins
Introduction to Continuous Integration with Jenkins
 
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
 
Jenkins tutorial
Jenkins tutorialJenkins tutorial
Jenkins tutorial
 
Jenkins tutorial
Jenkins tutorialJenkins tutorial
Jenkins tutorial
 
Jenkins CI presentation
Jenkins CI presentationJenkins CI presentation
Jenkins CI presentation
 
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-CodeSD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
Jenkins-CI
Jenkins-CIJenkins-CI
Jenkins-CI
 
OSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating JenkinsOSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating Jenkins
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for Testing
 
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSAutomated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
 
Jenkins Introduction
Jenkins IntroductionJenkins Introduction
Jenkins Introduction
 
Building Jenkins Pipelines at Scale
Building Jenkins Pipelines at ScaleBuilding Jenkins Pipelines at Scale
Building Jenkins Pipelines at Scale
 
Yale Jenkins Show and Tell
Yale Jenkins Show and TellYale Jenkins Show and Tell
Yale Jenkins Show and Tell
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To Jenkins
 
Large scale automation with jenkins
Large scale automation with jenkinsLarge scale automation with jenkins
Large scale automation with jenkins
 
Hacking Jenkins
Hacking JenkinsHacking Jenkins
Hacking Jenkins
 
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsContinuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and Jenkins
 
Jenkins
JenkinsJenkins
Jenkins
 
How Nuxeo uses the open-source continuous integration server Jenkins
How Nuxeo uses the open-source continuous integration server JenkinsHow Nuxeo uses the open-source continuous integration server Jenkins
How Nuxeo uses the open-source continuous integration server Jenkins
 

Viewers also liked

Jenkins project based authorization
Jenkins   project based authorizationJenkins   project based authorization
Jenkins project based authorizationPaul Blundell
 
Continuous Delivery Pipeline - Patterns and Anti-patterns
Continuous Delivery Pipeline - Patterns and Anti-patternsContinuous Delivery Pipeline - Patterns and Anti-patterns
Continuous Delivery Pipeline - Patterns and Anti-patternsSonatype
 
Continous Integration and Deployment
Continous Integration and DeploymentContinous Integration and Deployment
Continous Integration and DeploymentKároly Nagy
 
Jenkinsconf Presentation - Advance jenkins management with multiple projects.
Jenkinsconf Presentation - Advance jenkins management with multiple projects.Jenkinsconf Presentation - Advance jenkins management with multiple projects.
Jenkinsconf Presentation - Advance jenkins management with multiple projects.Ohad Basan
 
From Continuous Integration to Continuous Delivery with Jenkins - javaland.de...
From Continuous Integration to Continuous Delivery with Jenkins - javaland.de...From Continuous Integration to Continuous Delivery with Jenkins - javaland.de...
From Continuous Integration to Continuous Delivery with Jenkins - javaland.de...CloudBees
 
Implementing High Availability Caching with Memcached
Implementing High Availability Caching with MemcachedImplementing High Availability Caching with Memcached
Implementing High Availability Caching with MemcachedGear6
 
神戸大学講演
神戸大学講演神戸大学講演
神戸大学講演Mf Takatsuka
 
Demystifying the Recruiting Funnel
Demystifying the Recruiting FunnelDemystifying the Recruiting Funnel
Demystifying the Recruiting FunnelHuman Capital Media
 
Junin así te vemos
Junin así te vemosJunin así te vemos
Junin así te vemosbicifanatica
 
Please join in if you know the song
Please join in if you know the songPlease join in if you know the song
Please join in if you know the songhaywardsprimary
 
Christine Davies - Joe Public
Christine Davies - Joe PublicChristine Davies - Joe Public
Christine Davies - Joe Publicchristine strydom
 
Nuevas Tecnologías - Contexto
Nuevas Tecnologías - ContextoNuevas Tecnologías - Contexto
Nuevas Tecnologías - ContextoPaula Gentile
 
Accelerating the Recruiting Funnel
Accelerating the Recruiting FunnelAccelerating the Recruiting Funnel
Accelerating the Recruiting FunnelHuman Capital Media
 
The New Admissions Funnel
The New Admissions FunnelThe New Admissions Funnel
The New Admissions FunnelJoe Szejk
 
Curation by Question
Curation by QuestionCuration by Question
Curation by Question경만 고
 

Viewers also liked (20)

Jenkins project based authorization
Jenkins   project based authorizationJenkins   project based authorization
Jenkins project based authorization
 
Continuous Delivery Pipeline - Patterns and Anti-patterns
Continuous Delivery Pipeline - Patterns and Anti-patternsContinuous Delivery Pipeline - Patterns and Anti-patterns
Continuous Delivery Pipeline - Patterns and Anti-patterns
 
Continous Integration and Deployment
Continous Integration and DeploymentContinous Integration and Deployment
Continous Integration and Deployment
 
Jenkinsconf Presentation - Advance jenkins management with multiple projects.
Jenkinsconf Presentation - Advance jenkins management with multiple projects.Jenkinsconf Presentation - Advance jenkins management with multiple projects.
Jenkinsconf Presentation - Advance jenkins management with multiple projects.
 
From Continuous Integration to Continuous Delivery with Jenkins - javaland.de...
From Continuous Integration to Continuous Delivery with Jenkins - javaland.de...From Continuous Integration to Continuous Delivery with Jenkins - javaland.de...
From Continuous Integration to Continuous Delivery with Jenkins - javaland.de...
 
Jenkins Best Practices
Jenkins Best PracticesJenkins Best Practices
Jenkins Best Practices
 
Implementing High Availability Caching with Memcached
Implementing High Availability Caching with MemcachedImplementing High Availability Caching with Memcached
Implementing High Availability Caching with Memcached
 
神戸大学講演
神戸大学講演神戸大学講演
神戸大学講演
 
Demystifying the Recruiting Funnel
Demystifying the Recruiting FunnelDemystifying the Recruiting Funnel
Demystifying the Recruiting Funnel
 
Junin así te vemos
Junin así te vemosJunin así te vemos
Junin así te vemos
 
Please join in if you know the song
Please join in if you know the songPlease join in if you know the song
Please join in if you know the song
 
The wall (v.m.) 2
The wall (v.m.) 2The wall (v.m.) 2
The wall (v.m.) 2
 
Christine Davies - Joe Public
Christine Davies - Joe PublicChristine Davies - Joe Public
Christine Davies - Joe Public
 
Moises zapata hi_bernardo
Moises zapata hi_bernardoMoises zapata hi_bernardo
Moises zapata hi_bernardo
 
MusicTT IP Valuation - Conducting the Audit
MusicTT IP Valuation - Conducting the AuditMusicTT IP Valuation - Conducting the Audit
MusicTT IP Valuation - Conducting the Audit
 
Nuevas Tecnologías - Contexto
Nuevas Tecnologías - ContextoNuevas Tecnologías - Contexto
Nuevas Tecnologías - Contexto
 
Accelerating the Recruiting Funnel
Accelerating the Recruiting FunnelAccelerating the Recruiting Funnel
Accelerating the Recruiting Funnel
 
LinkedIn_2
LinkedIn_2LinkedIn_2
LinkedIn_2
 
The New Admissions Funnel
The New Admissions FunnelThe New Admissions Funnel
The New Admissions Funnel
 
Curation by Question
Curation by QuestionCuration by Question
Curation by Question
 

Similar to Best Practices for Mission-Critical Jenkins

JUC NYC 2012: Yale Build and Deployment with Jenkins
JUC NYC 2012: Yale Build and Deployment with JenkinsJUC NYC 2012: Yale Build and Deployment with Jenkins
JUC NYC 2012: Yale Build and Deployment with JenkinsE. Camden Fisher
 
Jenkins data mining on the command line - Jenkins User Conference NYC 2012
Jenkins data mining on the command line - Jenkins User Conference NYC 2012Jenkins data mining on the command line - Jenkins User Conference NYC 2012
Jenkins data mining on the command line - Jenkins User Conference NYC 2012Noah Sussman
 
Graduating to Jenkins CI for Ruby(-on-Rails) Teams
Graduating to Jenkins CI for Ruby(-on-Rails) TeamsGraduating to Jenkins CI for Ruby(-on-Rails) Teams
Graduating to Jenkins CI for Ruby(-on-Rails) TeamsDaniel Doubrovkine
 
Juc paris olivier lamy talk
Juc paris olivier lamy talkJuc paris olivier lamy talk
Juc paris olivier lamy talkOlivier Lamy
 
Testing Salesforce at Cloud Scale
Testing Salesforce at Cloud ScaleTesting Salesforce at Cloud Scale
Testing Salesforce at Cloud Scalegwestr
 
JUC NY - Advanced Continuous Deployment with Jenkins
JUC NY - Advanced Continuous Deployment with JenkinsJUC NY - Advanced Continuous Deployment with Jenkins
JUC NY - Advanced Continuous Deployment with JenkinsXebiaLabs
 
Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012
Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012
Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012Henri Gomez
 
JenkinsMobi: Jenkins XML API for Mobile Applications
JenkinsMobi: Jenkins XML API for Mobile ApplicationsJenkinsMobi: Jenkins XML API for Mobile Applications
JenkinsMobi: Jenkins XML API for Mobile ApplicationsLuca Milanesio
 
Scaling jenkins with kubernetes
Scaling jenkins with kubernetesScaling jenkins with kubernetes
Scaling jenkins with kubernetesAmi Mahloof
 
Scaling Jenkins with Kubernetes by Ami Mahloof
Scaling Jenkins with Kubernetes by Ami MahloofScaling Jenkins with Kubernetes by Ami Mahloof
Scaling Jenkins with Kubernetes by Ami MahloofDoiT International
 
The challenge - testing the oVirt project
The challenge - testing the oVirt projectThe challenge - testing the oVirt project
The challenge - testing the oVirt projectEyal Edri
 
Jenkins & Selenium
Jenkins & SeleniumJenkins & Selenium
Jenkins & Seleniumadamcarmi
 
Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2Michal Ziarnik
 
Continuous Delivery for Mobile R&D
Continuous Delivery for Mobile R&DContinuous Delivery for Mobile R&D
Continuous Delivery for Mobile R&DAnton Weiss
 
Intro to Pentesting Jenkins
Intro to Pentesting JenkinsIntro to Pentesting Jenkins
Intro to Pentesting JenkinsBrian Hysell
 
Jenkins as a Service - Code all the way down
Jenkins as a Service - Code all the way downJenkins as a Service - Code all the way down
Jenkins as a Service - Code all the way downSteve Mactaggart
 
Going literate in Amadeus JUC Berlin June 25th 2014
Going literate in Amadeus JUC Berlin June 25th 2014Going literate in Amadeus JUC Berlin June 25th 2014
Going literate in Amadeus JUC Berlin June 25th 2014Vincent Latombe
 

Similar to Best Practices for Mission-Critical Jenkins (20)

JUC NYC 2012: Yale Build and Deployment with Jenkins
JUC NYC 2012: Yale Build and Deployment with JenkinsJUC NYC 2012: Yale Build and Deployment with Jenkins
JUC NYC 2012: Yale Build and Deployment with Jenkins
 
Jenkins data mining on the command line - Jenkins User Conference NYC 2012
Jenkins data mining on the command line - Jenkins User Conference NYC 2012Jenkins data mining on the command line - Jenkins User Conference NYC 2012
Jenkins data mining on the command line - Jenkins User Conference NYC 2012
 
Graduating to Jenkins CI for Ruby(-on-Rails) Teams
Graduating to Jenkins CI for Ruby(-on-Rails) TeamsGraduating to Jenkins CI for Ruby(-on-Rails) Teams
Graduating to Jenkins CI for Ruby(-on-Rails) Teams
 
Juc paris olivier lamy talk
Juc paris olivier lamy talkJuc paris olivier lamy talk
Juc paris olivier lamy talk
 
Testing Salesforce at Cloud Scale
Testing Salesforce at Cloud ScaleTesting Salesforce at Cloud Scale
Testing Salesforce at Cloud Scale
 
JUC NY - Advanced Continuous Deployment with Jenkins
JUC NY - Advanced Continuous Deployment with JenkinsJUC NY - Advanced Continuous Deployment with Jenkins
JUC NY - Advanced Continuous Deployment with Jenkins
 
Jenkins 1
Jenkins 1Jenkins 1
Jenkins 1
 
Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012
Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012
Using Jenkins as Native Packages Factory - Jenkins User Conference Paris 2012
 
JenkinsMobi: Jenkins XML API for Mobile Applications
JenkinsMobi: Jenkins XML API for Mobile ApplicationsJenkinsMobi: Jenkins XML API for Mobile Applications
JenkinsMobi: Jenkins XML API for Mobile Applications
 
Scaling jenkins with kubernetes
Scaling jenkins with kubernetesScaling jenkins with kubernetes
Scaling jenkins with kubernetes
 
Scaling Jenkins with Kubernetes by Ami Mahloof
Scaling Jenkins with Kubernetes by Ami MahloofScaling Jenkins with Kubernetes by Ami Mahloof
Scaling Jenkins with Kubernetes by Ami Mahloof
 
The challenge - testing the oVirt project
The challenge - testing the oVirt projectThe challenge - testing the oVirt project
The challenge - testing the oVirt project
 
Jenkins & Selenium
Jenkins & SeleniumJenkins & Selenium
Jenkins & Selenium
 
J+s
J+sJ+s
J+s
 
Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2
 
Continuous Delivery for Mobile R&D
Continuous Delivery for Mobile R&DContinuous Delivery for Mobile R&D
Continuous Delivery for Mobile R&D
 
Intro to Pentesting Jenkins
Intro to Pentesting JenkinsIntro to Pentesting Jenkins
Intro to Pentesting Jenkins
 
Jenkins for One
Jenkins for OneJenkins for One
Jenkins for One
 
Jenkins as a Service - Code all the way down
Jenkins as a Service - Code all the way downJenkins as a Service - Code all the way down
Jenkins as a Service - Code all the way down
 
Going literate in Amadeus JUC Berlin June 25th 2014
Going literate in Amadeus JUC Berlin June 25th 2014Going literate in Amadeus JUC Berlin June 25th 2014
Going literate in Amadeus JUC Berlin June 25th 2014
 

Recently uploaded

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Recently uploaded (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Best Practices for Mission-Critical Jenkins

  • 1. Jenkins User Conference New York, May 17 2012 #jenkinsconf Best Practices for a Mission- Critical Jenkins Mike Rooney Consultant/Jenkins Connoisseur http://linkedin.com/in/mcrooney
  • 2. Jenkins User Conference New York, May 17 2012 #jenkinsconf Jenkins Uses Genius.com – staging deployment, code reviews, automated branching and merging, monitors Canv.as – continuous deployment, scoring, monitoring, newsletter mailing Conductor – environment creation, staging / prod deployment, selenium monitoring
  • 3. Jenkins User Conference New York, May 17 2012 #jenkinsconf Hand-check: How critical is your Jenkins?
  • 4. Jenkins User Conference New York, May 17 2012 #jenkinsconf What problems have you faced?
  • 5. Jenkins User Conference New York, May 17 2012 #jenkinsconf Problems disk failure / data loss hardware failure / downtime load / latency
  • 6. Jenkins User Conference New York, May 17 2012 #jenkinsconf Solution make Jenkins instance trivial to respin – ideally a one-liner that even handles DNS – “create.sh jenkins”
  • 7. Jenkins User Conference New York, May 17 2012 #jenkinsconf Persistence $JENKINS_HOME – plugins, users, jobs, builds, configuration
  • 8. Jenkins User Conference New York, May 17 2012 #jenkinsconf Persistence git / svn – make $JENKINS_HOME a checkout – have a Jenkins job that commits daily – examples: http://jenkins- ci.org/content/keeping-your-configuration- and-data-subversion
  • 9. Jenkins User Conference New York, May 17 2012 #jenkinsconf Persistence EBS on AWS – put $JENKINS_HOME on an EBS volume – snapshot nightly via a Jenkins job – trivial to attach to a new host, restore snapshot a NAS + RAID / backups works similarly
  • 10. Jenkins User Conference New York, May 17 2012 #jenkinsconf Environment Jenkins is more than $JENKINS_HOME – specific Jenkins .war / .deb / .rpm version – startup options – dependent packages: git, ruby gems, pip – ssh keys, m2 settings – swap, tmpfs, system configuration
  • 11. Jenkins User Conference New York, May 17 2012 #jenkinsconf Environment configuration management:Puppet/Chef* * https://wiki.jenkins-ci.org/display/JENKINS/Puppet
  • 12. Jenkins User Conference New York, May 17 2012 #jenkinsconf Environment standalone – puppet apply path/to/your/manifest.pp puppetmaster – set up /etc/puppet.conf, run puppet agent
  • 13. Jenkins User Conference New York, May 17 2012 #jenkinsconf Putting it Together have manifest handle $JENKINS_HOME – clone git repo, mount EBS volume, etc
  • 14. Jenkins User Conference New York, May 17 2012 #jenkinsconf Putting it Together…on AWS upload manifests to S3 on check-in – a Jenkins SCM job using S3 plugin use cloud-init to install puppet, download manifests, and run puppet – a custom AMI with an rc.local script also works when it dies: “create.sh jenkins” – ec2-launch-instance config user-data
  • 15. Jenkins User Conference New York, May 17 2012 #jenkinsconf Monitoring … but how do you know when it’s down? check out services like Pingdom – notifies you when a URL does give HTTP 200 OK
  • 16. Jenkins User Conference New York, May 17 2012 #jenkinsconf Going further: Elastic Beanstalk handles provisioning simply from a .war pros – just give it a war – automatically replaces unhealthy instances – behind a load-balancer (consistent URL) – normally hard AWS changes like AMI, Security Groups, or Key Pairs are now trivial to make cons – behind a load-balancer (cost overhead) – no UI option (yet) for controlling AZ – no great way to pass data to instances for puppet – locked in to Amazon Linux AMI (CentOS)
  • 17. Jenkins User Conference New York, May 17 2012 #jenkinsconf Going further: Elastic Beanstalk set min/max instances to 1 – ignore scaling triggers, irrelevant in this case use beanstalk CLI to set desired AZ (if EBS) – https://forums.aws.amazon.com/thread.jspa?t hreadID=61409 puppet – use a custom AMI that specifically runs Jenkins manifests – but this requires a specific AMI for each Beanstalk application. – let’s get creative…
  • 18. Jenkins User Conference New York, May 17 2012 #jenkinsconf Going further: Elastic Beanstalk passing data to instances PARAM1..5 meant as args to .war end up in /etc/sysconfig/tomcat7 JAVA_OPTS parse out and: – puppet apply –certname=$PARSED_ROLE
  • 19. Jenkins User Conference New York, May 17 2012 #jenkinsconf Questions?
  • 20. Jenkins User Conference New York, May 17 2012 #jenkinsconf High Availability Artifacts protect: artifacts, reports, userContent from: – planned downtime: Jenkins restarts/upgrades, server upgrades – unplanned downtime: software/hardware failure – unresponsive Jenkins: very high load
  • 21. Jenkins User Conference New York, May 17 2012 #jenkinsconf High(er) Availability Artifacts easy mode: – put Jenkins behind nginx/apache, shadow userContent and relevant directories – still available during Jenkins restarts, or very high Jenkins load/latency – not safe from server downtime
  • 22. Jenkins User Conference New York, May 17 2012 #jenkinsconf High Availability Artifacts advanced mode: S3 – 99.99% availability, 99.999999999% durability* • if you store 10K objects, expect to lose one every 10 million years – use Jenkins S3 plugin to upload artifacts to S3 * http://aws.amazon.com/s3/faqs
  • 23. Jenkins User Conference New York, May 17 2012 #jenkinsconf Fault-tolerant Jobs design with possible downtime in mind – SCM triggering is great, but keep polling too
  • 24. Jenkins User Conference New York, May 17 2012 #jenkinsconf Fault-tolerant Jobs */15 * * * * – BAD: update users where join_time < 15m ago – GOOD: update users where id > last_id_updated
  • 25. Jenkins User Conference New York, May 17 2012 #jenkinsconf Error handling for non-critical jobs, use email / IM post- build notifiers – but be careful of creating too much noise, people will ignore or filter it out for critical jobs, integrate Jenkins with a service like PagerDuty – Jenkins emails myalert@pagerduty.com – PagerDuty texts / calls the people on-call until resolved – a failing build will wake you up at 4AM
  • 26. Jenkins User Conference New York, May 17 2012 #jenkinsconf Questions?
  • 27. Jenkins User Conference New York, May 17 2012 #jenkinsconf Security: Authentication read-only matrix-based HTTP basic auth
  • 28. Jenkins User Conference New York, May 17 2012 #jenkinsconf Security: Authentication but what about traffic sniffing?
  • 29. Jenkins User Conference New York, May 17 2012 #jenkinsconf Security: HTTPS throw nginx/apache in front of Jenkins – proxy mode – ssl (self-signed or just buy one)
  • 30. Jenkins User Conference New York, May 17 2012 #jenkinsconf Security: Authorization use project-based matrix authentication give anonymous/authenticated readonly use it if you’ve got it: LDAP, Active Directory, UNIX Jenkin’s own database also works fine ensure each user has their own account – each build will have an audit trail
  • 31. Jenkins User Conference New York, May 17 2012 #jenkinsconf Security: Authorization (AWS) when interfacing with AWS API/CLI, use IAM so Jenkins can only access what it needs
  • 32. Jenkins User Conference New York, May 17 2012 #jenkinsconf Questions?
  • 33. Jenkins User Conference New York, May 17 2012 #jenkinsconf Thank You To Our Sponsors Platinum Sponsor Gold Sponsors Silver Sponsors Bronze Sponsors