+ All Categories
Home > Technology > Yale Jenkins Show and Tell

Yale Jenkins Show and Tell

Date post: 16-Apr-2017
Category:
Upload: e-camden-fisher
View: 10,660 times
Download: 0 times
Share this document with a friend
24
Yale Jenkins Build and Deploy E Camden Fisher [email protected] Technical Lead Unix Infrastructure and Virtualization
Transcript
Page 1: Yale Jenkins Show and Tell

Yale JenkinsBuild and Deploy

E Camden [email protected]

Technical LeadUnix Infrastructure and Virtualization

Page 2: Yale Jenkins Show and Tell

Who Uses Jenkins @Yale?

Page 3: Yale Jenkins Show and Tell

Overview:How does Jenkins make life better?

Without Jenkins● Building is slow, error prone● Testing is onerous● Code coverage is onerous● Bugs caught later● Devs worry about environments● Lack of change control for

deployments● Slow progress● Different artifact per environment● Inconsistent configuration per

environment● Deployments are "hard"● Integration Hell

With Jenkins● "fire and forget", consistent!● Testing is automated!● Code coverage is automated!● Bugs caught early and often!● Devs worry about code!● Change control in the right

places for deployments!● Rapid progress! Agility!● Identical artifact per

environment!● Identical configuration per

environments!● Deployments are easy! "Click!"● Integration Nirvana

Page 4: Yale Jenkins Show and Tell

Continuous IntegrationContinuous Integration is a software development practice

○ Maintain a Single Source Repository

○ Automate the Build

○ Make Your Build Self-Testing

○ Everyone Commits To the Mainline Every Day

○ Every Commit Should Build the Mainline on an Integration Machine

○ Keep the Build Fast

○ Test in a Clone of the Production Environment

○ Make it Easy for Anyone to Get the Latest Executable

○ Everyone can see what's happening

○ Automate Deployment

Avoid "Integration Hell!!"

Page 5: Yale Jenkins Show and Tell

What is Jenkins?

Jenkins is an application and a framework that manages and monitors the execution of

repeated tasks.

Page 6: Yale Jenkins Show and Tell

Why Jenkins?

● Easy!

● Extensible

● Scalable

● Flexible

● Open Source

● Supported by Cloudbees

Page 7: Yale Jenkins Show and Tell

History Lesson:

Application lifecycle is a progression

● Source Code Management

● Maven and Artifactory

● Building and Testing with Jenkins

● Container Configurable artifacts

● Managed deployments with Jenkins

Page 8: Yale Jenkins Show and Tell

Source Control Management

● Islands of SCM begat central SCM (subversion)

○ Single source repository!

○ Easy to get access.

○ Easy to onboard.

○ Easy to support.

○ Everyone wins!

Page 9: Yale Jenkins Show and Tell

Maven and Artifactory

● Maven

○ Project Object Model (POM)

○ Simplifies dependency resolution ("oops I forgot that .jar!")

○ Makes the build process easy and uniform

● Artifactory (Maven Repository)

○ Where do I put my built artifacts?

○ Makes it easy for everyone to get the latest build!

Page 10: Yale Jenkins Show and Tell

Builds without Jenkins

● Builds take a long time

● Automated Testing takes longer!

● Code coverage reports take even longer!

● Result: developers don't build, test or report on their code regularly enough because it's just too time consuming.

● Build environments are not standardized

○ my laptop has a different o/s, jvm, ruby version, gems, libraries, etc than yours

● Mistakes are caught later, harder to debug

Page 11: Yale Jenkins Show and Tell

Builds with Jenkins

● SCM commits automatically kick off a build

○ Automate the build!

● Testing and code coverage is automated and is run on every commit.

○ Makes the Build Self-Testing!

● Broken builds immediately notify the team and the committer (Email, IRC, IM, Taskbar, etc)

● Tests run in a Clone of the Production Environment!

● Everyone can easily see what's happening!

● Developers can get back to coding instead of building and testing.

● Releases are quick and easy

Page 12: Yale Jenkins Show and Tell
Page 13: Yale Jenkins Show and Tell

Container Configurable Artifacts● Artifacts were built with configuration information embedded inside them.

○ ie. datasources, CAS service endpoints, etc

○ Artifacts are different per environment! What!?

○ "Oops, I forgot to update that parameter!"● Externalization of configuration parameters

○ deployable XML

○ Apps self configure with JNDI● Now we have Container Configurable artifacts

○ The SAME artifact migrates between environments

○ XML configuration data is all that differentiates environments● Vendor-lock-in-less PaaS plug

Page 14: Yale Jenkins Show and Tell

Deployments without Jenkins

● Choice between loss of control or loss of agility

○ Either devs can edit deployables or they can't

○ Often devs can configure the container

● If they can...

○ Code is deployed, edited and removed without Change Control

○ "I'll clean it up later!"

○ Dev environments quickly diverge from Production

○ Security is compromised

■ Elevated privileges on servers

■ Shell management on servers

● If they can't...

○ Change requests are "slow", systems groups must do everything

Page 15: Yale Jenkins Show and Tell

Deployments with Jenkins

● Consistency!

● Jenkins writes configuration XML

● Developers can deploy to DEV at will

● Eliminate shells, and elevated privileges on servers

● Container is managed by infrastructure with the O/S

● Empowers developers to GTD

● Puts gates at appropriate places

● Changes to the Jenkins jobs require change control

● Frees Systems folks to work on more interesting things

● Workflow integration with Kintana

Page 16: Yale Jenkins Show and Tell
Page 17: Yale Jenkins Show and Tell
Page 18: Yale Jenkins Show and Tell
Page 19: Yale Jenkins Show and Tell
Page 20: Yale Jenkins Show and Tell
Page 21: Yale Jenkins Show and Tell
Page 22: Yale Jenkins Show and Tell

Non-Java languages

This all applies to Non-Java projects too!Php

○ Continuous deployment to DEV for Drupal○ Code coverage and unit testing available

Ruby○ Automated unit testing○ Automated code coverage○ Automated deployment coming soon

.Net○ Build, unit test, archive creation

Page 23: Yale Jenkins Show and Tell

The future...

● RBAC + folders○ delegate responsibility to other systems groups

● More ruby○ unit testing and code coverage

○ deployments

● Enterprise Service Bus

● Cloud deployments

Page 24: Yale Jenkins Show and Tell

Questions?

E Camden FisherTechnical Lead

Unix Infrastructure and [email protected]

@fishnix


Recommended