using jenkins in the enterprise and the cloud · jenkins enterprise: quick overview shielding...

45
Jenkins User Conference New York, May 17 2011 #jenkinsconf Using Jenkins in the Enterprise and the Cloud Harpreet Singh Kohsuke Kawaguchi CloudBees Cloudbees.com

Upload: others

Post on 25-Jun-2020

21 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Using Jenkins in the Enterprise and the Cloud

Harpreet Singh Kohsuke Kawaguchi CloudBees

Cloudbees.com

Page 2: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

©2011 CloudBees, Inc. All Rights Reserved

Day: A period of 24 hours, mostly misspent…

Page 3: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

©2011 CloudBees, Inc. All Rights Reserved

Page 4: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

CloudBees’ Mission - Eliminate Downtime

©2011 CloudBees, Inc. All Rights Reserved

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

!   Improve efficiency for administrators and developers

!  Rely on Jenkins…

Page 5: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

“GOOD MANAGEMENT” OF JENKINS

Managing it pro-actively

©2011 CloudBees, Inc. All Rights Reserved

Page 6: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

“Good management” in Jenkins…

©2011 CloudBees, Inc. All Rights Reserved

!  Organize jobs better !   Secure your jobs !  Replicate good practices !  Respond quicker to requests !  Ensure compliance !  Bounce back from failures !  Prevent failures !  Everything should be as fast as possible…if

not faster

Page 7: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Organize Jobs Better: Folders

©2011 CloudBees, Inc. All Rights Reserved

!  Huge list of all jobs on 1 page !  Views, views and more views

–  Not namespace aware

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

!   Free –  (Download from CloudBees Plugin Gateway

from the Jenkins Update Center)

Page 8: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

©2011 CloudBees, Inc. All Rights Reserved

Folder Demo

Page 9: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

©2011 CloudBees, Inc. All Rights Reserved

Who has the keys to your castle?

Page 10: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

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: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Authorization Strategies

©2011 CloudBees, Inc. All Rights Reserved

!  Core Jenkins extension point for Authorization

!  Responsible for deciding the permissions available to users.

!  Can only select one. !  Default for clean install:

Unsecured

Page 12: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

•  A simple matrix of click-boxes Row: role Column: 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)

©2011 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: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

RBAC Demo

©2011 CloudBees, Inc. All Rights Reserved

Page 14: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Replicate Good Practices, Respond quicker to user requests: Templates

©2011 CloudBees, Inc. All Rights Reserved

!   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: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Types of Templates

©2011 CloudBees, Inc. All Rights Reserved

!  Builder Template !   Job Template !   Folder Template !  Auxiliary Template

Page 16: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Templates Demo

©2011 CloudBees, Inc. All Rights Reserved

Page 17: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Ensure Compliance: Custom Update Centers

©2011 CloudBees, Inc. All Rights Reserved

!   Teams often encounter the uh-oh moments

!   Uh-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: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Custom Update Center

©2011 CloudBees, Inc. All Rights Reserved

!  Easy to create your own update center !  Host your plugin or binaries !   Inherit from upstream update centers !   Specify version number of binaries or

plugins to be promoted

Page 19: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Update Center Demo

Page 20: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Bounce back from failures

Backup your stuff… •  Backup plugin from

CloudBees •  Backup to cloud

–  Free CloudBees Plugin Gateway

©2011 CloudBees, Inc. All Rights Reserved

Page 21: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

©2011 CloudBees, Inc. All Rights Reserved

Bounce Back Faster: High Availability

JENKINS_HOME

Jenkins Cluster

Jenkins Master

Jenkins Master

Reverse Proxy

MT

JENKINS_HOME NFS

Jenkins Cluster

Jenkins Master

Reverse Proxy

MT

Page 22: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

©2011 CloudBees, Inc. All Rights Reserved

Demo

Page 23: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Prevent Failures: Validated Merge

©2011 CloudBees, Inc. All Rights Reserved

!   Shield your repository !  Rely 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: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

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

©2011 CloudBees, Inc. All Rights Reserved

Page 25: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

FROM GOOD TO SMART Smart Management of Jenkins

©2011 CloudBees, Inc. All Rights Reserved

Page 26: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

©2011 CloudBees, Inc. All Rights Reserved

That is You!

Page 27: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Offload to Cloud(Bees)

!  No machine management !  Provisioning Jenkins masters faster !  You work to Jenkins console

–  Not a VM management UI

!  Pay by the minute not by the hour !  Code repositories !  Maven repositories !   Team based

Page 28: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

New RelicReal-time web monitoring and analytics, delivered as a serviceStandard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .FREE Pro . . . . . . . . . . . . . . . . . . . . .$0.29/server/hour

CloudantReliable, distributed Database-as-a-Service, based on Apache CouchDBOxygen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .FREE Argon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $15/mo Neon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $39/mo Helium . . . . . . . . . . . . . . . . . . . . . . . . . . . . $119/mo Krypton. . . . . . . . . . . . . . . . . . . . . . . . . . . $399/mo

MongoHQ Fast and dependable MongoDB in the cloudSandbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .FREESmall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $15/moLarge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $49/moReplica Set Extra Large . . . . . . . . $300/mo

PapertrailHosted log management for apps, servers, and cloud servicesFree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .FREE1 GB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .$7/mo2 GB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $18/mo4 GB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $35/mo8 GB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $75/mo

Sauce Labs OnDemandManual and Selenium-driven cross-browser testing on the cloudCommercial Plus . . . . . . . . .FREE until 9/20

JFrogYour Binary Repository in the cloud Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $75/moPro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $85/moEnterprise . . . . . . . . . . . . . . . . . . . . . . . . . . $98/mo

SonarSourceContinuous inspection of source code in the cloud using Sonar Sonar Professional . . . . . . . . . . . . . . . $20/mo

XWiki CloudThe next generation cloud wiki that’s easy to use and easy to organizeBasic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FreeSmall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $149/moMedium . . . . . . . . . . . . . . . . . . . . . . . . . . $299/moBig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $599/mo

The CloudBees EcosystemThe CloudBees Ecosystem brings cloud-based services from partner companies directly to Java developers, all within the CloudBees platform...

Try It: http://cloudbees.com/platform-ecosystem.cb

DEV@Cloud ServicesDevelopment services for building applications

RUN@Cloud ServicesTools to manage and support cloud deployment

If you don’t already have a CloudBees account, sign up - it’s free.

Learn more about the CloudBees Platform. http://cloudbees.com

CloudBees, Inc.400 Trade Center, Suite 4950Woburn, MA 01801(339) 227-6210cloudbees.com

Page 29: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

DEV@cloud Demo

©2011 CloudBees, Inc. All Rights Reserved

Page 30: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Continuous Deployment

!  Continuous Integration is not enough !  Once code is built it should be deployed

automatically !  You should move the entire development-

deployment cycle to the cloud

Page 31: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #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*

* Released Today: May17th 2012

Page 32: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

•  Download the free Folders and Backup plugin –  From Jenkins Update Center – CloudBees Plugin

Gateway

If there is one thing you take away from here

©2011 CloudBees, Inc. All Rights Reserved

Page 33: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

©2011 CloudBees, Inc. All Rights Reserved

Day: A period of 24 hours, mostly misspent…

Page 34: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Thank You To Our Sponsors

Platinum Sponsor

Gold Sponsors

Silver Sponsors

Bronze Sponsors

Page 35: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Active Directory

Atlassian Crowd

Jenkins’ own DB

LDAP OpenID Unix PAM

Supports signup

- - ✓ - - -

Provides group details

✓ ✓ - ✓ ✓ ✓

Supports group lookup

✓ -* - ✓ - ✓

Can logout

✓ ✓ ✓ ✓ ✓ ✓

Feature Matrix

©2011 CloudBees, Inc. All Rights Reserved

Page 36: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Example: Builder

Page 37: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Page 38: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Example: Job

Page 39: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Example: Creating templates

Page 40: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Page 41: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Cloud Management / Virtualization / OS

©2011 CloudBees, Inc. All Rights Reserved

CloudBees Platform as a Service

Continuous Deployment

Production

Build

Test

Provisioning

Maintenance

Elasticity/HA

Jenkins

SaaS Vendor Applications

Enterprise User Applications

JVM – Java EE Java, Python, Scala, …

CloudBees  Core  Pla-orm  Services  

RUN  DEV  

Repositories

Data Services RDBMS, NoSQL

Metering Billing Monitoring Management

Messaging Identity Logging/ Auditing

Back-end services

Runtime services

Development Projects

Partne

r Ec

osyste

m Pa

rtner Sm

art

Plugins

GIT

Maven

… SVN

APIs Web UI, CLI, HTTP API, Eclipse, Maven, Ant, etc.

Clo

udBe

esSm

art

Plugins

Databases

Other SaaS

On Premise

Page 42: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Smart Management

©2011 CloudBees, Inc. All Rights Reserved

On Premises

In the cloud

Page 43: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

CloudBees Dashboard

©2011 CloudBees, Inc. All Rights Reserved

Jenkins on CloudBees

Page 44: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

Why in the cloud?

!   Build machines always available when you need them, lowers CAPEX

!   Scale DUO – Pay for what you use, when you need it

!   Integration between CI modules reduces dev complexity, lowers OPEX

!   Seamless integration to runtime PaaS !   Continuous Deployment Capability

Page 45: Using Jenkins in the Enterprise and the Cloud · Jenkins Enterprise: Quick Overview Shielding Jenkins from failures •High Availability •Backup Securing Jenkins and jobs •Roles-based

Jenkins User Conference New York, May 17 2011 #jenkinsconf

©2011 CloudBees, Inc. All Rights Reserved

Jenkins Enterprise: Quick Overview

Shielding Jenkins from failures

• High Availability • Backup

Securing Jenkins and jobs

• Roles-based Access Control

• Wikitext Descriptions

• Secure Copy

Organizing Jenkins

• Folders

Speeding builds

• Auto-scaling for VMWare installations

• Throttled Build Execution

• Even Load Strategy

• Fast Archiving

Preventing failures

• Git Validated Merge

Skip Next

* Released Today: May17th 2012