SlideShare a Scribd company logo
1 of 25
Orc
Zero downtime deployments made easy




                  Tomas Doran (t0m)
                  @bobtfish
                  <bobtfish@bobtfish.net>
                  https://github.com/bobtfish/
Problem space:

• Multiple heterogeneous applications
• Multiple servers per app
• Multiple environments
• Custom deployment solutions / semi-
  manual deployment
Observed problems:
• Support nightmare
• Failed / inconsistent deployments

• New applications extremely costly to
  deploy
Solution:
• Application infrastructure contract
• Defined interface for infrastructure to
  interact with your application:
  • How to launch
  • How to query health
• Any application which complies gets
  continuous deployment - free
Reliable


• Contract conformity checked by a common
  test suite
• CI builds to check deployability
Predictable
• Deployment is model driven
• Store desired state in ‘cmdb’
• Audit live servers, adjust reality to conform
  to desired state



• State machine - easy to test!
Safe
• Each possible step in a deployment is a
  state transition



• Sample live state after each transition - if
  model doesn’t match reality, stop!



• Mcollective agent - flexible per-user + fact
  based permissions for free
Architecture
Participation?
• Need to be able to cleanly remove
  instances from load balancer
• Make load balancer health check do 2
  things:
  • Check app = healthy
  • Check participation = true
• Tatin - tiny REST service to drop state into
Contract URIs
• App:
 • http://localhost:xxxx/info/health
 • http://localhost:xxxx/info/version
• Participation:
 • http://localhost
    :yyyy/app_name/environment_name/insta
    nce_name
deployapp methods

• get status (health + version)
• enable participation
• disable participation
• upgrade version
State machine
Multiple instances

• Discover all instances
• Work out next transition for each instance
• Each transition has a weight
• Sort by weight - take highest weighted
• Repeat until no transitions left
Simple example
    Desired Actual Desired Actual
App                               Action Weight
    version version part    part


                                  Disable
host1   5      4      Y      Y              1
                                   part


                                  Disable
host2   5      4      Y      Y              1
                                   part
Simple example
    Desired Actual Desired Actual
App                               Action Weight
    version version part    part


host1   5      4      Y      N   Upgrade    2



                                  Disable
host2   5      4      Y      Y              1
                                   part
Simple example
    Desired Actual Desired Actual
App                               Action Weight
    version version part    part


                                  Enable
host1   5      5      Y      N              3
                                   part


                                  Disable
host2   5      4      Y      Y              1
                                   part
Simple example
    Desired Actual Desired Actual
App                               Action Weight
    version version part    part


host1   5      5      Y      Y    None      0



                                  Disable
host2   5      4      Y      Y              1
                                   part
Simple example
    Desired Actual Desired Actual
App                               Action Weight
    version version part    part


host1   5      5      Y      Y    None      0



                                  Disable
host2   5      4      Y      N              1
                                   part
Simple example
    Desired Actual Desired Actual
App                               Action Weight
    version version part    part


host1   5      5      Y      Y    None     0



host2   5      4      Y      N   Upgrade   2
Simple example
    Desired Actual Desired Actual
App                               Action Weight
    version version part    part


host1   5      5      Y      Y    None     0



host2   5      5      Y      Y    None     0
A/B groups

• Can run A/B groups of the same app with
  different versions
• Can upgrade non-participating group, test,
  then swap participation.
• Same model just works
Status

• Orc, deployapp + contract test harness
  open source
• Docs still very lacking.
• You need to plug in your own repository
  module (and your own launcher for non jar
  apps)
Todo
• Better deployment (public gem+debs)
• Deployapp configuration rewrite
• http artifact fetcher
• More app launchers - rack/wsgi/psgi apps!
• Docs - specifically load balancer configs +
  installation.
Code

• The ideas here are way more important
  than the code
• Development sponsored by TIM Group
 • Yes, of course we are hiring :)
• https://github.com/youdevise/orc
Thanks!

https://github.com/youdevise/orc




          Questions?

More Related Content

Viewers also liked

85 Gnarly Local SEO Tips for Auto Dealers
85 Gnarly Local SEO Tips for Auto Dealers85 Gnarly Local SEO Tips for Auto Dealers
85 Gnarly Local SEO Tips for Auto DealersGreg Gifford
 
Moving the Needle with Social Media
Moving the Needle with Social MediaMoving the Needle with Social Media
Moving the Needle with Social MediaStrongView
 
Social Media for Travel and Tourism
Social Media for Travel and Tourism Social Media for Travel and Tourism
Social Media for Travel and Tourism Ben Shipley
 
Token statt Cookies dank JWT - #ETKA16
Token statt Cookies dank JWT - #ETKA16Token statt Cookies dank JWT - #ETKA16
Token statt Cookies dank JWT - #ETKA16Markus Schlichting
 
Unit Testing - The Whys, Whens and Hows
Unit Testing - The Whys, Whens and HowsUnit Testing - The Whys, Whens and Hows
Unit Testing - The Whys, Whens and Howsatesgoral
 
Risk based monitoring presentation by triumph research intelligence january 2014
Risk based monitoring presentation by triumph research intelligence january 2014Risk based monitoring presentation by triumph research intelligence january 2014
Risk based monitoring presentation by triumph research intelligence january 2014Triumph Consultancy Services
 
和菓子の持つ伝統要素の尊重をしつつ、抜本的なイメージの改変を目指す。
和菓子の持つ伝統要素の尊重をしつつ、抜本的なイメージの改変を目指す。和菓子の持つ伝統要素の尊重をしつつ、抜本的なイメージの改変を目指す。
和菓子の持つ伝統要素の尊重をしつつ、抜本的なイメージの改変を目指す。stucon
 
Blue moon - abstract acrylic painting
Blue moon - abstract acrylic paintingBlue moon - abstract acrylic painting
Blue moon - abstract acrylic paintingTataro
 
Emailer Generic letter
Emailer Generic letterEmailer Generic letter
Emailer Generic letterShane Thompson
 
Data Defeats Truman – SXSW Panelpicker Pitch
Data Defeats Truman – SXSW Panelpicker PitchData Defeats Truman – SXSW Panelpicker Pitch
Data Defeats Truman – SXSW Panelpicker PitchKyle J. Britt
 
如何讓顧客離不開你
如何讓顧客離不開你如何讓顧客離不開你
如何讓顧客離不開你kkjjkevin03
 
Shodh yatra report compressed copy
Shodh yatra report compressed copyShodh yatra report compressed copy
Shodh yatra report compressed copyMarianne Esders
 
Mattawa, Ontario, Canada, 1970
Mattawa, Ontario, Canada, 1970Mattawa, Ontario, Canada, 1970
Mattawa, Ontario, Canada, 1970Joe Carter
 
UNISA InfoLit Story 24 May 2016
UNISA InfoLit Story 24 May 2016UNISA InfoLit Story 24 May 2016
UNISA InfoLit Story 24 May 2016HELIGLIASA
 

Viewers also liked (17)

85 Gnarly Local SEO Tips for Auto Dealers
85 Gnarly Local SEO Tips for Auto Dealers85 Gnarly Local SEO Tips for Auto Dealers
85 Gnarly Local SEO Tips for Auto Dealers
 
Moving the Needle with Social Media
Moving the Needle with Social MediaMoving the Needle with Social Media
Moving the Needle with Social Media
 
Social Media for Travel and Tourism
Social Media for Travel and Tourism Social Media for Travel and Tourism
Social Media for Travel and Tourism
 
Reda
RedaReda
Reda
 
Token statt Cookies dank JWT - #ETKA16
Token statt Cookies dank JWT - #ETKA16Token statt Cookies dank JWT - #ETKA16
Token statt Cookies dank JWT - #ETKA16
 
Unit Testing - The Whys, Whens and Hows
Unit Testing - The Whys, Whens and HowsUnit Testing - The Whys, Whens and Hows
Unit Testing - The Whys, Whens and Hows
 
Productos químicos de alta calidad Ronald Vera
Productos químicos de alta calidad Ronald Vera Productos químicos de alta calidad Ronald Vera
Productos químicos de alta calidad Ronald Vera
 
Risk based monitoring presentation by triumph research intelligence january 2014
Risk based monitoring presentation by triumph research intelligence january 2014Risk based monitoring presentation by triumph research intelligence january 2014
Risk based monitoring presentation by triumph research intelligence january 2014
 
和菓子の持つ伝統要素の尊重をしつつ、抜本的なイメージの改変を目指す。
和菓子の持つ伝統要素の尊重をしつつ、抜本的なイメージの改変を目指す。和菓子の持つ伝統要素の尊重をしつつ、抜本的なイメージの改変を目指す。
和菓子の持つ伝統要素の尊重をしつつ、抜本的なイメージの改変を目指す。
 
Blue moon - abstract acrylic painting
Blue moon - abstract acrylic paintingBlue moon - abstract acrylic painting
Blue moon - abstract acrylic painting
 
Emailer Generic letter
Emailer Generic letterEmailer Generic letter
Emailer Generic letter
 
Data Defeats Truman – SXSW Panelpicker Pitch
Data Defeats Truman – SXSW Panelpicker PitchData Defeats Truman – SXSW Panelpicker Pitch
Data Defeats Truman – SXSW Panelpicker Pitch
 
如何讓顧客離不開你
如何讓顧客離不開你如何讓顧客離不開你
如何讓顧客離不開你
 
Shodh yatra report compressed copy
Shodh yatra report compressed copyShodh yatra report compressed copy
Shodh yatra report compressed copy
 
Mattawa, Ontario, Canada, 1970
Mattawa, Ontario, Canada, 1970Mattawa, Ontario, Canada, 1970
Mattawa, Ontario, Canada, 1970
 
UNISA InfoLit Story 24 May 2016
UNISA InfoLit Story 24 May 2016UNISA InfoLit Story 24 May 2016
UNISA InfoLit Story 24 May 2016
 
Jardin de julio.
Jardin de julio.Jardin de julio.
Jardin de julio.
 

Similar to London devops - orc

Building and Testing Zonear Web Apps
Building and Testing Zonear Web AppsBuilding and Testing Zonear Web Apps
Building and Testing Zonear Web AppsFrontend_fi
 
Compartmentalized Continuous Integration: Enabling Rapid, Flexible Collaborat...
Compartmentalized Continuous Integration: Enabling Rapid, Flexible Collaborat...Compartmentalized Continuous Integration: Enabling Rapid, Flexible Collaborat...
Compartmentalized Continuous Integration: Enabling Rapid, Flexible Collaborat...Perforce
 
Smau Milano 2016 - Fabio Alessandro Locati
Smau Milano 2016 - Fabio Alessandro LocatiSmau Milano 2016 - Fabio Alessandro Locati
Smau Milano 2016 - Fabio Alessandro LocatiSMAU
 
Vasyl Sydorivskiy - Angular Functional Style
Vasyl Sydorivskiy - Angular Functional StyleVasyl Sydorivskiy - Angular Functional Style
Vasyl Sydorivskiy - Angular Functional StyleInnovecs
 
Continuous Integration for Spark Apps by Sean McIntyre
Continuous Integration for Spark Apps by Sean McIntyreContinuous Integration for Spark Apps by Sean McIntyre
Continuous Integration for Spark Apps by Sean McIntyreSpark Summit
 
Multi-bundle Scoping in OSGi
Multi-bundle Scoping in OSGiMulti-bundle Scoping in OSGi
Multi-bundle Scoping in OSGiglynnormington
 
Conole vilnius 3_nov
Conole vilnius 3_novConole vilnius 3_nov
Conole vilnius 3_novgrainne
 

Similar to London devops - orc (12)

Building and Testing Zonear Web Apps
Building and Testing Zonear Web AppsBuilding and Testing Zonear Web Apps
Building and Testing Zonear Web Apps
 
Compartmentalized Continuous Integration: Enabling Rapid, Flexible Collaborat...
Compartmentalized Continuous Integration: Enabling Rapid, Flexible Collaborat...Compartmentalized Continuous Integration: Enabling Rapid, Flexible Collaborat...
Compartmentalized Continuous Integration: Enabling Rapid, Flexible Collaborat...
 
Git
GitGit
Git
 
Git
GitGit
Git
 
Smau Milano 2016 - Fabio Alessandro Locati
Smau Milano 2016 - Fabio Alessandro LocatiSmau Milano 2016 - Fabio Alessandro Locati
Smau Milano 2016 - Fabio Alessandro Locati
 
Guides To Analyzing WebKit Performance
Guides To Analyzing WebKit PerformanceGuides To Analyzing WebKit Performance
Guides To Analyzing WebKit Performance
 
Switching to Git
Switching to GitSwitching to Git
Switching to Git
 
Vasyl Sydorivskiy - Angular Functional Style
Vasyl Sydorivskiy - Angular Functional StyleVasyl Sydorivskiy - Angular Functional Style
Vasyl Sydorivskiy - Angular Functional Style
 
Continuous Integration for Spark Apps by Sean McIntyre
Continuous Integration for Spark Apps by Sean McIntyreContinuous Integration for Spark Apps by Sean McIntyre
Continuous Integration for Spark Apps by Sean McIntyre
 
Multi-bundle Scoping in OSGi
Multi-bundle Scoping in OSGiMulti-bundle Scoping in OSGi
Multi-bundle Scoping in OSGi
 
Conole vilnius 3_nov
Conole vilnius 3_novConole vilnius 3_nov
Conole vilnius 3_nov
 
Pubmi gitflow
Pubmi gitflowPubmi gitflow
Pubmi gitflow
 

More from Tomas Doran

Empowering developers to deploy their own data stores
Empowering developers to deploy their own data storesEmpowering developers to deploy their own data stores
Empowering developers to deploy their own data storesTomas Doran
 
Dockersh and a brief intro to the docker internals
Dockersh and a brief intro to the docker internalsDockersh and a brief intro to the docker internals
Dockersh and a brief intro to the docker internalsTomas Doran
 
Sensu and Sensibility - Puppetconf 2014
Sensu and Sensibility - Puppetconf 2014Sensu and Sensibility - Puppetconf 2014
Sensu and Sensibility - Puppetconf 2014Tomas Doran
 
Steamlining your puppet development workflow
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflowTomas Doran
 
Building a smarter application stack - service discovery and wiring for Docker
Building a smarter application stack - service discovery and wiring for DockerBuilding a smarter application stack - service discovery and wiring for Docker
Building a smarter application stack - service discovery and wiring for DockerTomas Doran
 
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and JenkinsChasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and JenkinsTomas Doran
 
Deploying puppet code at light speed
Deploying puppet code at light speedDeploying puppet code at light speed
Deploying puppet code at light speedTomas Doran
 
Thinking through puppet code layout
Thinking through puppet code layoutThinking through puppet code layout
Thinking through puppet code layoutTomas Doran
 
Docker puppetcamp london 2013
Docker puppetcamp london 2013Docker puppetcamp london 2013
Docker puppetcamp london 2013Tomas Doran
 
"The worst code I ever wrote"
"The worst code I ever wrote""The worst code I ever wrote"
"The worst code I ever wrote"Tomas Doran
 
Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)Tomas Doran
 
Test driven infrastructure development
Test driven infrastructure developmentTest driven infrastructure development
Test driven infrastructure developmentTomas Doran
 
London devops logging
London devops loggingLondon devops logging
London devops loggingTomas Doran
 
Message:Passing - lpw 2012
Message:Passing - lpw 2012Message:Passing - lpw 2012
Message:Passing - lpw 2012Tomas Doran
 
Webapp security testing
Webapp security testingWebapp security testing
Webapp security testingTomas Doran
 
Webapp security testing
Webapp security testingWebapp security testing
Webapp security testingTomas Doran
 
Dates aghhhh!!?!?!?!
Dates aghhhh!!?!?!?!Dates aghhhh!!?!?!?!
Dates aghhhh!!?!?!?!Tomas Doran
 
Messaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new frameworkMessaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new frameworkTomas Doran
 
Cooking a rabbit pie
Cooking a rabbit pieCooking a rabbit pie
Cooking a rabbit pieTomas Doran
 

More from Tomas Doran (20)

Empowering developers to deploy their own data stores
Empowering developers to deploy their own data storesEmpowering developers to deploy their own data stores
Empowering developers to deploy their own data stores
 
Dockersh and a brief intro to the docker internals
Dockersh and a brief intro to the docker internalsDockersh and a brief intro to the docker internals
Dockersh and a brief intro to the docker internals
 
Sensu and Sensibility - Puppetconf 2014
Sensu and Sensibility - Puppetconf 2014Sensu and Sensibility - Puppetconf 2014
Sensu and Sensibility - Puppetconf 2014
 
Steamlining your puppet development workflow
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflow
 
Building a smarter application stack - service discovery and wiring for Docker
Building a smarter application stack - service discovery and wiring for DockerBuilding a smarter application stack - service discovery and wiring for Docker
Building a smarter application stack - service discovery and wiring for Docker
 
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and JenkinsChasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
 
Deploying puppet code at light speed
Deploying puppet code at light speedDeploying puppet code at light speed
Deploying puppet code at light speed
 
Thinking through puppet code layout
Thinking through puppet code layoutThinking through puppet code layout
Thinking through puppet code layout
 
Docker puppetcamp london 2013
Docker puppetcamp london 2013Docker puppetcamp london 2013
Docker puppetcamp london 2013
 
"The worst code I ever wrote"
"The worst code I ever wrote""The worst code I ever wrote"
"The worst code I ever wrote"
 
Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)
 
Test driven infrastructure development
Test driven infrastructure developmentTest driven infrastructure development
Test driven infrastructure development
 
London devops logging
London devops loggingLondon devops logging
London devops logging
 
Message:Passing - lpw 2012
Message:Passing - lpw 2012Message:Passing - lpw 2012
Message:Passing - lpw 2012
 
Webapp security testing
Webapp security testingWebapp security testing
Webapp security testing
 
Webapp security testing
Webapp security testingWebapp security testing
Webapp security testing
 
Dates aghhhh!!?!?!?!
Dates aghhhh!!?!?!?!Dates aghhhh!!?!?!?!
Dates aghhhh!!?!?!?!
 
Messaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new frameworkMessaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new framework
 
Zero mq logs
Zero mq logsZero mq logs
Zero mq logs
 
Cooking a rabbit pie
Cooking a rabbit pieCooking a rabbit pie
Cooking a rabbit pie
 

London devops - orc

  • 1. Orc Zero downtime deployments made easy Tomas Doran (t0m) @bobtfish <bobtfish@bobtfish.net> https://github.com/bobtfish/
  • 2. Problem space: • Multiple heterogeneous applications • Multiple servers per app • Multiple environments • Custom deployment solutions / semi- manual deployment
  • 3. Observed problems: • Support nightmare • Failed / inconsistent deployments • New applications extremely costly to deploy
  • 4. Solution: • Application infrastructure contract • Defined interface for infrastructure to interact with your application: • How to launch • How to query health • Any application which complies gets continuous deployment - free
  • 5. Reliable • Contract conformity checked by a common test suite • CI builds to check deployability
  • 6. Predictable • Deployment is model driven • Store desired state in ‘cmdb’ • Audit live servers, adjust reality to conform to desired state • State machine - easy to test!
  • 7. Safe • Each possible step in a deployment is a state transition • Sample live state after each transition - if model doesn’t match reality, stop! • Mcollective agent - flexible per-user + fact based permissions for free
  • 9. Participation? • Need to be able to cleanly remove instances from load balancer • Make load balancer health check do 2 things: • Check app = healthy • Check participation = true • Tatin - tiny REST service to drop state into
  • 10. Contract URIs • App: • http://localhost:xxxx/info/health • http://localhost:xxxx/info/version • Participation: • http://localhost :yyyy/app_name/environment_name/insta nce_name
  • 11. deployapp methods • get status (health + version) • enable participation • disable participation • upgrade version
  • 13. Multiple instances • Discover all instances • Work out next transition for each instance • Each transition has a weight • Sort by weight - take highest weighted • Repeat until no transitions left
  • 14. Simple example Desired Actual Desired Actual App Action Weight version version part part Disable host1 5 4 Y Y 1 part Disable host2 5 4 Y Y 1 part
  • 15. Simple example Desired Actual Desired Actual App Action Weight version version part part host1 5 4 Y N Upgrade 2 Disable host2 5 4 Y Y 1 part
  • 16. Simple example Desired Actual Desired Actual App Action Weight version version part part Enable host1 5 5 Y N 3 part Disable host2 5 4 Y Y 1 part
  • 17. Simple example Desired Actual Desired Actual App Action Weight version version part part host1 5 5 Y Y None 0 Disable host2 5 4 Y Y 1 part
  • 18. Simple example Desired Actual Desired Actual App Action Weight version version part part host1 5 5 Y Y None 0 Disable host2 5 4 Y N 1 part
  • 19. Simple example Desired Actual Desired Actual App Action Weight version version part part host1 5 5 Y Y None 0 host2 5 4 Y N Upgrade 2
  • 20. Simple example Desired Actual Desired Actual App Action Weight version version part part host1 5 5 Y Y None 0 host2 5 5 Y Y None 0
  • 21. A/B groups • Can run A/B groups of the same app with different versions • Can upgrade non-participating group, test, then swap participation. • Same model just works
  • 22. Status • Orc, deployapp + contract test harness open source • Docs still very lacking. • You need to plug in your own repository module (and your own launcher for non jar apps)
  • 23. Todo • Better deployment (public gem+debs) • Deployapp configuration rewrite • http artifact fetcher • More app launchers - rack/wsgi/psgi apps! • Docs - specifically load balancer configs + installation.
  • 24. Code • The ideas here are way more important than the code • Development sponsored by TIM Group • Yes, of course we are hiring :) • https://github.com/youdevise/orc