adopting continuous integration in an ops group

44

Upload: colleenfry

Post on 23-Jan-2015

1.828 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Adopting Continuous Integration in an Ops Group
Page 2: Adopting Continuous Integration in an Ops Group

DANIEL WESTER • CHIEF ENGINEER • TURNER BROADCASTING SYSTEMS , INC • @DWESTER42a

Adopting Continuous Integration in an Ops Group

Page 3: Adopting Continuous Integration in an Ops Group

All opinions stated are those of the presenter and does not necessarily reflect those of Turner or any of its affiliates or partners.

Disclaimer

Page 4: Adopting Continuous Integration in an Ops Group

• Development occurs in a wide range of languages

• A lot development teams

• A lot of testing already in place

• CI Server service offered by Infrastructure team

CI usage at TBS

Page 5: Adopting Continuous Integration in an Ops Group

• Encourages Source Code Management usage/practices

• Creates a build-focused mentality

• Standardizes the entry point to deployment

Why offer a CI Service?

Page 6: Adopting Continuous Integration in an Ops Group
Page 7: Adopting Continuous Integration in an Ops Group

• Create modular artifacts

• Avoid the kitchen sink type of applications

• Be able to switch application versions

• Reflected in our build plans

Some “tips” for scale, testing and deploys

Page 8: Adopting Continuous Integration in an Ops Group

Please make sure that XXX can scale and handle traffic. Oh we’re launching tomorrow.”“

Page 9: Adopting Continuous Integration in an Ops Group

• Limited resource availability (me)

• Out of band checks usually don’t get fixed

• Not popular with developers

• Last minute requests — not popular with reviewers

The problem

Page 10: Adopting Continuous Integration in an Ops Group
Page 11: Adopting Continuous Integration in an Ops Group

DIB

Page 12: Adopting Continuous Integration in an Ops Group

Daniel Box

Page 13: Adopting Continuous Integration in an Ops Group

Daniel Box

DOB still exists...

Page 14: Adopting Continuous Integration in an Ops Group

• Selenium backed

• Canned version of “DOB”

• Found 80% of DOB tests

• 2 versions — Web-based and Maven plugin

What is DIB?

Page 15: Adopting Continuous Integration in an Ops Group

• Website version could be down for weeks

• Tests in the build — reports in minutes

• Developer relies on in-build tests

• If in-build tests fails... There’s more time to fix...

Website versus in-build tests

Page 16: Adopting Continuous Integration in an Ops Group

• New development teams asked for it to be added

• Features added based on requests

• Other tests were added by dev teams

What did it do?

Page 17: Adopting Continuous Integration in an Ops Group

Build stages

Page 18: Adopting Continuous Integration in an Ops Group

What didn’t work?

Page 19: Adopting Continuous Integration in an Ops Group

What didn’t work - fUnit

Page 20: Adopting Continuous Integration in an Ops Group

Lessons Learned

Page 21: Adopting Continuous Integration in an Ops Group

• In-process automated testing is key

• Run tests as soon as commits are done

• If you’re a downstream team, provide upstream team’s tests

• CULTURE matters

Lessons learned

Page 22: Adopting Continuous Integration in an Ops Group

What about Ops?

Page 23: Adopting Continuous Integration in an Ops Group

• Configuration Management system

• Ruby-based

• Easily expandable

• Many ways of approaching things

What is Chef?

Page 24: Adopting Continuous Integration in an Ops Group

User adoption

Page 25: Adopting Continuous Integration in an Ops Group

We need to have a script that gets triggered whenever there’s a commit and does stuff.”“

Page 26: Adopting Continuous Integration in an Ops Group

Enter CI

Page 27: Adopting Continuous Integration in an Ops Group

Cookbooks

Page 28: Adopting Continuous Integration in an Ops Group

Creating a cookbook

Page 29: Adopting Continuous Integration in an Ops Group

10 minutes later...

Page 30: Adopting Continuous Integration in an Ops Group
Page 31: Adopting Continuous Integration in an Ops Group

• Lint

• Test

• Upload

Plan Stages

Page 32: Adopting Continuous Integration in an Ops Group

• Code style guideline checker & more

• Tabs versus spaces, “” versus ‘’

• Less objections to utilities reviewing code

Lint test

Page 33: Adopting Continuous Integration in an Ops Group

Tests

Page 34: Adopting Continuous Integration in an Ops Group

• CI server generates artifacts and uploads

• Avoid access issues

• CI server becomes “trusted” source of what’s a “good” version

Moving away from tagging

Page 35: Adopting Continuous Integration in an Ops Group
Page 36: Adopting Continuous Integration in an Ops Group

• Lint tests (internal)

• Publicly exposed lint tests

• Uploads

• Tests

Changing the engine while driving

Page 37: Adopting Continuous Integration in an Ops Group

Plan branches

Page 38: Adopting Continuous Integration in an Ops Group

Code Reviews

Page 39: Adopting Continuous Integration in an Ops Group

Before pull requests

Page 40: Adopting Continuous Integration in an Ops Group

• Lightweight review system

• Engineers choose to use pull requests

• Larger changes still go through Peer Review tool

• End result: More core reviewed

Pull requests

Page 41: Adopting Continuous Integration in an Ops Group

Today’s Code Flow

Commit on branch

Plan branchtriggered

Pullrequest

Master branch triggered

Upload and readyfor ‘trigger’

Page 42: Adopting Continuous Integration in an Ops Group

• Faster throughput

• Repeatable process

• Audit trail of when changes were made

• Lightweight process with large impact

End Result

Page 43: Adopting Continuous Integration in an Ops Group

Thank you!

DANIEL WESTER • CHIEF ENGINEER • TURNER BROADCASTING SYSTEMS , INC • @DWESTER42a

Page 44: Adopting Continuous Integration in an Ops Group

Text code below to 22333or visit http://bit.ly/18zxBVY

Adopting Continuous Integration in an Ops Group

To join this session, send text 136888 to

AWESOME = 3E

PRETTY GOOD = 3D

NOT BAD = 3C

MEH = 3B

Rate this Talk