Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Addressing Key Challenges with Viral Adoption of Jenkins Sacha Labourey CloudBees, Inc www.cloudbees.com Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Situation Complication: Implication ProjectJenkins and Jobspreads sprawl virally Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Steps to Jenkins Adoption 1. Lone Wolf – – developer sets it up and uses it on his own Usually 1 master – 1 slave – – Individual teams start relying on it within their boundaries Usually 1 master – multiple slaves – – Multiple teams start to collaborate through Jenkins Usually multiple masters – multiple slaves – – – People start writing their own plugins All departments use their own Jenkins masters Multiple masters – multiple slaves 2. Pack 3. Pack (Pack) 4. Serengeti Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Agenda Eat right! – Define best practices for consuming Jenkins Plan right! – Managing Jenkins Sprawl – plan for private or public cloud Invest right! – Running a well-oiled machine Jenkins User Conference San Francisco, Oct 2nd 2011 Memorable URL jenkins.cloudbees.com or sca14-3530.sca.cloudbees.com:8080/jenkins #jenkinsconf Jenkins User Conference Backup San Francisco, Oct 2nd 2011 #jenkinsconf Schedule Backups Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf What Do You Backup? Don’t • /war – (exploded war) • /cache – (downloaded tools) • /tools – (extracted tools) Do • /jobs/* – Builds • (build records) – builds/*/archive • (archived artifacts) – workspace Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf More on backup • Test your restore – Just copy it somewhere and “java -jar jenkins.war --httpPort=9999” – JENKINS_HOME is relocateable • Nectar backup plugin – A new job type – Schedule regular backups Jenkins User Conference San Francisco, Oct 2nd 2011 Plan for Running out of disk space #jenkinsconf Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Setup Hierarchies Custom Hierarchies Use Views Separate by Nectar Folders Departments Projects Jenkins User Conference San Francisco, Oct 2nd 2011 Secure keys to the castle #jenkinsconf Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Server Security • Checklist should include Server patches & hotfixes up to date Server firewall configured appropriately Server remote access locked down o Remote desktop on Windows o SSHD on *nix Servlet container running as restricted user Consider Apache HTTPD or nginx if exposing on a public network ©2011 CloudBees, Inc. All Rights Reserved Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Security Realms What are they What is available already Core Jenkins extension point for Authentication Responsible for validating user identity • • Can only select one. • • Default for clean install: None • • ©2011 CloudBees, Inc. All Rights Reserved Core – None – Unix PAM – Internal DB – Legacy Container Open Source Plugins – Active Directory – CAS v1 – CollabNet – Crowd – MySQL DB – OpenID SSO – Script & Extended Script – SourceForge Enterprise Edition – … Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Feature Matrix Active Directory Atlassian Crowd Jenkins’ own DB LDAP OpenID Unix PAM Supports signup - - ✓ - - - Provides group details ✓ ✓ - ✓ ✓ ✓ Supports group lookup ✓ -* - ✓ - ✓ Can logout ✓ ✓ ✓ ✓ ✓ ✓ ©2011 CloudBees, Inc. All Rights Reserved Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Authorization Strategies What are they • • • • What is available already Core Jenkins extension point for Authorization Responsible for deciding the permissions available to users. Can only select one. • Default for clean install: Unsecured • • ©2011 CloudBees, Inc. All Rights Reserved Core – Global Matrix – Project Matrix – Logged in user can do anything – Legacy Authorization Open Source Plugins – CollabNet – Role strategy – SourceForge Enterprise Edition – … CloudBees’ Plugins – RBAC Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf CloudBees’ RBAC Plugin (plugin) • A simple matrix of click-boxes Row: role Column: permission • Define groups at any level • Assign roles to groups • Filter roles at any level ©2011 CloudBees, Inc. All Rights Reserved Authentication Features Provides group details (Optional) Supports group lookup (Optional) Feature ✓ Per-project configuration ✓ Per-object configuration ✓ Subtractive permissions model ✓* Supports external groups ✓ Local group definition ✓ Delegate management ✓ Non-System Config config Jenkins User Conference San Francisco, Oct 2nd 2011 Distributed builds: Slaves #jenkinsconf Jenkins User Conference San Francisco, Oct 2nd 2011 Distributed Builds: Labels #jenkinsconf Jenkins User Conference San Francisco, Oct 2nd 2011 Distributed Builds: VM Pools • Nectar VMWare Pool Plugin – Use existing VMWare machines as slave machines – Better resource usage – Based off vCenter #jenkinsconf Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Define Templates • Mostly same configuration in so many places – Define templates of your jobs/build steps/publishers and replicate them when creating new jobs – Make changes in a central location and reflect changes in all dependent configurations • CloudBees’ Templates plugin (coming October end) Jenkins User Conference Flag Failures San Francisco, Oct 2nd 2011 #jenkinsconf Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Agenda Eat right! – Define best practices for consuming Jenkins Plan right! – Managing Jenkins Sprawl – plan for private or public cloud Invest right! – Running a well-oiled machine Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Issues At This Stage • Problem 1: Increasing # of slaves – Sharing between masters, between projects, between departments • Problem 2: Managing RBAC – Between all masters • Problem 3: Defining plugin compliance – White lists, black lists Jenkins User Conference San Francisco, Oct 2nd 2011 Manage the in-house Sprawl PRIVATE CLOUD #jenkinsconf Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Introduce DEV@cloud PE Server Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Move away from maintaining infrastructure in-house PUBLIC CLOUD Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Offload To Cloud: AWS • Offload peak capacities to AWS • Use Amazon EC2 or AWS CloudFormation plugin • Management of machines is your responsibility Jenkins User Conference San Francisco, Oct 2nd 2011 Offload to Cloud(Bees) • No machine management • You work to Jenkins console – Not a VM management UI • • • • Pay by the minute not by the hour Code repositories Maven repositories Team based #jenkinsconf Jenkins User Conference San Francisco, Oct 2nd 2011 CloudBees Dashboard Jenkins on CloudBees ©2011 CloudBees, Inc. All Rights Reserved #jenkinsconf Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Continuous Deployment • Continuous Integration is not enough • Once code is built it should be deployed automatically • You should move the entire developmentdeployment cycle to the cloud Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Agenda Eat right! – Define best practices for consuming Jenkins Plan right! – Managing Jenkins Sprawl – plan for private or public cloud Invest right! – Running a well-oiled machine Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Running a well oiled machine needs investment Support Community Engagement Learning Jenkins User Conference San Francisco, Oct 2nd 2011 Learning • • • • • • • • • Read Jenkins Definitive Guide Read Jenkins Hub Attend Training (CloudBees) Attend Hackathons Attend Jenkins User Conference Read blogs Write blogs Review code Contribute code – (new plugins, fix issues) #jenkinsconf Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Community Engagement • • • • Talk on IRC Contribute Plugins Fix Code Invest in making community stronger in any way you can Jenkins User Conference San Francisco, Oct 2nd 2011 Support • Jenkins is always in the critical path • Ability to get rapid issue resolution • Sleep peacefully at night #jenkinsconf Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Eat right! – Define best practices for consuming Jenkins Plan right! – Managing Jenkins Sprawl – plan for private or public cloud Invest right! – Run a well-oiled machine Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Thank You To Our Sponsors Platinum Sponsor Gold Sponsor Silver Sponsor Bronze Sponsors Coming Soon: The CloudBees Newsletter for Jenkins Please complete the Jenkins survey to help us better serve the community (bonus: a chance to win an Apple TV!)