Automating Your Infrastructure

47
Automating Your Infrastructure Antons Kranga, OUG Harmony 2012, 1, June 2012

Transcript of Automating Your Infrastructure

Page 1: Automating Your Infrastructure

Automating Your Infrastructure Antons Kranga, OUG Harmony 2012, 1, June 2012

Page 2: Automating Your Infrastructure

Name: Antons Kranga

Role: Technology Architect, Technology Trainer

Works: Accenture, Member of JUG Latvia

Experience: 10+ in IT, Java

Current assignment: Cloud Computing.

Page 3: Automating Your Infrastructure

Problem

Page 4: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 4

Trends in IT

© behindthecloud.net

Page 5: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 5

IT complexity and the timeline

© Mitchell Hill, Opscode,

199

0

199

1

199

2

199

3

199

4

199

5

199

6

199

7

199

8

199

9

200

0

200

1

200

2

200

3

200

4

200

5

200

6

200

7

200

8

200

9

201

0

201

1

201

2

201

3

201

4

201

51980 1981 1982 1983 1984 1985 1986 1987 1988 1989

Virtual Nodes

Physical Hardware

1980 Mainframe

1990 Client/Server

2000 Datacenter

2010+ Cloud

Page 6: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 6

Managing IT Complexity

Web Servers

Application

Servers

Database

Page 7: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 7

Managing IT Complexity

Web Servers

Application

Servers

Database

+1 server

Page 8: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 8

Managing IT Complexity

Web Servers

Application

Servers

Database

20+ changes

Page 9: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 9

Take IT Into the Cloud

Page 10: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 10

Take IT Into the Cloud

Cloud gives huge

Virtualization

Power

Page 11: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 11

Take IT Into the Cloud

Cloud gives huge

Virtualization

Power Power at low cost

Page 12: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 12

Take IT Into the Cloud

…and Cloud

Infrastructure

Increases

Page 13: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 13

Take IT Into the Cloud

Cost of change

increases

exponentially

Page 14: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 14

Take IT Into the Cloud

Changes

increases

exponentially

As well as

infrastructure

complexity

Page 15: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 15

Take IT Into the Cloud

How will we

manage our

infrastructure?

Page 16: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 16

• Virtualization Efficiency

• Infrastructure and Configuration

Complexity

• Security, Availability etc

• Cloud Provider Lock-in

• Critical Skills Shortage

Challenges of Cloud Adoption

Page 17: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 17

Example: Log Collection Becomes Complex

Example of Facebook Scribe

Page 18: Automating Your Infrastructure

How to survive in the Clouds?

Page 19: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 19

Why Automate?

• Scalable

Infrastructure

• Accelerate Changes

• Cloud Provider

Abstraction

• Leverage Skills

Demand

• Manage

Configuration

Page 20: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 20

• Tight Integration with Infrastructure

• Enterprise Ready

• Write DSL (not shell commands)

• Promote Reuse

• Active Community

Configuration Management Tools

Page 21: Automating Your Infrastructure

Chef Overview

Page 22: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 22

Infrastructure automation platform

What is Chef?

Page 23: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 23

Chef Users write Cookbooks and

Recipes to describe infrastructure in

code

What is Chef?

Page 24: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 24

Anatomy of the Cookbook

Cookbook

Recipe Attributes

Configuration

Artifacts

Page 25: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 25

Anatomy of the Cookbook

Cookbook

Recipe Attributes

Configuration

Artifacts

Written in

Ruby DSL

Page 26: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 26

Anatomy of the Cookbook

Cookbook

Recipe Attributes

Configuration

Artifacts

Resource

Recipe operates

with platform

agnostic resources

Page 27: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 27

Anatomy of the Cookbook

Cookbook

Recipe Attributes

Configuration

Artifacts

Providers Providers

Providers

Resource

Ensures that

configuration

matches to the

platform

Page 28: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 28

Anatomy of the Cookbook

Cookbook

Recipe Attributes

Configuration

Artifacts

Providers Providers

Providers

Resource

Node and

cookbook

configuration

properties

Page 29: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 29

Anatomy of the Cookbook

Cookbook

Recipe Attributes

Configuration

Artifacts

Providers Providers

Providers

Resource

Cookbook

contain other

configuration

information

Page 30: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 30

Anatomy of the Cookbook

Cookbook

Recipe Attributes

Configuration

Artifacts

Providers Providers

Providers

Resource

Templates Files Libs

Page 31: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 31

Chef Architecture

Chef Server

(Rest API)

Remote Node Remote Node

Remote Node

Chef Server

(private or

hosted)

Page 32: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 32

Chef Architecture

Chef Server

(Rest API)

Remote Node Remote Node

Remote Node

Chef Server

(private or

hosted)

May have

WebUI

Page 33: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 33

Chef Architecture

Chef Server

(Rest API)

Remote Node Remote Node

Remote Node

Nodes in your

infrastructure,

managed by

chef server

Page 34: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 34

Chef Architecture

Chef Server

(Rest API)

Remote Node Remote Node

Remote Node

CouchDB

cookbooks

attributes

databags

Stores all nodes

configuration

attributes,

cookbooks etc

Page 35: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 35

Chef Architecture

Chef Server

(Rest API)

Remote Node Remote Node

Remote Node

CouchDB

cookbooks

attributes

databags

All data

stored in

JSON

Page 36: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 36

Chef Architecture

Chef Server

(Rest API)

Remote Node Remote Node

Remote Node

CouchDB

cookbooks

attributes

databags

solr search

Can be used by

user or

cookbook

Page 37: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 37

Chef Architecture

Chef Server

(Rest API)

Remote Node Remote Node

Remote Node

CouchDB

cookbooks

attributes

databags

solr search

Can be used by

user or

cookbook

Provides powerful

search capabilities

for CoachDB

Page 38: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 38

Chef Architecture

Chef Server

(Rest API)

Remote Node Remote Node

Remote Node

CouchDB

cookbooks

attributes

databags

solr search

RabbitMQ

Stores and

forwards data from

Chef to solr indexer

Page 39: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 39

Chef Architecture

Chef Server

(Rest API)

Remote Node Remote Node

Remote Node

CouchDB

cookbooks

attributes

databags

solr search

RabbitMQ

Stores and

forwards data from

Chef to solr indexer

Updates solr

indexer

Page 40: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 40

Chef Architecture

Chef Server

(Rest API)

Remote Node Remote Node

Remote Node

CouchDB

cookbooks

attributes

databags

solr search

RabbitMQ

Chef Client

All recipes has

been combined in

run list and

executed by chef

client

Page 41: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 41

Chef Architecture

Chef Server

(Rest API)

Remote Node Remote Node

Remote Node

CouchDB

cookbooks

attributes

databags

solr search

RabbitMQ

Chef Client

Chef client uses

for execution “pull”

strategy which is

more flexible in

real life

Page 42: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 42

Chef Architecture

Chef Server

(Rest API)

Remote Node Remote Node

Remote Node

CouchDB

cookbooks

attributes

databags

solr search

RabbitMQ

Chef Client Ohai

Ohai is the tool

to discover

platform

attributes

Page 43: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 43

Chef Architecture

Chef Server

(Rest API)

Remote Node Remote Node

Remote Node

CouchDB

cookbooks

attributes

databags

solr search

RabbitMQ

Chef Client Ohai

User Workstation knife knife

knife

Page 44: Automating Your Infrastructure

Copyright © 2012 Accenture All rights reserved. 44

Chef Architecture

Chef Server

(Rest API)

Remote Node Remote Node

Remote Node

CouchDB

cookbooks

attributes

databags

solr search

RabbitMQ

Chef Client Ohai

User Workstation knife knife

knife

User executes

knife CLI to

operate with Chef

Server

Page 45: Automating Your Infrastructure

Demo!

Page 46: Automating Your Infrastructure

Questions?

Reading…

(video) Chef in 5 minutes

http://goo.gl/Of1p5 Cookbook Community

http://goo.gl/yAlPA Cookbooks from 37 Signals

http://goo.gl/uHC7A

Page 47: Automating Your Infrastructure

Thank You!