Share
Embed
Deploying distributed software services to the cloud without breaking a sweat
From CodePaLOUsa 2011.
Susan Potter
March 03, 2011
Transcript
79 slides
-
# finger $(whoami) Login: susan Name: Susan Potter Directory: /home/susan
Shell: /bin/zsh On since Mon 29 Sep 1997 21:18 (GMT) on tty1 from :0 No mail on [email protected] Plan: twitter: @SusanPotter github: mbbx6spp -
# finger $(whoami) Login: susan Name: Susan Potter Directory: /home/susan
Shell: /bin/zsh On since Mon 29 Sep 1997 21:18 (GMT) on tty1 from :0 No mail on [email protected] Plan: twitter: @SusanPotter github: mbbx6spp -
# finger $(whoami) Login: susan Name: Susan Potter Directory: /home/susan
Shell: /bin/zsh On since Mon 29 Sep 1997 21:18 (GMT) on tty1 from :0 No mail on [email protected] Plan: twitter: @SusanPotter github: mbbx6spp -
# finger $(whoami) Login: susan Name: Susan Potter Directory: /home/susan
Shell: /bin/zsh On since Mon 29 Sep 1997 21:18 (GMT) on tty1 from :0 No mail on [email protected] Plan: twitter: @SusanPotter github: mbbx6spp -
# finger $(whoami) Login: susan Name: Susan Potter Directory: /home/susan
Shell: /bin/zsh On since Mon 29 Sep 1997 21:18 (GMT) on tty1 from :0 No mail on [email protected] Plan: twitter: @SusanPotter github: mbbx6spp -
Scope of Talk • Approaches • Best Practices • Pitfalls
• Possibilities -
Scope of Talk • Approaches • Best Practices • Pitfalls
• Possibilities • (not) Chef vs Puppet -
Scope of Talk • Approaches • Best Practices • Pitfalls
• Possibilities • (not) Chef vs Puppet • (not) Why Cloud? -
Scope of Talk • Approaches • Best Practices • Pitfalls
• Possibilities • (not) Chef vs Puppet • (not) Why Cloud? • (not) Why DevOps? -
Scope of Talk • Approaches • Best Practices • Pitfalls
• Possibilities • (not) Chef vs Puppet • (not) Why Cloud? • (not) Why DevOps? • (not) Which Delivery Model? -
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 -
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 -
Cloud: Delivery Models [1/2] Software (as a Service) Platform (as
a Service) Infrastructure (as a Service) -
Cloud: Delivery Models [1/2] Software (as a Service) Platform (as
a Service) Infrastructure (as a Service) -
Cloud: Delivery Models [1/2] Software (as a Service) Platform (as
a Service) Infrastructure (as a Service) -
Cloud: Delivery Models [1/2] Software (as a Service) Platform (as
a Service) Infrastructure (as a Service) -
Cloud: Characteristics • Instant on-demand • Managed by others •
Virtualized performance, reliability -
Cloud: Characteristics • Instant on-demand • Managed by others •
Virtualized performance, reliability • Lack control predictability, reliability, quality -
Cloud: Characteristics • Instant on-demand • Managed by others •
Pay as you go • Virtualized performance, reliability • Lack control predictability, reliability, quality -
Cloud: Characteristics • Instant on-demand • Managed by others •
Pay as you go • Virtualized performance, reliability • Lack control predictability, reliability, quality • Pay as you go! -
DevOps: Definition [1/2] • Share responsibility across organizational boundaries •
Invest in people by reducing finger pointing [togetherness] and human error [automation] -
DevOps: Definition [1/2] • Share responsibility across organizational boundaries •
Invest in people by reducing finger pointing [togetherness] and human error [automation] • Manage infrastructure not priority queues of production issues -
DevOps: Definition [1/2] • Share responsibility across organizational boundaries •
Invest in people by reducing finger pointing [togetherness] and human error [automation] • Manage infrastructure not priority queues of production issues • Make infrastructure predictable repeatable, testable, deterministic -
Deployment Pipeline: Prerequisites • Design for cloud e.g. decentralized, layered,
parallelized, collaborating single purpose services, async I/O -
Deployment Pipeline: Prerequisites • Design for cloud e.g. decentralized, layered,
parallelized, collaborating single purpose services, async I/O • Always-ready codebase buildable, testable, deployable -
Deployment Pipeline: Prerequisites • Design for cloud e.g. decentralized, layered,
parallelized, collaborating single purpose services, async I/O • Always-ready codebase buildable, testable, deployable • Managed infrastructure read: SCM and consistent distribution to target nodes -
Deployment Pipeline: Prerequisites • Design for cloud e.g. decentralized, layered,
parallelized, collaborating single purpose services, async I/O • Always-ready codebase buildable, testable, deployable • Managed infrastructure read: SCM and consistent distribution to target nodes • Expect [system] failure handle failures sensibly, policies for timeouts, etc -
Deployment Pipeline: Prerequisites • Design for cloud e.g. decentralized, layered,
parallelized, collaborating single purpose services, async I/O • Always-ready codebase buildable, testable, deployable • Managed infrastructure read: SCM and consistent distribution to target nodes • Expect [system] failure handle failures sensibly, policies for timeouts, etc • Test early and often! outside-in development helps -
Deployment Pipeline: Prerequisites • Design for cloud e.g. decentralized, layered,
parallelized, collaborating single purpose services, async I/O • Always-ready codebase buildable, testable, deployable • Managed infrastructure read: SCM and consistent distribution to target nodes • Expect [system] failure handle failures sensibly, policies for timeouts, etc • Test early and often! outside-in development helps • Build from the ground up layer infrastructure, inject configuration at boot/load time -
Deployment: Common Bottlenecks • Automation build, provision, configure, integrate Figure:
http://www.flickr.com/people/laenulfean/ -
Deployment: Common Bottlenecks • Automation build, provision, configure, integrate •
Distribution binaries, assets, configuration Figure: http://www.flickr.com/people/laenulfean/ -
Deployment: Common Bottlenecks • Automation build, provision, configure, integrate •
Distribution binaries, assets, configuration • Timeframe restricted window of time Figure: http://www.flickr.com/people/laenulfean/ -
Deployment: Common Bottlenecks • Automation build, provision, configure, integrate •
Distribution binaries, assets, configuration • Timeframe restricted window of time • Data schema updates, data migrations Figure: http://www.flickr.com/people/laenulfean/ -
Automation Approaches Figure: http://www.flickr.com/people/krazydad/ • Full stack server-driven e.g. Chef/Knife,
Puppet Master • Full stack client e.g. Chef Solo -
Automation Approaches Figure: http://www.flickr.com/people/krazydad/ • Full stack server-driven e.g. Chef/Knife,
Puppet Master • Full stack client e.g. Chef Solo • Application-tier client e.g. Capistrano, Vlad the Deployer -
Automation Approaches Figure: http://www.flickr.com/people/krazydad/ • Full stack server-driven e.g. Chef/Knife,
Puppet Master • Full stack client e.g. Chef Solo • Application-tier client e.g. Capistrano, Vlad the Deployer • Command & control e.g. Vertibrae (inactive), Nanite -
Distribution Approaches Figure: http://www.flickr.com/people/nsalt • Shared filesystem less security and
reliability in community/public or across zones/regions -
Distribution Approaches Figure: http://www.flickr.com/people/nsalt • Shared filesystem less security and
reliability in community/public or across zones/regions • Pull from source control higher time variance as target nodes increase -
Distribution Approaches Figure: http://www.flickr.com/people/nsalt • Shared filesystem less security and
reliability in community/public or across zones/regions • Pull from source control higher time variance as target nodes increase • Bittorrent or similar e.g. Twitter’s Murder -
Timeframe Approaches Figure: http://www.flickr.com/people/athenicsword • Hot upgrades e.g. Erlang/OTP appup/code_change/3
• Rolling upgrades Software design considerations -
Timeframe Approaches Figure: http://www.flickr.com/people/athenicsword • Hot upgrades e.g. Erlang/OTP appup/code_change/3
• Rolling upgrades Software design considerations • Environment replacement Flip a switch, acceptance <-> production -
Data Approaches Figure: http://www.flickr.com/people/shanghaidaddy • Scriptable schema Alternative: NoSQL, but.
. . • Automated migrations e.g. Rails’ Migrations -
Data Approaches Figure: http://www.flickr.com/people/shanghaidaddy • Scriptable schema Alternative: NoSQL, but.
. . • Automated migrations e.g. Rails’ Migrations • Sanity checks e.g. cherry picked, consistency checks -
Live by the meter. Die by the meter. [Workarounds] Figure:
http://www.flickr.com/people/dirkjankraan/ -
Possibilities • Dynamic resource allocation allocate based on load, time
of day, day of week/month -
Possibilities • Dynamic resource allocation allocate based on load, time
of day, day of week/month • Canary deployments (e.g. A/B testing) -
Possibilities • Dynamic resource allocation allocate based on load, time
of day, day of week/month • Canary deployments (e.g. A/B testing) • Multi-region or multi-provider relocate based on time of day, failover