Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Immutable Infrastructure: the new App Deployment

Immutable Infrastructure: the new App Deployment

Immutable Infrastructure: the new App Deployment

App deployment and server setup are complex, error-prone and time-consuming. They require OS installers, package managers, configuration recipes, install and deployment scripts, server tuning, hardening and more. But... Is this really necessary? Are we trapped in a mindset of doing things this way just because that's how they've always done?

What if we could start over and radically simplify all this? What if, within seconds, and with a single command, we could wrap our application into the bare minimal machine required to run it? What if this machine could then be transported and run unchanged on our laptop and in the cloud? How do the various platforms and tools like AWS, Docker, Heroku and Boxfuse fit into this picture? What are their strengths and weaknesses? When should you use them?

This talk is for developers and architects wishing to radically improve and simplify how they deploy their applications. It takes Continuous Delivery to a level far beyond what you've seen today. Welcome to Immutable Infrastructure generation. This is the new black.

Axel Fontaine

May 25, 2015
Tweet

More Decks by Axel Fontaine

Other Decks in Technology

Transcript

  1. About Axel Fontaine • Founder and CEO of Boxfuse •

    Over 15 years industry experience • Continuous Delivery expert • Regular speaker at tech conferences • JavaOne RockStar in 2014 @axelfontaine
  2. Heater that gives off a little bit of light Light

    that gives off a little bit of heat
  3. POLL: what type of infrastructure are you running on? •

    On Premise • Colocation • Root Server • Cloud
  4. + = ON PREM + Challenges • Power, Network, Cooling

    • Physical Security • Physical Space • Procurement, Vendor Management • Capacity Planning • Financing • OS + Patches • App + Updates
  5. Can change as long as it complies with the interface

    contract + = COLO + Undifferentiated Heavy Lifting Our responsibility
  6. = ROOT SERVER + Undifferentiated Heavy Lifting Our responsibility Can

    change as long as it complies with the interface contract
  7. Room For Innovation + Undifferentiated Heavy Lifting Could this be

    our industry’s Edison Screw? Simple, stable, standards- compliant interface
  8. POLL: which level of automation are you at? • Build

    • Unit Tests • Continuous Integration • Acceptance Tests • Continuous Deployment (Code) • Continuous Deployment (Code + DB + Configuration) • Infrastructure
  9. • One immutable unit • Regenerated after every change •

    Promoted from Environment to Environment Classic Mistake: Build per Environment
  10. OS Kernel Libraries Language App Server App OS Kernel Libraries

    Language App Server App OS Kernel Libraries Language App Server App Multiple instances in multiple Environments
  11. OS Kernel Libraries Language App Server App Multiple instances in

    multiple Environments • All instances should be as similar as possible (any difference is a potential source of errors) • That also includes your local Dev environment! • Must be able to reliably provision new ones (and recreate existing ones from scratch)
  12. OS Kernel Libraries Language App Server App OS Kernel Libraries

    Language App Server App OS Kernel Libraries Language App Server App Updates Updates Updates Sysadmin
  13. If I had asked my customers what they wanted they

    would have said a faster horse. Henry Ford
  14. OS Kernel Libraries Language App Server App OS Kernel Libraries

    Language App Server App OS Kernel Libraries Language App Server App Updates Updates Updates Sysadmin
  15. OS Kernel Libraries Language App Server App OS Kernel Libraries

    Language App Server App OS Kernel Libraries Language App Server App Updates Updates Updates Automated Sysadmin
  16. Every day, AWS adds enough server capacity to power the

    whole $5B enterprise Amazon.com was in 2003. Weekends included.
  17. "Advanced Test Reactor" by Argonne National Laboratory - originally posted

    to Flickr as Advanced Test Reactor core, Idaho National LaboratoryUploaded using F2ComButton. Licensed under CC BY-SA 2.0 via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:Advanced_Test_Reac tor.jpg#mediaviewer/File:Advanced_Test_Reactor.jpg "RIAN archive 341194 Kursk Nuclear Power Plant" by RIA Novosti archive, image #341194 / Sergey Pyatakov / CC-BY-SA 3.0. Licensed under CC BY-SA 3.0 via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:RIAN_archive_341194_ Kursk_Nuclear_Power_Plant.jpg#mediaviewer/File:RIAN_archi ve_341194_Kursk_Nuclear_Power_Plant.jpg Control Plane Data Plane
  18. • Shift to a world of abundance (no more resource

    scarcity) • Clean Control Plane/Data Plane split with API-based provisioning • Cost-based Architectures with the ability to turn infrastructure off Benefits of the cloud
  19. OS Kernel Libraries Language App Server App OS Kernel Libraries

    Language App Server App OS Kernel Libraries Language App Server App Updates
  20. Running servers in production should be like going backpacking. You

    take the bare minimum with you. Anything else is going to hurt. A Wise Man
  21. Editors Daemons OS Kernel Libraries Utilities Drivers App App Server

    Package Mgr Compilers SSH Firewall Compatibility Man Pages Language Log Files Users Shells Network Cable
  22. high uptime is a liability The longer an instance is

    up, the harder it becomes to recreate exactly (and it will fail eventually!)
  23. How to solve service discovery ? Use a stable entry

    point with an internal registry Bootable App Bootable App Bootable App ? Elastic Load Balancer
  24. What about security ? • Smallest possible attack surface •

    Vastly reduced implications due to low uptime and transient nature of instances • Very difficult to exploit other systems because essential tooling is missing
  25. • Bake as much configuration as possible for all environments

    directly in the Bootable App • Use environment detection and auto-configuration • Pass remaining configuration at startup and expose it as environment variables what about configuration ???
  26. what about the database ??? • Keep all persistent state,

    including the database, out of the instance • Many good hosted solutions available like Amazon RDS or Google Cloud SQL • Use a database migration tool like Flyway to update on application startup
  27. Bootable App what about the logs ??? Ship logs to

    a central log server where they can be • aggregated • stored and backuped • indexed • searched through a nice web UI Many good hosted solutions • Loggly • Logentries • Papertrail • …
  28. what about sessions ??? Bootable App Keep session in an

    encrypted and signed cookie • avoids session timeouts • avoids server clustering & session replication • avoids sticky sessions & server affinity
  29. Load Balancer App v2 App v1 App v2 App v1

    Logs Availability Zone 1 Availability Zone 2
  30. understanding modern CPUs Both Intel and AMD have hardware support

    for virtualization • isolation • performance
  31. Bootable App Hardware Hypervisor Bootable App Hardware Hypervisor OS+Container Runtime

    Bootable App Hardware OS+Container Runtime On Prem On Prem / Cloud Cloud Only makes sense if you cannot afford $9.60/month granularity
  32. Bootable App Hardware Hypervisor Bootable App Hardware Hypervisor OS+Container Runtime

    Bootable App Hardware OS+Container Runtime On Prem On Prem / Cloud Cloud Only makes sense if you cannot afford 1.3 cents /hour granularity
  33. • One immutable unit • Regenerated after every change •

    Promoted from Environment to Environment Classic Mistake: Build per Environment
  34. Bootable App • One immutable unit • Regenerated after every

    change • Promoted from Environment to Environment Classic Mistake: Build per Environment