devops introduction @cegeka

63
devops an introduction Patrick Debois Monday 14 February 2011

Upload: dieterdm

Post on 28-Jan-2015

119 views

Category:

Documents


1 download

DESCRIPTION

A DevOps introduction at Cegeka.

TRANSCRIPT

Page 1: DevOps Introduction @Cegeka

devopsan introduction

Patrick Debois

Monday 14 February 2011

Page 2: DevOps Introduction @Cegeka

My Background• Independent consultant

• Have worked in different roles

• Agile and Infrastructure

• Just Enough Developed Infrastructure - http://jedi.be

• Started organizing devopsdays

• Recently joined Cutter Consortium

Monday 14 February 2011

Page 3: DevOps Introduction @Cegeka

Background check?

analysts

developer

operations

testers

network

storage

database

security

middleware

sales

manager

hr people

Monday 14 February 2011

Page 4: DevOps Introduction @Cegeka

Theproblem

DEV OPS

Theproblem

Monday 14 February 2011

Page 5: DevOps Introduction @Cegeka

Agile already did a great job

Monday 14 February 2011

Page 6: DevOps Introduction @Cegeka

But they forgot some people

Monday 14 February 2011

Page 7: DevOps Introduction @Cegeka

Monday 14 February 2011

Page 8: DevOps Introduction @Cegeka

Traditional CI Overview

http://www.javaworld.com/javaworld/jw-12-2008/images/CIOverview.jpgMonday 14 February 2011

Page 9: DevOps Introduction @Cegeka

Continuous Integration Maturity Model

http://www.anthillpro.com/blogs/anthillpro-blog/2009/05/05/1241542860000.htmlMonday 14 February 2011

Page 10: DevOps Introduction @Cegeka

The only way to measure progress

is “Working software”

Monday 14 February 2011

Page 11: DevOps Introduction @Cegeka

The only way to measure progress

is “Working software”

In production

Monday 14 February 2011

Page 12: DevOps Introduction @Cegeka

Monday 14 February 2011

Page 13: DevOps Introduction @Cegeka

Business ValueOrdered by

the value gainedOrdered by the value

protected

Increase Change Avoid Change

Monday 14 February 2011

Page 14: DevOps Introduction @Cegeka

IT Tooling is changing

Monday 14 February 2011

Page 15: DevOps Introduction @Cegeka

Virtualization

• kvm

• xen

• solaris zones

• vmware

• virtualbox

• ...

Monday 14 February 2011

Page 16: DevOps Introduction @Cegeka

Cloud showed us how to scale

Monday 14 February 2011

Page 17: DevOps Introduction @Cegeka

Abstraction API

http://www.jclouds.org/

Adrian Cole@jclouds

http://libvirt.org/

Monday 14 February 2011

Page 18: DevOps Introduction @Cegeka

Platform as a Service

Monday 14 February 2011

Page 19: DevOps Introduction @Cegeka

Hudson as Service

http://www.cloudbees.com/

Monday 14 February 2011

Page 20: DevOps Introduction @Cegeka

But who will manage

your IAASplatform?

Monday 14 February 2011

Page 21: DevOps Introduction @Cegeka

First steps of Automation

https://fedorahosted.org/cobbler/

http://spacewalk.redhat.com/

http://fai-project.org/

Monday 14 February 2011

Page 22: DevOps Introduction @Cegeka

Cloning

Monday 14 February 2011

Page 23: DevOps Introduction @Cegeka

Virtual Sprawl

Monday 14 February 2011

Page 25: DevOps Introduction @Cegeka

# tomcat.pp

class tomcat {

! package {! ! "java-1.6.0-sun-compat":! ! ! ensure => "installed";! ! "tomcat6":! ! ! require => [Package["java-1.6.0-sun-compat"], Package["ntc-tomcat-log4j"]],! ! ! ensure => "installed";! ! "tomcat6-admin-webapps":! ! ! ensure => "installed";! ! "log4j":! ! ! ensure => "installed";! ! "tanukiwrapper":! ! ! ensure => "installed";! ! "mysql-connector-java":! ! ! ensure => "installed";! }

! file {! ! "/etc/init.d/tomcat6": mode => "0755", owner => "root", group => "root", source => "puppet:///tomcat/tomcat6.init"; }

! user {! ! "tomcat":! ! ! ensure => "present",! ! ! require => Package["tomcat6"];! }}!

tomcat",! ! ! mode => "0755",! ! ! require => Package['tomcat6'],! ! ! content => template("headers/header-xml.erb","tomcat/tomcat6-init.erb");! ! "/etc/init.d/build-jar-repo":! ! ! owner => "tomcat", group => "tomcat", mode => "0755",! ! ! require => Package['tomcat6'], source => "puppet:///tomcat/build-jar-repo";! ! "/var/log/tomcat6/$name":! ! ! owner => "tomcat",! ! ! group => "tomcat",! ! ! mode => "0755",! ! ! require => Package['tomcat6'],! ! ! ensure => "directory";! ! "/var/cache/tomcat6/temp/$name": owner => "root", group => "root", mode => "0755",! ! ! require => Package['tomcat6'], ensure => "directory";! ! "/var/cache/tomcat6/work/$name": owner => "root", group => "root", mode => "0755",! ! ! require => Package['tomcat6'], ensure => "directory";! ! "/usr/local/tomcat6-$name/temp":! ! ! ensure => "link", require => File["/var/cache/tomcat6/temp/$name"], target => "/var/cache/tomcat6/temp/$name";! ! "/usr/local/tomcat6-$name/work":! ! ! ensure => "link", require => File["/var/cache/tomcat6/work/$name"], target => "/var/cache/tomcat6/work/$name";! ! "/usr/local/tomcat6-$name/work/Catalina": owner => "tomcat", group => "tomcat", ensure => "directory", require => File["/usr/local/tomcat6-$name/work"]; "/usr/local/tomcat6-$name/work/Catalina/localhost": owner => "tomcat", group => "tomcat", ensure => "directory", require => File["/usr/local/tomcat6-$name/work/Catalina"]; "/usr/local/tomcat6-$name/work/Catalina/localhost/manager": owner => "tomcat", group => "tomcat", ensure => "directory", require => File["/usr/local/tomcat6-$name/work/Catalina/localhost"];! }

! service { "tomcat6-$name": enable => "false", require => [Package['tomcat6'], Package['tanukiwrapper']];! ! "build-jar-repo":! ! ! enable => "true",! ! ! start => "/etc/init.d/build-jar-repo", require => File["/etc/init.d/build-jar-repo"]];! }!

Infrastructure as code

Monday 14 February 2011

Page 26: DevOps Introduction @Cegeka

Model Driven Infrastructure

Monday 14 February 2011

Page 27: DevOps Introduction @Cegeka

https://github.com/lusis/vogeler

John E. Vincent@lusis

Definitionof your

infrastructure

Monday 14 February 2011

Page 28: DevOps Introduction @Cegeka

Version Control

Monday 14 February 2011

Page 29: DevOps Introduction @Cegeka

Reusable components

https://github.com/camptocamp

Monday 14 February 2011

Page 30: DevOps Introduction @Cegeka

Code/Server SmellsPrivate Playground

The sysadmin uses the system as his toy playground, doesn't clean up.

• /tmp & /var/tmp full of old install files• / full of files

Gready Server

One server that does every function

• combined mail and web and dns and fileshares

• all users on the same systemRoot is the cause of all evil

• last show login all root• no sudo is activated• no sshd keys for logins• nfs share/root?• Chmod 777• most processes run as root

Monday 14 February 2011

Page 31: DevOps Introduction @Cegeka

Sharing Recipes/Code

http://forge.puppetlabs.com/

http://cookbooks.opscode.com/

Monday 14 February 2011

Page 32: DevOps Introduction @Cegeka

CI for systems

Monday 14 February 2011

Page 33: DevOps Introduction @Cegeka

CI for systems (2)

Monday 14 February 2011

Page 34: DevOps Introduction @Cegeka

Pipelines concept

Monday 14 February 2011

Page 35: DevOps Introduction @Cegeka

Automation without tests is

Monday 14 February 2011

Page 36: DevOps Introduction @Cegeka

Lindsay Holmwood @auxesis

Feature: google.com It should be up And I should be able to search for things

Scenario: Searching for things When I visit "http://www.google.com" And I fill in "q" with "wikipedia" And I press "Google Search" Then I should see "www.wikipedia.org"

$ cucumber-nagios google.featureCritical: 0, Warning: 0, 4 okay | passed=4, failed=0

cucumber-nagios

Monday 14 February 2011

Page 37: DevOps Introduction @Cegeka

Lindsay Holmwood @auxesis

Scenario: Checking /etc/passwd When I ssh to "example.org" with the following credentials: | username | password | keyfile | | jacob | spifeofstrife | /home/jacob/.ssh/id_dsa | And I run "cat /etc/passwd" Then I should see "jacob" in the output

cucumber-ssh

Monday 14 February 2011

Page 38: DevOps Introduction @Cegeka

Julian Simpson@builddoctor

apache.featureFeature: In order to deploy my application As a systems administrator I want to know that the config files are legal

Scenario: Valid Apache config Given a config file template apache2.conf in etc/apache2 When I generate it Then there should be a file called apache2.conf in etc/apache2 And it should be valid

cucumber-apache

http://pastie.org/693713

Monday 14 February 2011

Page 39: DevOps Introduction @Cegeka

Feature: cucumber-puppet In order to run my puppet manifest's test suite As an admin I want the cucumber-puppet gem installed

Scenario: Install cucumber-puppet Given a node of class "cucumber-puppet" When I compile the catalog Then gem "cucumber-puppet" should be "installed"

https://github.com/nistude/cucumber-puppet

cucumber-puppet

Nikolay Sturm@nistude

Monday 14 February 2011

Page 40: DevOps Introduction @Cegeka

Birth, Adoption

Life

Retired

Death

The life of a System

Monday 14 February 2011

Page 41: DevOps Introduction @Cegeka

Veewee

Allows an easy way to build your own basebox

Patrick Debois@patrickdebois

https://github.com/jedi4ever/veewee

Monday 14 February 2011

Page 42: DevOps Introduction @Cegeka

• gem install veewee

• vagrant basebox define ‘ubuntu-64’ mybox

• preseed.cfg + postinstall.sh

• vagrant basebox build mybox

• vagrant export mybox

Veewee usage

Monday 14 February 2011

Page 43: DevOps Introduction @Cegeka

Vagrant

http://vagrantup.com/

Allows an easy way to use the production recipes in your own dev environment

Mitchell Hashimoto@mitchellh

Monday 14 February 2011

Page 44: DevOps Introduction @Cegeka

• vagrant add mybox.box (adds the box)

• vagrant init myapp (starts a project)

• vagrant up (startup a box)

• vagrant ssh (logs into the box)

• vagrant provision (runs recipes)

Vagrant usage

Monday 14 February 2011

Page 45: DevOps Introduction @Cegeka

• ProjectX (git repo)

• Vagrantfile

• [manifests] (git submodule)

• tomcat ...

• ubuntu ..• [src] (git submodule)

• [definitions]

• preseed.cfg

Sample Project

Monday 14 February 2011

Page 46: DevOps Introduction @Cegeka

Global Ownership

It’s the javascript

It’s the backend

It’s the database

It’s the network

It’s the server

It’s the storage

Monday 14 February 2011

Page 47: DevOps Introduction @Cegeka

IAAS and PAAS blurring

Pull in both your recipes and your code

Monday 14 February 2011

Page 48: DevOps Introduction @Cegeka

What’s new?

I know all that

Monday 14 February 2011

Page 49: DevOps Introduction @Cegeka

The map is not

the territoryAlfred Korzybski

Monday 14 February 2011

Page 50: DevOps Introduction @Cegeka

Systems Thinking

Optimize the whole not just the individual parts

Monday 14 February 2011

Page 51: DevOps Introduction @Cegeka

Value Stream Mapping

Monday 14 February 2011

Page 52: DevOps Introduction @Cegeka

People make it happen

Monday 14 February 2011

Page 53: DevOps Introduction @Cegeka

Culture & Mindset

Monday 14 February 2011

Page 54: DevOps Introduction @Cegeka

Collaboration

TestersAnalysts

Developers

Security

ArchitectsUI Designers

Network

Sysadmins

not only when things go wrong

Monday 14 February 2011

Page 55: DevOps Introduction @Cegeka

No rock star mentality

Mine are bigger then yours

Monday 14 February 2011

Page 56: DevOps Introduction @Cegeka

Craftsmanship

Monday 14 February 2011

Page 57: DevOps Introduction @Cegeka

Trust

Monday 14 February 2011

Page 58: DevOps Introduction @Cegeka

Collaboration

TestersAnalysts

Developers

Security

ArchitectsUI Designers

Network

Sysadmins

not only when things go wrong

Monday 14 February 2011

Page 59: DevOps Introduction @Cegeka

http://voetstappen.blogspot.com/

Starting a devops culture =

restoring trust

Monday 14 February 2011

Page 60: DevOps Introduction @Cegeka

Interesting Books

Monday 14 February 2011

Page 61: DevOps Introduction @Cegeka

Want to know more?

#devops & #infratalkon twitter & irc

http://devopsdays.orghttp://devopscafe.org

http://planetdevops.netdevops googlegroup

devops-toolchain googlegroup

Monday 14 February 2011

Page 62: DevOps Introduction @Cegeka

Questions?

Monday 14 February 2011

Page 63: DevOps Introduction @Cegeka

The End

Monday 14 February 2011