YOU ARE DOWNLOADING DOCUMENT

Please tick the box to continue:

Transcript
Page 1: OpenSlava   Infrastructure Automation Patterns

Organizers Top Media Partner Media Partner Supporter

Antons Kranga DevOps:Cloud Automation October 11, 2013

Page 2: OpenSlava   Infrastructure Automation Patterns

Presenter

- Technology Architect at Accenture

- 10+ years experience in Enterprise Development

- Projects: - Accenture Foundation Platform for Java - Accenture Cloud Platform

- ALPJ - Monsoon

Page 3: OpenSlava   Infrastructure Automation Patterns

www.sli.do/openslavaAsk questions online

Page 4: OpenSlava   Infrastructure Automation Patterns

Copyright © 2013 Accenture All rights reserved.

Cloud

Page 5: OpenSlava   Infrastructure Automation Patterns

This is cloud

Page 6: OpenSlava   Infrastructure Automation Patterns

Copyright © 2013 Accenture All rights reserved.

Definition of Cloud Computing

Page 7: OpenSlava   Infrastructure Automation Patterns

Copyright © 2013 Accenture All rights reserved.

Cloud Computing

Page 8: OpenSlava   Infrastructure Automation Patterns

Copyright © 2013 Accenture All rights reserved.

Accenture Cloud Platform

Testing as Service Monsoon ALPJ etc

Cloud Broker API

Page 9: OpenSlava   Infrastructure Automation Patterns

Copyright © 2012 Accenture All rights reserved.

Challenges of Cloud (What IaaS Offers)

Web Tier

Application Tier

Database

Page 10: OpenSlava   Infrastructure Automation Patterns

Copyright © 2012 Accenture All rights reserved.

Challenges of Cloud (What Users Want)

Web Tier

Application Tier

Database

Page 11: OpenSlava   Infrastructure Automation Patterns

Infrastructure services and patterns

Page 12: OpenSlava   Infrastructure Automation Patterns

example

Page 13: OpenSlava   Infrastructure Automation Patterns

include_recipe “java“ package "tomcat6“ artifact_deploy "tomcat6“ do version "latest“ artifact_location "foo.war" deploy_to node[:tomcat][:work_dir] end service "tomcat6" do action [:enable, :start] end

OS Type: RedHat OS Version: 6.2

Tomcat Home: /etc/tomcatTomcat Port: 8080

MySQL IP: 10.10.0.1 MySQL Root Password: password

RecipeAttributes

OS Specific Instructions

Page 14: OpenSlava   Infrastructure Automation Patterns

Copyright © 2012 Accenture All rights reserved.

Chef Workstation Virtualized Infrastructure

Page 15: OpenSlava   Infrastructure Automation Patterns

Copyright © 2012 Accenture All rights reserved.

Chef Workstation Virtualized Infrastructure

Chef Server

...Roles

Cookbooks

REST

CMDB

Page 16: OpenSlava   Infrastructure Automation Patterns

Copyright © 2012 Accenture All rights reserved.

Chef Workstation Virtualized Infrastructure

Chef Server

...Roles

Cookbooks

REST

CMDB

Page 17: OpenSlava   Infrastructure Automation Patterns

Copyright © 2012 Accenture All rights reserved.

Chef Workstation Virtualized Infrastructure

Chef Server

knife

...Roles

Cookbooks

REST

CMDB

Uses SSH tobootstraps Chef

client

Page 18: OpenSlava   Infrastructure Automation Patterns

Copyright © 2012 Accenture All rights reserved.

Chef Workstation Virtualized Infrastructure

Chef Server

knife

...Roles

Cookbooks

REST

CMDB

chef client

tomcat6

Page 19: OpenSlava   Infrastructure Automation Patterns

Chef Workstation Virtualized Infrastructure

Chef Server

knife

...Roles

Cookbooks

REST

CMDB

chef client

tomcat6

HTTP call signed with certificate

Page 20: OpenSlava   Infrastructure Automation Patterns

Chef Workstation Virtualized Infrastructure

Chef Server

knife

...Roles

Cookbooks

REST

CMDB

chef client

tomcat6

Page 21: OpenSlava   Infrastructure Automation Patterns

Copyright © 2012 Accenture All rights reserved.

Chef Workstation Virtualized Infrastructure

Chef Server

knife

...Roles

Cookbooks

REST

CMDB

chef client

tomcat6

tomca

t6

java

iptab

les

Cookbooks

Page 22: OpenSlava   Infrastructure Automation Patterns

Copyright © 2012 Accenture All rights reserved.

Chef Workstation Virtualized Infrastructure

Chef Server

knife

...Roles

Cookbooks

REST

CMDB

chef client

tomcat6

tomca

t6

java

iptab

les

Cookbooks

upload facts

ohai

Page 23: OpenSlava   Infrastructure Automation Patterns

Service discovery

Page 24: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N

Page 25: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N

Database

Register RegisterRegisterRegister

Page 26: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N

Database

Register RegisterRegisterRegister

Discover nodes

Page 27: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N

Database

Register RegisterRegisterRegister

Discover nodes

Page 28: OpenSlava   Infrastructure Automation Patterns

Load balancing

Page 29: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N

LB

Page 30: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N

LBSingle point of

failure

Page 31: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N

LB LB2Heartbeat

Page 32: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N

LB LB2Heartbeat

Shared virtual IP

Page 33: OpenSlava   Infrastructure Automation Patterns

Dealing with sticky sessions

Page 34: OpenSlava   Infrastructure Automation Patterns

Tomcat 1 Tomcat 2 Tomcat 3 Tomcat N

LB LB2Heartbeat

Shared virtual IP

Page 35: OpenSlava   Infrastructure Automation Patterns

Tomcat 1 Tomcat 2 Tomcat 3 Tomcat N

LB LB2Heartbeat

Shared virtual IP

Memcached 1 Memcached 2 Memcached 3 Memcached N

Save session Save session Save session Save session

Same ServerSame ServerSame ServerSame Server

Page 36: OpenSlava   Infrastructure Automation Patterns

Tomcat 1 Tomcat 2 Tomcat 3 Tomcat N

LB LB2Heartbeat

Shared virtual IP

Memcached 1 Memcached 2 Memcached 3 Memcached N

Save session Save session Save session Save session

Same ServerSame ServerSame ServerSame Server

Repl Repl Repl

Page 37: OpenSlava   Infrastructure Automation Patterns

Tomcat 1 Tomcat 2 Tomcat 3 Tomcat N

LB LB2Heartbeat

Shared virtual IP

Memcached 1 Memcached 2 Memcached 3 Memcached N

Save session Save session Save session Save session

Same ServerSame ServerSame ServerSame Server

Repl Repl Repl

If session repl not hitting netw capacity

Page 38: OpenSlava   Infrastructure Automation Patterns

Tomcat 1 Tomcat 2 Tomcat 3 Tomcat N

LB LB2Heartbeat

Shared virtual IP

Memcached

save session

Large RAM VM

Page 39: OpenSlava   Infrastructure Automation Patterns

Elasticity

Page 40: OpenSlava   Infrastructure Automation Patterns

Tomcat 1 Tomcat 2 Tomcat 3 Tomcat N

LB LB2Heartbeat

Shared virtual IP

Memcached 1 Memcached 2 Memcached 3 Memcached N

Save session Save session Save session Save session

Same ServerSame ServerSame ServerSame Server

Repl Repl Repl

Page 41: OpenSlava   Infrastructure Automation Patterns

Tomcat 1 Tomcat 2 Tomcat 3 Tomcat N

LB LB2Heartbeat

Shared virtual IP

Memcached 1 Memcached 2 Memcached 3 Memcached N

Save session Save session Save session Save session

Same ServerSame ServerSame ServerSame Server

Repl Repl Repl

Auto scaling group

Page 42: OpenSlava   Infrastructure Automation Patterns

Dealing with sticky sessions

Page 43: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N

Database

Register RegisterRegisterRegister

Discover nodes

Page 44: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N

Message Broker

publish facts publish facts publish facts publish facts

Page 45: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N

Message Broker

publish facts publish facts publish facts publish factssubscribe events subscribe events subscribe events subscribe events

Page 46: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N

Message Broker

publish facts publish facts publish facts publish factssubscribe events subscribe events subscribe events subscribe events

heartbeat heartbeatheartbeatheartbeat

Page 47: OpenSlava   Infrastructure Automation Patterns

Virtualized Infrastructure

Chef Server

Message BrokerCMDB

Infra Management: 1. Provisioning 2. Service Discovery

Page 48: OpenSlava   Infrastructure Automation Patterns

Operating Scenarios: Operations

Virtualized Infrastructure

Chef Server

mCollectiveCMDB

Server Orchestration: 1. Cluster Orchestration 2. Scalability 3. Deployment Orchestration

Infra Management: 1. Provisioning 2. Patching

Multi zone example

Page 49: OpenSlava   Infrastructure Automation Patterns

Distributed logging

Page 50: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N

Auto scaling group

Page 51: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N

Cloud storage

Auto scaling group

Page 52: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N

Log collector

Cloud storage

Auto scaling group

Log agent Log agent Log agent Log agent

Page 53: OpenSlava   Infrastructure Automation Patterns

Phoenix Server

Page 54: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N

Page 55: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N

Want to apply change/patch

Page 56: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N Node M

Page 57: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N Node M

Migrate data

All changes included

Page 58: OpenSlava   Infrastructure Automation Patterns

Node 1 Node 2 Node 3 Node N Node M

Shared data

Cloud storage

Page 59: OpenSlava   Infrastructure Automation Patterns

Test and learn

Page 60: OpenSlava   Infrastructure Automation Patterns

Virtualized Infrastructure

Chef Server

CMDB

Page 61: OpenSlava   Infrastructure Automation Patterns

Virtualized Infrastructure

Chef Server

CMDB

Chaos Monkey

Page 62: OpenSlava   Infrastructure Automation Patterns

Cookbook development

Page 63: OpenSlava   Infrastructure Automation Patterns

Stop forking, really!!!

Page 64: OpenSlava   Infrastructure Automation Patterns

community cookbook

wrapper cookbook

wrapper cookbook adds new functionality to community version of the cookbook instead of changing it directly

Page 65: OpenSlava   Infrastructure Automation Patterns

community cookbook

wrapper cookbook

include_recipe “tomcat“ chef_gem "chef-rewind“ rewind "template[catalina.xml]“ do # add your custom staff end

Page 66: OpenSlava   Infrastructure Automation Patterns

Copyright © 2012 Accenture All rights reserved.

• Food Critic: Cookbook style analysis tool

• URL: http://acrmp.github.com/foodcritic/

• Integration: Travis CI

• Cookbook Style Guide: https://github.com/ampledata/cookbook-style-guide

Cookbook Quality

Page 67: OpenSlava   Infrastructure Automation Patterns

Takeaways

- Accenture Cloud Platform

- Monsoon

- Accenture Lightweight Platform for Java

- Accenture Foundation Platform for Java

- Opscode Chef

Page 68: OpenSlava   Infrastructure Automation Patterns

Discussion

www.sli.do/openslava


Related Documents