distributed software services to the cloud without breaking a sweat

79

Upload: jose-ferreiro

Post on 17-Jan-2015

1.089 views

Category:

Technology


1 download

DESCRIPTION

More at http://www.codepalousa.comDeploying Software Services in the Cloud!

TRANSCRIPT

Page 1: Distributed software services to the cloud without breaking a sweat
Page 2: Distributed software services to the cloud without breaking a sweat
Page 3: Distributed software services to the cloud without breaking a sweat
Page 4: Distributed software services to the cloud without breaking a sweat

# finger $(whoami)Login: susan Name: Susan PotterDirectory: /home/susan Shell: /bin/zshOn since Mon 29 Sep 1997 21:18 (GMT) on tty1 from :0No mail on [email protected]:twitter: @SusanPottergithub: mbbx6spp

Page 5: Distributed software services to the cloud without breaking a sweat

# finger $(whoami)Login: susan Name: Susan PotterDirectory: /home/susan Shell: /bin/zshOn since Mon 29 Sep 1997 21:18 (GMT) on tty1 from :0No mail on [email protected]:twitter: @SusanPottergithub: mbbx6spp

Page 6: Distributed software services to the cloud without breaking a sweat

# finger $(whoami)Login: susan Name: Susan PotterDirectory: /home/susan Shell: /bin/zshOn since Mon 29 Sep 1997 21:18 (GMT) on tty1 from :0No mail on [email protected]:twitter: @SusanPottergithub: mbbx6spp

Page 7: Distributed software services to the cloud without breaking a sweat

# finger $(whoami)Login: susan Name: Susan PotterDirectory: /home/susan Shell: /bin/zshOn since Mon 29 Sep 1997 21:18 (GMT) on tty1 from :0No mail on [email protected]:twitter: @SusanPottergithub: mbbx6spp

Page 8: Distributed software services to the cloud without breaking a sweat

# finger $(whoami)Login: susan Name: Susan PotterDirectory: /home/susan Shell: /bin/zshOn since Mon 29 Sep 1997 21:18 (GMT) on tty1 from :0No mail on [email protected]:twitter: @SusanPottergithub: mbbx6spp

Page 9: Distributed software services to the cloud without breaking a sweat

Scope of Talk

• Approaches

• Best Practices• Pitfalls• Possibilities

• (not) Chef vs Puppet• (not) Why Cloud?• (not) Why DevOps?• (not) Which Delivery Model?• (not) Release Management• (not) Monitoring

Page 10: Distributed software services to the cloud without breaking a sweat

Scope of Talk

• Approaches• Best Practices

• Pitfalls• Possibilities

• (not) Chef vs Puppet• (not) Why Cloud?• (not) Why DevOps?• (not) Which Delivery Model?• (not) Release Management• (not) Monitoring

Page 11: Distributed software services to the cloud without breaking a sweat

Scope of Talk

• Approaches• Best Practices• Pitfalls

• Possibilities

• (not) Chef vs Puppet• (not) Why Cloud?• (not) Why DevOps?• (not) Which Delivery Model?• (not) Release Management• (not) Monitoring

Page 12: Distributed software services to the cloud without breaking a sweat

Scope of Talk

• Approaches• Best Practices• Pitfalls• Possibilities

• (not) Chef vs Puppet• (not) Why Cloud?• (not) Why DevOps?• (not) Which Delivery Model?• (not) Release Management• (not) Monitoring

Page 13: Distributed software services to the cloud without breaking a sweat

Scope of Talk

• Approaches• Best Practices• Pitfalls• Possibilities

• (not) Chef vs Puppet

• (not) Why Cloud?• (not) Why DevOps?• (not) Which Delivery Model?• (not) Release Management• (not) Monitoring

Page 14: Distributed software services to the cloud without breaking a sweat

Scope of Talk

• Approaches• Best Practices• Pitfalls• Possibilities

• (not) Chef vs Puppet• (not) Why Cloud?

• (not) Why DevOps?• (not) Which Delivery Model?• (not) Release Management• (not) Monitoring

Page 15: Distributed software services to the cloud without breaking a sweat

Scope of Talk

• Approaches• Best Practices• Pitfalls• Possibilities

• (not) Chef vs Puppet• (not) Why Cloud?• (not) Why DevOps?

• (not) Which Delivery Model?• (not) Release Management• (not) Monitoring

Page 16: Distributed software services to the cloud without breaking a sweat

Scope of Talk

• Approaches• Best Practices• Pitfalls• Possibilities

• (not) Chef vs Puppet• (not) Why Cloud?• (not) Why DevOps?• (not) Which Delivery Model?

• (not) Release Management• (not) Monitoring

Page 17: Distributed software services to the cloud without breaking a sweat

Scope of Talk

• Approaches• Best Practices• Pitfalls• Possibilities

• (not) Chef vs Puppet• (not) Why Cloud?• (not) Why DevOps?• (not) Which Delivery Model?• (not) Release Management

• (not) Monitoring

Page 18: Distributed software services to the cloud without breaking a sweat

Scope of Talk

• Approaches• Best Practices• Pitfalls• Possibilities

• (not) Chef vs Puppet• (not) Why Cloud?• (not) Why DevOps?• (not) Which Delivery Model?• (not) Release Management• (not) Monitoring

Page 19: Distributed software services to the cloud without breaking a sweat

Cloud

buzzzzz

Page 20: Distributed software services to the cloud without breaking a sweat

Cloud: Delivery Models [1/2]

Software(as a Service)

Platform(as a Service)

Infrastructure(as a Service)

Page 21: Distributed software services to the cloud without breaking a sweat

Cloud: Delivery Models [1/2]

Software(as a Service)

Platform(as a Service)

Infrastructure(as a Service)

Page 22: Distributed software services to the cloud without breaking a sweat

Cloud: Delivery Models [1/2]

Software(as a Service)

Platform(as a Service)

Infrastructure(as a Service)

Page 23: Distributed software services to the cloud without breaking a sweat

Cloud: Delivery Models [1/2]

Software(as a Service)

Platform(as a Service)

Infrastructure(as a Service)

Page 24: Distributed software services to the cloud without breaking a sweat

Cloud: Delivery Models [2/2]

Page 25: Distributed software services to the cloud without breaking a sweat

Cloud: Characteristics

• Instanton-demand

• Managedby others

• Payas you go

• Virtualizedperformance, reliability

• Lack controlpredictability, reliability, quality

• Payas you go!

Page 26: Distributed software services to the cloud without breaking a sweat

Cloud: Characteristics

• Instanton-demand

• Managedby others

• Payas you go

• Virtualizedperformance, reliability

• Lack controlpredictability, reliability, quality

• Payas you go!

Page 27: Distributed software services to the cloud without breaking a sweat

Cloud: Characteristics

• Instanton-demand

• Managedby others

• Payas you go

• Virtualizedperformance, reliability

• Lack controlpredictability, reliability, quality

• Payas you go!

Page 28: Distributed software services to the cloud without breaking a sweat

Cloud: Characteristics

• Instanton-demand

• Managedby others

• Payas you go

• Virtualizedperformance, reliability

• Lack controlpredictability, reliability, quality

• Payas you go!

Page 29: Distributed software services to the cloud without breaking a sweat

Cloud: Characteristics

• Instanton-demand

• Managedby others

• Payas you go

• Virtualizedperformance, reliability

• Lack controlpredictability, reliability, quality

• Payas you go!

Page 30: Distributed software services to the cloud without breaking a sweat

Cloud: Characteristics

• Instanton-demand

• Managedby others

• Payas you go

• Virtualizedperformance, reliability

• Lack controlpredictability, reliability, quality

• Payas you go!

Page 31: Distributed software services to the cloud without breaking a sweat

DevOps

Is it a command?

Page 32: Distributed software services to the cloud without breaking a sweat

DevOps: Definition [1/2]

• Share responsibilityacross organizational boundaries

• Invest in peopleby reducing finger pointing [togetherness] and human error [automation]

• Manage infrastructurenot priority queues of production issues

• Make infrastructure predictablerepeatable, testable, deterministic

Page 33: Distributed software services to the cloud without breaking a sweat

DevOps: Definition [1/2]

• Share responsibilityacross organizational boundaries

• Invest in peopleby reducing finger pointing [togetherness] and human error [automation]

• Manage infrastructurenot priority queues of production issues

• Make infrastructure predictablerepeatable, testable, deterministic

Page 34: Distributed software services to the cloud without breaking a sweat

DevOps: Definition [1/2]

• Share responsibilityacross organizational boundaries

• Invest in peopleby reducing finger pointing [togetherness] and human error [automation]

• Manage infrastructurenot priority queues of production issues

• Make infrastructure predictablerepeatable, testable, deterministic

Page 35: Distributed software services to the cloud without breaking a sweat

DevOps: Definition [1/2]

• Share responsibilityacross organizational boundaries

• Invest in peopleby reducing finger pointing [togetherness] and human error [automation]

• Manage infrastructurenot priority queues of production issues

• Make infrastructure predictablerepeatable, testable, deterministic

Page 36: Distributed software services to the cloud without breaking a sweat

DevOps: Definition [2/2]

Page 37: Distributed software services to the cloud without breaking a sweat

Deployment Pipeline

commit -> production

Page 38: Distributed software services to the cloud without breaking a sweat

Deployment Pipeline: Prerequisites

• Design for cloude.g. decentralized, layered, parallelized, collaborating single purpose services, async I/O

• Always-ready codebasebuildable, testable, deployable

• Managed infrastructureread: SCM and consistent distribution to target nodes

• Expect [system] failurehandle failures sensibly, policies for timeouts, etc

• Test early and often!outside-in development helps

• Build from the ground uplayer infrastructure, inject configuration at boot/load time

Page 39: Distributed software services to the cloud without breaking a sweat

Deployment Pipeline: Prerequisites

• Design for cloude.g. decentralized, layered, parallelized, collaborating single purpose services, async I/O

• Always-ready codebasebuildable, testable, deployable

• Managed infrastructureread: SCM and consistent distribution to target nodes

• Expect [system] failurehandle failures sensibly, policies for timeouts, etc

• Test early and often!outside-in development helps

• Build from the ground uplayer infrastructure, inject configuration at boot/load time

Page 40: Distributed software services to the cloud without breaking a sweat

Deployment Pipeline: Prerequisites

• Design for cloude.g. decentralized, layered, parallelized, collaborating single purpose services, async I/O

• Always-ready codebasebuildable, testable, deployable

• Managed infrastructureread: SCM and consistent distribution to target nodes

• Expect [system] failurehandle failures sensibly, policies for timeouts, etc

• Test early and often!outside-in development helps

• Build from the ground uplayer infrastructure, inject configuration at boot/load time

Page 41: Distributed software services to the cloud without breaking a sweat

Deployment Pipeline: Prerequisites

• Design for cloude.g. decentralized, layered, parallelized, collaborating single purpose services, async I/O

• Always-ready codebasebuildable, testable, deployable

• Managed infrastructureread: SCM and consistent distribution to target nodes

• Expect [system] failurehandle failures sensibly, policies for timeouts, etc

• Test early and often!outside-in development helps

• Build from the ground uplayer infrastructure, inject configuration at boot/load time

Page 42: Distributed software services to the cloud without breaking a sweat

Deployment Pipeline: Prerequisites

• Design for cloude.g. decentralized, layered, parallelized, collaborating single purpose services, async I/O

• Always-ready codebasebuildable, testable, deployable

• Managed infrastructureread: SCM and consistent distribution to target nodes

• Expect [system] failurehandle failures sensibly, policies for timeouts, etc

• Test early and often!outside-in development helps

• Build from the ground uplayer infrastructure, inject configuration at boot/load time

Page 43: Distributed software services to the cloud without breaking a sweat

Deployment Pipeline: Prerequisites

• Design for cloude.g. decentralized, layered, parallelized, collaborating single purpose services, async I/O

• Always-ready codebasebuildable, testable, deployable

• Managed infrastructureread: SCM and consistent distribution to target nodes

• Expect [system] failurehandle failures sensibly, policies for timeouts, etc

• Test early and often!outside-in development helps

• Build from the ground uplayer infrastructure, inject configuration at boot/load time

Page 44: Distributed software services to the cloud without breaking a sweat

Deployment: Common Bottlenecks

• Automationbuild, provision, configure, integrate

• Distributionbinaries, assets, configuration

• Timeframerestricted window of time

• Dataschema updates, data migrations

Figure: http://www.flickr.com/people/laenulfean/

Page 45: Distributed software services to the cloud without breaking a sweat

Deployment: Common Bottlenecks

• Automationbuild, provision, configure, integrate

• Distributionbinaries, assets, configuration

• Timeframerestricted window of time

• Dataschema updates, data migrations

Figure: http://www.flickr.com/people/laenulfean/

Page 46: Distributed software services to the cloud without breaking a sweat

Deployment: Common Bottlenecks

• Automationbuild, provision, configure, integrate

• Distributionbinaries, assets, configuration

• Timeframerestricted window of time

• Dataschema updates, data migrations

Figure: http://www.flickr.com/people/laenulfean/

Page 47: Distributed software services to the cloud without breaking a sweat

Deployment: Common Bottlenecks

• Automationbuild, provision, configure, integrate

• Distributionbinaries, assets, configuration

• Timeframerestricted window of time

• Dataschema updates, data migrations

Figure: http://www.flickr.com/people/laenulfean/

Page 48: Distributed software services to the cloud without breaking a sweat

Solution Approaches

Solve problems,don’t use tools!

Page 49: Distributed software services to the cloud without breaking a sweat

Automation Approaches

Figure: http://www.flickr.com/people/krazydad/

• Full stack server-drivene.g. Chef/Knife, Puppet Master

• Full stack cliente.g. Chef Solo

• Application-tier cliente.g. Capistrano, Vlad the Deployer

• Command & controle.g. Vertibrae (inactive), Nanite

Page 50: Distributed software services to the cloud without breaking a sweat

Automation Approaches

Figure: http://www.flickr.com/people/krazydad/

• Full stack server-drivene.g. Chef/Knife, Puppet Master

• Full stack cliente.g. Chef Solo

• Application-tier cliente.g. Capistrano, Vlad the Deployer

• Command & controle.g. Vertibrae (inactive), Nanite

Page 51: Distributed software services to the cloud without breaking a sweat

Automation Approaches

Figure: http://www.flickr.com/people/krazydad/

• Full stack server-drivene.g. Chef/Knife, Puppet Master

• Full stack cliente.g. Chef Solo

• Application-tier cliente.g. Capistrano, Vlad the Deployer

• Command & controle.g. Vertibrae (inactive), Nanite

Page 52: Distributed software services to the cloud without breaking a sweat

Automation Approaches

Figure: http://www.flickr.com/people/krazydad/

• Full stack server-drivene.g. Chef/Knife, Puppet Master

• Full stack cliente.g. Chef Solo

• Application-tier cliente.g. Capistrano, Vlad the Deployer

• Command & controle.g. Vertibrae (inactive), Nanite

Page 53: Distributed software services to the cloud without breaking a sweat

Distribution Approaches

Figure: http://www.flickr.com/people/nsalt

• Shared filesystemless security and reliability in community/public or across

zones/regions

• Pull from source controlhigher time variance as target nodes increase

• Bittorrent or similare.g. Twitter’s Murder

Page 54: Distributed software services to the cloud without breaking a sweat

Distribution Approaches

Figure: http://www.flickr.com/people/nsalt

• Shared filesystemless security and reliability in community/public or across

zones/regions

• Pull from source controlhigher time variance as target nodes increase

• Bittorrent or similare.g. Twitter’s Murder

Page 55: Distributed software services to the cloud without breaking a sweat

Distribution Approaches

Figure: http://www.flickr.com/people/nsalt

• Shared filesystemless security and reliability in community/public or across

zones/regions

• Pull from source controlhigher time variance as target nodes increase

• Bittorrent or similare.g. Twitter’s Murder

Page 56: Distributed software services to the cloud without breaking a sweat

Timeframe Approaches

Figure: http://www.flickr.com/people/athenicsword

• Hot upgradese.g. Erlang/OTP appup/code_change/3

• Rolling upgradesSoftware design considerations

• Environment replacementFlip a switch, acceptance <-> production

Page 57: Distributed software services to the cloud without breaking a sweat

Timeframe Approaches

Figure: http://www.flickr.com/people/athenicsword

• Hot upgradese.g. Erlang/OTP appup/code_change/3

• Rolling upgradesSoftware design considerations

• Environment replacementFlip a switch, acceptance <-> production

Page 58: Distributed software services to the cloud without breaking a sweat

Timeframe Approaches

Figure: http://www.flickr.com/people/athenicsword

• Hot upgradese.g. Erlang/OTP appup/code_change/3

• Rolling upgradesSoftware design considerations

• Environment replacementFlip a switch, acceptance <-> production

Page 59: Distributed software services to the cloud without breaking a sweat

Data Approaches

Figure: http://www.flickr.com/people/shanghaidaddy

• Scriptable schemaAlternative: NoSQL, but. . .

• Automated migrationse.g. Rails’ Migrations

• Sanity checkse.g. cherry picked, consistency checks

Page 60: Distributed software services to the cloud without breaking a sweat

Data Approaches

Figure: http://www.flickr.com/people/shanghaidaddy

• Scriptable schemaAlternative: NoSQL, but. . .

• Automated migrationse.g. Rails’ Migrations

• Sanity checkse.g. cherry picked, consistency checks

Page 61: Distributed software services to the cloud without breaking a sweat

Data Approaches

Figure: http://www.flickr.com/people/shanghaidaddy

• Scriptable schemaAlternative: NoSQL, but. . .

• Automated migrationse.g. Rails’ Migrations

• Sanity checkse.g. cherry picked, consistency checks

Page 62: Distributed software services to the cloud without breaking a sweat

Common Pitfalls & Workarounds

Page 63: Distributed software services to the cloud without breaking a sweat

Organizational Culture

Figure: http://www.flickr.com/people/lucgaloppin/

Page 64: Distributed software services to the cloud without breaking a sweat

Organizational Culture [Workaround]

Figure: http://www.flickr.com/photos/42682395@N04/

Page 65: Distributed software services to the cloud without breaking a sweat

Feature Branching

Figure: http://www.flickr.com/photos/33939293@N02/

Page 66: Distributed software services to the cloud without breaking a sweat

Feature Branching [Workaround]

DON’T!

Page 67: Distributed software services to the cloud without breaking a sweat

Feature Branching [Workaround]

DON’T!

Page 68: Distributed software services to the cloud without breaking a sweat

Live by the meter.Die by the meter.

Figure: WARNING

Page 69: Distributed software services to the cloud without breaking a sweat

Live by the meter.Die by the meter. [Workarounds]

Figure: http://www.flickr.com/people/dirkjankraan/

Page 70: Distributed software services to the cloud without breaking a sweat

Great Expectations

Figure: http://www.flickr.com/people/atoxinsocks/

Page 71: Distributed software services to the cloud without breaking a sweat

Great Expectations [Workaround]

Figure: http://www.flickr.com/people/dirkjankraan/

Page 72: Distributed software services to the cloud without breaking a sweat

Note: Design & Idempotency

Figure: A Twitter dialog between me and @jlouis666

Page 73: Distributed software services to the cloud without breaking a sweat

Possibilities

Where.next?

Page 74: Distributed software services to the cloud without breaking a sweat

Possibilities

• Dynamic resource allocationallocate based on load, time of day, day of week/month

• Canary deployments(e.g. A/B testing)

• Multi-region or multi-providerrelocate based on time of day, failover

Page 75: Distributed software services to the cloud without breaking a sweat

Possibilities

• Dynamic resource allocationallocate based on load, time of day, day of week/month

• Canary deployments(e.g. A/B testing)

• Multi-region or multi-providerrelocate based on time of day, failover

Page 76: Distributed software services to the cloud without breaking a sweat

Possibilities

• Dynamic resource allocationallocate based on load, time of day, day of week/month

• Canary deployments(e.g. A/B testing)

• Multi-region or multi-providerrelocate based on time of day, failover

Page 77: Distributed software services to the cloud without breaking a sweat

Possibilities

• Dynamic resource allocationallocate based on load, time of day, day of week/month

• Canary deployments(e.g. A/B testing)

• Multi-region or multi-providerrelocate based on time of day, failover

Page 78: Distributed software services to the cloud without breaking a sweat

Questions?

Figure: http://www.flickr.com/photos/42682395@N04/

@SusanPotter

Page 79: Distributed software services to the cloud without breaking a sweat

Questions?

Figure: http://www.flickr.com/photos/42682395@N04/

@SusanPotter