33
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke Kawaguchi CloudBees Cloudbees.com ©2012 CloudBees, Inc. All Rights Reserved

Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Embed Size (px)

Citation preview

Page 1: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Using Jenkins in the Enterprise and the Cloud

Mark PrichardKohsuke KawaguchiCloudBees

Cloudbees.com

Page 2: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

• Download the CloudBees Free Enterprise Plugins from Jenkins Update Center

• Check out Nicolas de Loof’s wiki post:CloudBees Free and Open Source Jenkins Plugins

If there is one thing you take away from here…

Page 3: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Day: A period of 24 hours, mostly misspent…

Page 4: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

CloudBees’ Mission - Eliminate Downtime

Eliminate time wasted due to– Jenkins issues– User issues– Lack of right tools…

Improve efficiency for administrators and developersRely on Jenkins…

Page 5: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

“GOOD MANAGEMENT” OF JENKINS

Managing it pro-actively

Page 6: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

“Good management” in Jenkins…

Organize jobs betterSecure your jobsReplicate good practicesRespond quicker to requestsEnsure complianceBounce back from failuresPrevent failuresEverything should be as fast as possible…if not faster

Page 7: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2011 CloudBees, Inc. All Rights Reserved

Organize Jobs Better: Folders

Huge list of all jobs on 1 pageViews, views and more views– Not namespace aware

Folders– Like OS folders– Namespace aware– Views within Folders

Free– (Download from CloudBees Free Enterprise

Plugins from the Jenkins Update Center)

Page 8: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Folder Demo

Page 9: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Who has the keys to your castle?

Page 10: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Setting up the right authentication

But lets secure your server machine first– OS, Firewall, Patches– Out of the scope of this talk…

Setting up Authentication– Unix Pam– Internal Authentication– Primarily driven by your IT department– Out of scope of this talk…

Page 11: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

Authorization Strategies

©2012 CloudBees, Inc. All Rights Reserved

Core Jenkins extension point for AuthorizationResponsible for deciding the permissions available to users.Can only select one.Default for clean install:

Unsecured

Page 12: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

• A simple matrix of click-boxesRow: roleColumn: permission

• Define groups at any level

• Assign roles to groups

• Filter roles at any level

Authentication Features

Provides group details (Optional)

Supports group lookup (Optional)

CloudBees’ RBAC Plugin (plugin)

©2012 CloudBees, Inc. All Rights Reserved

Feature

✓ Per-project configuration

✓ Per-object configuration

✓ Subtractive permissions model

✓* Supports external groups

✓ Local group definition

✓ Delegate management

Page 13: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

RBAC Demo

Page 14: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Replicate Good Practices, Respond quicker to user requests: Templates

Talk in the users domain specific language– Shield them

Capture sameness of jobs, build steps– Replicate them

Faster route to success– building plugins without writing code

Page 15: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Types of Templates

Builder TemplateJob TemplateFolder TemplateAuxiliary Template

Page 16: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Templates Demo

Page 17: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Get everyone on the right page: Custom Update Centers

Teams often encounter the uh-oh momentsUh-oh moments

Usually happen a week before release

Tester: Your stuff does not work Developer: What do you mean? I tested this… Tester: Does not work with foo 1.4 Developer: I tested this with foo 1.3 Tester: 1.4 is what we have committed to Developer: uh oh…

Page 18: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Custom Update Center

Easy to create your own update centerHost your plugin or binariesInherit from upstream update centersSpecify version number of binaries or plugins to be promoted

Page 19: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Update Center Demo

Page 20: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Bounce back from failures

Backup your stuff…• Backup plugin from

CloudBees• Backup to cloud

– Free CloudBees Plugin Gateway

Page 21: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Bounce Back Faster: High Availability

JENKINS_HOME

Jenkins Cluster

Jenkins Master

Jenkins Master

Reverse Proxy

MT

JENKINS_HOMENFS

Jenkins Cluster

Jenkins Master

Reverse Proxy

MT

Page 22: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Demo

Page 23: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Prevent Failures: Validated Merge

Shield your repositoryRely on Jenkins…– Push your code to Jenkins– Jenkins builds, verifies and merges with

upstream

Result– No downtime due to bad commits– Tremendous productivity boost

Page 24: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Everything should be as fast as possible, if not faster…Speed up builds• Fast Archiver• Throttle Build

Execution• Even Load Strategy

Provision faster• VMWare Auto-scaling

plugin

Page 25: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

FROM GOOD TO SMARTSmart Management of Jenkins

Page 26: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Page 27: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Offload to Cloud(Bees)

No machine managementProvisioning Jenkins masters fasterYou work to Jenkins console– Not a VM management UI

Pay by the minute not by the hourCode repositoriesMaven repositoriesTeam based

Page 28: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Page 29: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

DEV@cloud Demo

Page 30: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

Continuous Deployment

Continuous Integration is not enoughOnce code is built it should be deployed automatically You should move the entire development-deployment cycle to the cloud

Page 31: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2011 CloudBees, Inc. All Rights Reserved

Jenkins Enterprise: Quick Overview

Large Installation

• Folders• Templates• Backup• High

Availability*• Custom

Update Centers*

• Validated Merges*

Security

• Roles-based Access Control

• Wikitext Descriptions

• Secure Copy*

Optimized Utilization

• Auto-scaling for VMWare installations

• Throttled Build Execution

• Even Load Strategy

• Skip Next Build

• Fast Archiving*

* Latest Features

Page 32: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

• Download the CloudBees Free Enterprise Plugins from Jenkins Update Center

• Check out Nicolas de Loof’s wiki post:CloudBees Free and Open Source Jenkins Plugins

If there is one thing you take away from here…

Page 33: Jenkins User Conference Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Mark Prichard Kohsuke

Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf

©2012 CloudBees, Inc. All Rights Reserved

There are better ways to spend your day…