20 minutes to production
play

20 Minutes to Production Zero Downtime Paul Payne @paulrpayne - PowerPoint PPT Presentation

20 Minutes to Production Zero Downtime Paul Payne @paulrpayne http://payne.io Presentation code can be found at: github.com/payneio/qcon-gtin.git Photos from http://unsplash.com . GTIN (bar code) Product Lookup Service 18 million


  1. 20 Minutes to Production Zero Downtime Paul Payne @paulrpayne http://payne.io Presentation code can be found at: github.com/payneio/qcon-gtin.git Photos from http://unsplash.com .

  2. GTIN (bar code) Product Lookup Service 18 million products.

  3. We need this change right now! 0

  4. Three Parts 1. Microservices Coding with confidence. 2. Containers Sensible units of deployment. 3. Deployment Patterns for zero downtime.

  5. Part One 1. Microservices Coding with confidence. 2. Containers Sensible units of deployment. 3. Deployment Patterns for zero downtime.

  6. Microservices µ Single responsibility. Independently Minimal, easily understood code. = deployable Loosely coupled. functionality Modular. Composable. Maintain their own state.

  7. Microservice Quality Assurance � Liberal in what you accept. Conservative in what you send (Robustness Principle). � Fast errors (compile time vs. run time). � Fast compile, build, test iterations. � TDD. Confidence.

  8. Demo In which the presenter demonstrates an update to the microservice with defensive coding practices and fast build and test steps with the aid of Go.

  9. Part Two 1. Microservices Coding with confidence. 2. Containers Sensible units of deployment. 3. Deployment Patterns for zero downtime.

  10. Application Containers “An application container is a way of packaging and executing processes on a computer system that isolates the application from the underlying host operating system” —https://github.com/appc/spec, 2015. Various projects... brought into the kernel... and packaged up. chroot (1979) namespaces systemd-nspawn jail cgroups LXC Linux-VServer SELinux lmctfy OpenVZ AppArmor libvirt-lxc ... btrs/aufs/device mapper/etc Docker / libcontainer ... rkt / appc ...

  11. Virtualization Overhead App A App B bins/libs bins/libs App A App B Guest OS Guest OS bins/libs bins/libs Hypervisor Container Engine Host OS (Linux) Host OS (Linux) Bare Metal Bare Metal VM Container

  12. Better Hardware Utilization Virtual Machines Containers

  13. The Right Abstraction for Software

  14. Immutable Infrastructure Microservices Analogy from Bill Baker, Microsoft

  15. Clean Org Interface (Reverse Conway’s Law) The DevOPS continuum OPS Dev The mythical DevOPS unicorn Installing and configuring VMs. Installing and configuring hardware. Configuring app environments. Distributing VMs. VMs Creating, building and installing apps. Monitoring and fixing hardware. Making VM snapshots. Working with devs on bad VMs. Installing OS updates. Installing and configuring hardware. Containers Configuring app environments. Distributing containers. Creating, building and installing apps. Monitoring and fixing hardware. Rejecting bad containers.

  16. Demo $ make In which the presenter demonstrates the simple containerization of the microservice using Docker and make.

  17. Part Three 1. Microservices Coding with confidence. 2. Containers Sensible units of deployment. 3. Deployment Patterns for zero downtime.

  18. The Datacenter as a Computer Luiz Barroso & Urs Hölzle (2009). http://doi.org/10.2200/S00516ED2V01Y201306CAC024

  19. A Virtual Machine Detour on the Cluster Scheduling Timeline 1999 2003 2006 2009 2012 VMWare Xen EC2 Eucalyptus OpenStack Late 1960s 1977 1984 1994 2001 2003 2006 2008 2009 2013 2014 2015 Mainframe ARCnet VAXcluster IBM S/390 HP Google cgroups LXC Mesos Docker Kubernetes Docker Job Control Parallel Utility Borg Swarm Sysplex Data namespaces CoreOS Multics Center Mesos Burroughs Marathon Solaris OpenVZ jails B5700 zones Google Omega LXC 0.9

  20. Cluster Schedulers, aka Microservice Platforms DCOS docker + swarm + compose

  21. A Microservice Platform Pattern VISIBLE VOLATILE PERSISTENT Visible/Volatile/Persistent —Peter Gillardmoss, 2012 Phoenix servers —Martin Fowler, 2012

  22. Live Deployment Canary Blue-Green Rolling Deploy Deploy Deploy Jez Humble and David Farley (2010). Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation, Addison-Wesley.

  23. The General Deployment Story VISIBLE VOLATILE 1 1 Public 2 2 Private 3 3

  24. Demo Public etcd GTIN GTIN Private In which the presenter demonstrates a fleetctl canary and rolling deploy with zero downtime using CoreOS and Vulcand. GTIN

  25. The Result GTIN Win!

  26. Other Reactions “Wait! You’re not deploying to production NOW are you??!” “I think we found a bug in the system.”

  27. Three Parts 1. Microservices Coding with confidence. 2. Containers Sensible units of deployment. 3. Deployment Patterns for zero downtime.

  28. Getting There Part Four (surprise!)

  29. Infrastructure as Code Quick reproducible infrastructure. Entire Blue/Green stacks. Cattle, not pets! Google Cloud Platform Amazon Web Services Cross-platform Deployment Manager CloudFormation Terraform

  30. Anti-Corruption Layers Each service manages its own data; ie. maintains its own table. Integrate through interfaces, not data stores! Our canonical GTIN data is kept in a commercial enterprise product. We copy the data we need for our service to Dynamo, syncing daily.

  31. Application Strangler Wrap a proxy layer around the entire enterprise application. Route requests to your microservices as you bring them online. Someday, none of your legacy app will remain. http://martinfowler.com/bliki/StranglerApplication.html. Image by http://journals.worldnomads.com/beckandphil.

  32. Build to Learn

  33. 20 Minutes to Production Zero Downtime Paul Payne @paulrpayne http://payne.io Presentation code can be found at: github.com/payneio/qcon-gtin.git Photos from http://unsplash.com .

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend