using devops tools to achieve continuous integration

35
Using DevOps Tools to Achieve Continuous Integration

Upload: rackspace

Post on 10-May-2015

388 views

Category:

Technology


1 download

DESCRIPTION

Quick software release is a core business process at fast growing organizations. Yet, on many teams this important process is manual or semi-automated — an approach that's painful, risky, costly and time consuming. Using DevOps tools to implement Continuous Integration can dramatically improve your software delivery pipeline. Follow along with the webinar recording at http://youtu.be/u8PdgQvoSVo featuring @rgbkrk @rackninja from the Rackspace DevOps Automation Team and learn how to effectively deliver applications on API-driven infrastructure. Additional resources available at: http://www.rackspace.com/devops/ https://github.com/rackspace-cookbooks https://github.com/rackspace-cookbooks/contributing http://misheska.com/blog/2013/06/16/getting-started-writing-chef-cookbooks-the-berkshelf-way/ http://docs.ansible.com/intro_getting_started.html https://travis-ci.org/ http://travis-ci.com/

TRANSCRIPT

Page 1: Using DevOps Tools to Achieve Continuous Integration

Using DevOps Tools to Achieve Continuous Integration

Page 2: Using DevOps Tools to Achieve Continuous Integration

2RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Speakers

Kyle KelleyDeveloper Support Engineer

@rgbkrk

2

Ryan Richard, RHCADevOps Automation Team

Lead

@rackninja

Page 3: Using DevOps Tools to Achieve Continuous Integration

3RACKSPACE® HOSTING | WWW.RACKSPACE.COM 3

First, a precursor

Page 4: Using DevOps Tools to Achieve Continuous Integration

4RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Why are we here?

•We are all building up similar systems

•Similar configurations, minor tweaks

•Want:

•More time for applications and business

•Less time doing SysOps

Page 5: Using DevOps Tools to Achieve Continuous Integration

5RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Keep Deploying!

•Let’s keep that product going

•Let’s keep delivering!

Page 6: Using DevOps Tools to Achieve Continuous Integration

6RACKSPACE® HOSTING | WWW.RACKSPACE.COM

What can we do?

•Write tests

•Use Continuous Integration

•Use version control, particularly git

Page 7: Using DevOps Tools to Achieve Continuous Integration

7RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Let’s Test!

Page 8: Using DevOps Tools to Achieve Continuous Integration

8RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Page 9: Using DevOps Tools to Achieve Continuous Integration

RACKSPACE® HOSTING | WWW.RACKSPACE.COM RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Page 10: Using DevOps Tools to Achieve Continuous Integration

10RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Object Placeholder

Downtime

•It’s going to happen

•Assume failure

•Have a rollback strategy

-for your application

Page 11: Using DevOps Tools to Achieve Continuous Integration

11

Testing with Open Source Tools

Page 12: Using DevOps Tools to Achieve Continuous Integration

RACKSPACE® HOSTING | WWW.RACKSPACE.COM RACKSPACE® HOSTING | WWW.RACKSPACE.COM 12RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Page 13: Using DevOps Tools to Achieve Continuous Integration

13RACKSPACE® HOSTING | WWW.RACKSPACE.COM RACKSPACE® HOSTING | WWW.RACKSPACE.COM RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Minimal .travis.yml

language: python

python:

– “2.6”

– “2.7”

– “3.2”

– “3.3”

# install dependencies

install: “pip install .”

# run tests

script: nosetests

Page 14: Using DevOps Tools to Achieve Continuous Integration

14RACKSPACE® HOSTING | WWW.RACKSPACE.COM RACKSPACE® HOSTING | WWW.RACKSPACE.COM RACKSPACE® HOSTING | WWW.RACKSPACE.COM 17RACKSPACE® HOSTING | WWW.RACKSPACE.COM 17RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Page 15: Using DevOps Tools to Achieve Continuous Integration

15

Need more build power?

Page 16: Using DevOps Tools to Achieve Continuous Integration
Page 17: Using DevOps Tools to Achieve Continuous Integration

17RACKSPACE® HOSTING | WWW.RACKSPACE.COM 17

How the DevOps Automation Service tests our cookbooks

Page 18: Using DevOps Tools to Achieve Continuous Integration

18RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Practical examples with Chef

•Our pipeline for testing cookbooks

•Testing your chef powered infrastructure

Page 19: Using DevOps Tools to Achieve Continuous Integration

Our CI pipeline for Chef cookbooks

CI serverJenkins

Page 20: Using DevOps Tools to Achieve Continuous Integration

Our CI pipeline for Chef cookbooks

CI serverJenkins

WorkflowRake

Page 21: Using DevOps Tools to Achieve Continuous Integration

Our CI pipeline for Chef cookbooks

CI serverJenkins

WorkflowRake

Ruby Syntax/lint

Page 22: Using DevOps Tools to Achieve Continuous Integration

Our CI pipeline for Chef cookbooks

CI serverJenkins

WorkflowRake

Ruby Syntax/lint

Chef Syntax/lintFoodcritic

Page 23: Using DevOps Tools to Achieve Continuous Integration

Our CI pipeline for Chef cookbooks

CI serverJenkins

WorkflowRake

Ruby Syntax/lint

Chef Syntax/lintFoodcritic

Unit testChefspec

Page 24: Using DevOps Tools to Achieve Continuous Integration

Our CI pipeline for Chef cookbooks

CI serverJenkins

WorkflowRake

Ruby Syntax/lint

Chef Syntax/lintFoodcritic

Unit testChefspec

Functional testsTest-kitchen + serverspec

Page 25: Using DevOps Tools to Achieve Continuous Integration

Our CI pipeline for Chef cookbooks

CI serverJenkins

WorkflowRake

Ruby Syntax/lint

Chef Syntax/lintFoodcritic

Unit testChefspec

Functional testsTest-kitchen + serverspec

Thor

Human/automated

Post Steps

Final

Page 26: Using DevOps Tools to Achieve Continuous Integration

26RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Two modes of application delivery

Webhook Cookbook

Python MongoSupervisord

• Build an application cookbook that can deploy latest version of the application/artifact (chef specific)

Page 27: Using DevOps Tools to Achieve Continuous Integration

27RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Two modes of application delivery

Webhook Cookbook

Python MongoSupervisord

• Build an application cookbook that can deploy latest version of the application/artifact (chef specific)

• External workflow for application delivery• (Capistrano, fabric, etc).

Page 28: Using DevOps Tools to Achieve Continuous Integration

Application Cookbook Workflow

CI serverJenkins

WorkflowRake

Ruby Syntax/lint

Chef Syntax/lintFoodcritic

Unit testChefspec

Page 29: Using DevOps Tools to Achieve Continuous Integration

Application Cookbook Workflow

CI serverJenkins

WorkflowRake

Ruby Syntax/lint

Chef Syntax/lintFoodcritic

Unit testChefspec

Functional testsTest-kitchen + serverspecDo not destroy instance

Page 30: Using DevOps Tools to Achieve Continuous Integration

Application Cookbook Workflow

CI serverJenkins

WorkflowRake

Ruby Syntax/lint

Chef Syntax/lintFoodcritic

Unit testChefspec

Functional testsTest-kitchen + serverspecDo not destroy instance

Jenkins steps or additional jobs:Integration tests, load tests, user tests, etc

Human/automated

Post Steps

Final

Page 31: Using DevOps Tools to Achieve Continuous Integration

Deployment Workflow Model

CI serverJenkins

Chef WorkflowTest-kitchen + serverspecDo not destroy instance

Page 32: Using DevOps Tools to Achieve Continuous Integration

Deployment Workflow Model

CI serverJenkins

Chef WorkflowTest-kitchen + serverspecDo not destroy instance

Additional JobsDeployment workflow executed

Page 33: Using DevOps Tools to Achieve Continuous Integration

Deployment Workflow Model

CI serverJenkins

Chef WorkflowTest-kitchen + serverspecDo not destroy instance

Additional JobsDeployment workflow executed

Integration tests, load tests, user tests, etc. Additional Jobs

Page 34: Using DevOps Tools to Achieve Continuous Integration

Deployment Workflow Model

CI serverJenkins

Chef Workflow

FinalHuman/automated

Test-kitchen + serverspecDo not destroy instance

Additional JobsDeployment workflow executed

Integration tests, load tests, user tests, etc. Additional Jobs

Page 35: Using DevOps Tools to Achieve Continuous Integration

RACKSPACE® HOSTING | 1 FANATICAL PLACE | SAN ANTONIO, TX 78218

US SALES: 1-800-961-2888 | US SUPPORT: 1-800-961-4454 | WWW.RACKSPACE.COM

RACKSPACE® HOSTING | © RACKSPACE US, INC. | RACKSPACE® AND FANATICAL SUPPORT® ARE SERVICE MARKS OF RACKSPACE US, INC. REGISTERED IN THE UNITED STATES AND OTHER COUNTRIES. | WWW.RACKSPACE.COMRACKSPACE® HOSTING | © RACKSPACE US, INC. | RACKSPACE® AND FANATICAL SUPPORT® ARE SERVICE MARKS OF RACKSPACE US, INC. REGISTERED IN THE UNITED STATES AND OTHER COUNTRIES. | WWW.RACKSPACE.COM