14
milestone42 Copyright © 2013. Sumanth Vepa. Automating Development Operations

Automating development-operations-v1

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Automating development-operations-v1

1   milestone42

milestone42

Copyright © 2013. Sumanth Vepa.

Automating Development Operations

Page 2: Automating development-operations-v1

2   milestone42

Copyright © 2013. Sumanth Vepa This work is licensed under the Creative Commons Attribution-Share-Alike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.

Page 3: Automating development-operations-v1

3   milestone42 milestone42 3  

A programming systems product is nearly an order of magnitude more complex than the initial program on which it is based.

– paraphrased from ‘The Mythical Man Month’ by Frederick P. Brooks.

Program

Program Product (Generalization, testing, Documentation, maintenance)

Programming System (Interfaces, System Integration)

Programming Systems Product

x3

x3

x9

Page 4: Automating development-operations-v1

4   milestone42

Build !

Code !

Debug/Run !

The basic development cycle is short, fast and interactive…

…but it is not robust.

Page 5: Automating development-operations-v1

5   milestone42 milestone42 5  

Isolation Isolate an application’s development environment from it’s host.

lxc   jvm   vm   virtualenv  

Portability Replicate a development environment in a customizable way.

Automated Configuration Automatically configure a development environment from source control.

git   vm  

Simplify Reviews Make code reviews easy.

bugzilla  review  board  

trac  

svn  git  

Continuous Integration & Testing Build code and run unit and integration tets automatically.

svn  git  

selenium  jenkins  

Atomic Deployments Deploy successfully or rollback to a previous release.

staging production

1

2 Automated Monitoring Detect and track failures automatically.

nagios  

production bugzilla  trac  

7 3

4 5 6

The seven capabilities of highly effective devops.

Page 6: Automating development-operations-v1

6   milestone42

Isolation

Virtual Machines •  Complete isolation •  Required for mobile development Cons •  Mostly unnecessary for Java (JVM is a VM) •  Slow(er) Automation Options

Vagrant

Automates VM creation Relatively easy setup

Inflexible No simple GUI

Openstack

Sophisticated capbilities GUI interface

Very complex

vm  

Lightweight Containers •  Effective isolation •  Lightweight & fast Cons •  OS specific Automation Options

lxc  

Docker

Automates lxc creation Relatively easy setup

No standard images. GUI still primitive

Language Specific Isolation •  Very lightweight •  Fast Cons •  Language specific •  Automation can be scripted but no out-of-

the-box solution •  Database & other resources not isolated

virtualenv  

Java VM •  Both a VM & language specific •  No significant need for specific

automation Cons •  Jar hell issues

•  Insulate development from host software changes •  Support multiple concurrent projects

Multiple effective options for isolation but switching options is hard.

jvm  

Page 7: Automating development-operations-v1

7   milestone42

Portability Move environments across physical hosts and amongst multiple developers, testing servers and production.

Simply copying a VM doesn’t work…

Source  Host  

vm  

DesAnaAon  Host  

Source  Host  

vm  

DesAnaAon  Host  

vm  

portable image

vm  

vm  

Setup must be translated across host environments.

Page 8: Automating development-operations-v1

8   milestone42

Automated Configuration •  Rapidly configure multiple hosts with a specific environment. •  Return a host environment to a well defined state.

Automation Options

Salt

Very fast and scalable

New development. Is evolving rapidly UI is primitive

Puppet

Well established Large base of configuration libraries.

Uses it’s own configuration language.

Chef

Well established Large base of configuration libraries.

Uses Ruby as a configuration language.

For repeatable deployments, keep environment configuration under version control.

git   vm  

vm  

virtualenv  

Page 9: Automating development-operations-v1

9   milestone42

Simplify Code Reviews Make code reviews easy enough that they are done consistently

bugzilla  review  board  

trac  

svn  git  

Code review tools encourage code hygiene…

… but integrating them effectively into a workflow needs effort.

Automation Options

Review Board

Easy to use Integrates with most VCSes.

Poor cmd line support.

Barkeep

Very customizable

Barebones. UI could improve

Crucible

Very flexible Integrates with most VCSes.

Closed source. Not extensible

Page 10: Automating development-operations-v1

10   milestone42

Continuous Integration Build, test and release code as it is checked in, or at regular intervals

Setting up a CI server is a good first step…

… but scaling for test driven development will require distributed

builds and tests.

Automation Options

Jenkins

Widely used and easy to use Integrates with most VCSes.

Distributed builds supported but need work. Not very customizable.

Buildbot

Very customizable

Fewer features than Jenkins UI needs improvement

Bamboo

Very flexible Excellent UI

Closed source.

svn  git  

selenium  jenkins  

Page 11: Automating development-operations-v1

11   milestone42

Atomic Deployment Production releases should either be completely successful or not have any effect at all.

Ability to rollback is critical to automating a deployment…

staging production

test

dev

…but rollback may not be possible beyond a certain point.

No general purpose automation options

•  Each type of production change requires different rollback actions.

•  Ability to rollback depends on how the software is written

•  Deployment policies also affect rollback.

Some tools (e.g. Fabric) can help make deployments atomic, but only if combined with appropriate development technique and policy.

Page 12: Automating development-operations-v1

12   milestone42

Automated Monitoring Measure product performance and detect defects and outages early

Monitoring is not just about outages. It’s about determining if your business and product strategies are working.

What should automated monitoring measure?

•  Failures & Outages of course… but also…

•  On site behavior: How are users/customers moving through your application or website.

•  The funnel: How and where is your off-site marketing driving your traffic and how does it convert on your site/application.

Page 13: Automating development-operations-v1

13   milestone42

Building Devops Automation

•  Don’t do it all at once!

•  Automate the pain points first •  Adapt your automation toolset to

your workflow

•  Don’t let your devops automation affect your developers’ productivity

Page 14: Automating development-operations-v1

14   milestone42 milestone42 14  

milestone42.com develop deploy scale simply �   �   �  

Consulting and software services for development operations and automation.