SlideShare a Scribd company logo
Immutable Infrastructure
With Docker and EC2
Docker Conf 2014
Michael Bryzek
CTO & Co-Founder Gilt
michael@gilt.com / @mbryzek
http://tech.gilt.com / @gilttech
What is Gilt?
Founded in 2007
World’s best brands and products at 50-70% off
New products launch at noon EST
Limited inventory – products constantly sell out
Over 1000 employees
Gilt Tech
• ~150 people
• Strategy to attract great people and enable
them to innovate
• Lots of Small Teams
• Micro services architecture
• 300+ services
• ~1000 git repos
• Busy days see > 100 production releases
• > 10k requests / second
Immutable Infrastructure Why it Matters
We believe innovation fuels growth.
Part of our strategy to accelerate innovation
Is to create truly autonomous teams
Supported by tooling and automated processes
to relentlessly decrease risk of change
Lots of Small Applications (LOSA)
• Technology Strategy focused on:
• Autonomy
• Decentralization
• Parallelism
• Isolation
Teams and LOSA
• Lots of Small Teams
• 4-10 people / team
• Have all “ingredients” to succeed
• Deliver across stack for most projects
Defining Risk
Immutable Infrastructure with Docker and EC2
Move Fast
with
Minimal Risk
What that Actually Means
Defining Risk
Probability (event)
* Cost(event)
* Number of occurrences
There is a risk to doing nothing
Reducing Probability(event)
• Testing
• Manual or Automated
• Prefer automated for long term
• Not making changes
• Peer review
• Kaizen
• Immutability
• Ownership / Pride
• Experience
Reducing Cost(event)
• Small change sets
• Verification in target environment
• Incremental rollout
• Automated rollout / rollback
Reducing NumberOccurrences(event)
• Instant Rollback
• Great Monitoring and Alerting
Modern Software Deployment
1. Foundation of continuous delivery
2. Each deploy immutable
3. Incremental rollout
4. Metrics and alerting
Continuous Delivery @ Gilt Pre Docker
sbt release-remote
1. Build an RPM in Jenkins
2. Deploy RPM to test environment
3. Run unit and integration tests
4. Deploy to one node in production
5. Run healthcheck, auto rollback if necessary
6. Repeat 4-6 on remaining nodes
Continuous Delivery @ Gilt w/ Docker
ionblaster new api 1.2.3
ionblaster traffic api
1.2.2 90
1.2.3 10
1. Build docker container
2. Create new “stack” of infrastructure
3. Run container on each node in stack
4. Assign DNS to new stack
5. Manage traffic from old to new
ionblaster new api 0.4.2
Immutable Infrastructure / Docker
Huge win w/ docker
Dependencies in Dockerfile
Focus instead on cloud and new stacks
Docker and Play Framework
$ sbt stage
$ more api/Dockerfile
FROM giltarchitecture/
ubuntu-openjdk-7-jre-headless:12.0.4
ADD . /apidoc
ENTRYPOINT ["/apidoc/bin/apidoc-api"]
Sample command to start play
container image
-run “
--expose 80
-p 9000:80
giltarchitecture/apidoc-api-1-2-3
–Dhttp.port=90
-Dconfig.resource=xxx.conf
”
Immutability w/ Docker
Immutability emerges naturally when using Docker
Upgrade Java? New version, new infrastructure,
new containers.
Security patch? New version, new infrastructure,
new containers.
Eliminate surprise for application owners.
Automate Incremental Rollout
Core area of focus now
ionroller api 1.2.3 1.2.4 “24 hours”
Measure response time and status codes
- triggers based on tolerance between versions
Instant Rollback
If prior version around – just move traffic
ionblaster traffic api 1.2.3 100
If not, same as before - deploy version
But then can revise garbage collection policy for
the app to decrease risk of a future event. (Kaizen)
Amazing Metrics and Alerting
Reporting and alerting is hard
Used nagios, graphite, open TSDB w/ limited
success.
We are now building a REST API for alerting on top
of influxdb (open source time series db). Plan to
open source if successful.
Lessons Learned: Incremental Rollout
Minimize number of versions in production at any
one time – e.g. “at most 2”
Garbage collection important, but keep prior
versions around for long enough (1 day? 1 week?)
Different apps have different requirements on
rollout time – back to calculation of Risk and the
Cost(event)
Lessons Learned - PAAS
You must have platform as a service; impossible to
build well if not your core business.
It’s tempting to build out a PAAS; but the number
of tools needed to make this work reliably at scale
is large.
Lessons Learned: Alerting
Core interface:
Send me at most one alert every n hours
Core challenge always:
• Signal to noise ratio critical and first class
• Human tendency to ignore over time
Immutable Infra w/ Docker and EC2
• Decrease Probability(Event)
• Immutability
• Decrease Cost(Event)
• Verification in target env w/ no user traffic
• Incremental Rollout
• Automated rollout/rollback
• Reduce NumberOccurrences(event)
• Instant Rollback
Thank You
Michael Bryzek
CTO & Co-Founder Gilt
michael@gilt.com / @mbryzek
http://tech.gilt.com / @gilttech

More Related Content

PDF
Cloud Native Unleashed
QAware GmbH
 
PDF
Terraform Code Reviews: Supercharged with Conftest
Jay Wallace
 
PDF
Secure Architecture and Programming 101
Mario-Leander Reimer
 
PPTX
Rancher presentation august 2017
Sebastiaan van Steenis
 
PPTX
The foundation for digital transformation: Red Hat Cloud Suite
Eric D. Schabell
 
PPTX
Open the Stack: How to easily plan and install your OpenStack deployment
Eric D. Schabell
 
PDF
Cloud Native, Microservices and SRE/Chaos Engineering: The new Rules of The G...
Diego Pacheco
 
PDF
Microservices reativos usando a stack do Netflix na AWS
Diego Pacheco
 
Cloud Native Unleashed
QAware GmbH
 
Terraform Code Reviews: Supercharged with Conftest
Jay Wallace
 
Secure Architecture and Programming 101
Mario-Leander Reimer
 
Rancher presentation august 2017
Sebastiaan van Steenis
 
The foundation for digital transformation: Red Hat Cloud Suite
Eric D. Schabell
 
Open the Stack: How to easily plan and install your OpenStack deployment
Eric D. Schabell
 
Cloud Native, Microservices and SRE/Chaos Engineering: The new Rules of The G...
Diego Pacheco
 
Microservices reativos usando a stack do Netflix na AWS
Diego Pacheco
 

What's hot (20)

PDF
CI and CD with Spinnaker
VMware Tanzu
 
PPTX
DockerCon 2017: Docker in China
Zhimin Tang
 
PPTX
DockerCon 16 - Moby's Cool Hack Session
Docker, Inc.
 
PDF
Immutable Awesomeness by John Willis and Josh Corman
Docker, Inc.
 
PDF
Modern Monitoring [ with Prometheus ]
Haggai Philip Zagury
 
PDF
An Overview of Spinnaker
Pierre-Nicolas Durette
 
PPTX
More tips and tricks for running containers like a pro - Rancher Online MEetu...
Shannon Williams
 
PDF
Cloud Native CI/CD with GitOps
Kasper Nissen
 
PDF
FOSDEM 2021 - Infrastructure as Code Drift & Driftctl
Stephane Jourdan
 
PDF
DevOps Spain 2019. Jaime Balañá-NetApp
atSistemas
 
PDF
DockerCon 18 Cool Hacks: solo.io
Docker, Inc.
 
PDF
HP Helion Episode 6: Cloud Foundry Summit Recap
BeMyApp
 
PPTX
Istio + Helm + Canary Webinar
Codefresh
 
PDF
Natively clouded Journey
Haggai Philip Zagury
 
PDF
Docker & IoT: protecting the Datacenter
Alex Ellis
 
PDF
Kubecon seattle 2018 workshop slides
Weaveworks
 
PDF
Running tests for every commit: Gerrit, Jenkins, Docker, AWS
Alexander Akbashev
 
PDF
Git ops & Continuous Infrastructure with terra*
Haggai Philip Zagury
 
PDF
Serverless Swift for Mobile Developers
All Things Open
 
PPTX
Securing Container Deployments from Build to Ship to Run - August 2017 - Ranc...
Shannon Williams
 
CI and CD with Spinnaker
VMware Tanzu
 
DockerCon 2017: Docker in China
Zhimin Tang
 
DockerCon 16 - Moby's Cool Hack Session
Docker, Inc.
 
Immutable Awesomeness by John Willis and Josh Corman
Docker, Inc.
 
Modern Monitoring [ with Prometheus ]
Haggai Philip Zagury
 
An Overview of Spinnaker
Pierre-Nicolas Durette
 
More tips and tricks for running containers like a pro - Rancher Online MEetu...
Shannon Williams
 
Cloud Native CI/CD with GitOps
Kasper Nissen
 
FOSDEM 2021 - Infrastructure as Code Drift & Driftctl
Stephane Jourdan
 
DevOps Spain 2019. Jaime Balañá-NetApp
atSistemas
 
DockerCon 18 Cool Hacks: solo.io
Docker, Inc.
 
HP Helion Episode 6: Cloud Foundry Summit Recap
BeMyApp
 
Istio + Helm + Canary Webinar
Codefresh
 
Natively clouded Journey
Haggai Philip Zagury
 
Docker & IoT: protecting the Datacenter
Alex Ellis
 
Kubecon seattle 2018 workshop slides
Weaveworks
 
Running tests for every commit: Gerrit, Jenkins, Docker, AWS
Alexander Akbashev
 
Git ops & Continuous Infrastructure with terra*
Haggai Philip Zagury
 
Serverless Swift for Mobile Developers
All Things Open
 
Securing Container Deployments from Build to Ship to Run - August 2017 - Ranc...
Shannon Williams
 
Ad

Viewers also liked (20)

PDF
Introduction to Docker I Docker Workshop @ Twitter
Docker, Inc.
 
PPTX
DockerCon SF 2015: Cultural Change using Docker
Docker, Inc.
 
PDF
DockerCon SF 2015: DHE/DTR
Docker, Inc.
 
PDF
DockerCon14 Contributing to Docker by Tianon
Docker, Inc.
 
PPTX
Experiences with AWS immutable deploys and job processing
Docker, Inc.
 
PPTX
DockerCon EU 2015: From Local Development to Production Deployments using Ama...
Docker, Inc.
 
PPTX
DockerCon14 Keynote
Docker, Inc.
 
PDF
Mobycraft - Docker in 8-bit by Aditya Gupta
Docker, Inc.
 
PDF
DockerCon EU 2015: Finding a Theory of the Universe with Docker and Volunteer...
Docker, Inc.
 
PPTX
Dockerizing WordPress
Docker, Inc.
 
PPTX
DockerCon SF 2015: How to talk to humans
Docker, Inc.
 
PDF
DockerCon 2015: Docker Engine Breakout Session
Docker, Inc.
 
PDF
DockerCon SF 2015: From Months to Minutes
Docker, Inc.
 
PPTX
Dockerizing Stashboard
Docker, Inc.
 
PDF
DockerCon SF 2015: Beyond CI to Production Scale PaaS with Docker
Docker, Inc.
 
PDF
Mobycraft:Docker in 8-bit (Meetup at Docker HQ 4/7)
Docker, Inc.
 
PPTX
Docker, Innovation Accelerator
Docker, Inc.
 
PDF
Autoscaling Docker Containers by Konstantinos Faliagkas, Docker Birthday #3 A...
Docker, Inc.
 
PPTX
Dockerfile Basics Workshop #1
Docker, Inc.
 
PPTX
Docker Online Meetup #30: Docker Trusted Registry 1.4.1
Docker, Inc.
 
Introduction to Docker I Docker Workshop @ Twitter
Docker, Inc.
 
DockerCon SF 2015: Cultural Change using Docker
Docker, Inc.
 
DockerCon SF 2015: DHE/DTR
Docker, Inc.
 
DockerCon14 Contributing to Docker by Tianon
Docker, Inc.
 
Experiences with AWS immutable deploys and job processing
Docker, Inc.
 
DockerCon EU 2015: From Local Development to Production Deployments using Ama...
Docker, Inc.
 
DockerCon14 Keynote
Docker, Inc.
 
Mobycraft - Docker in 8-bit by Aditya Gupta
Docker, Inc.
 
DockerCon EU 2015: Finding a Theory of the Universe with Docker and Volunteer...
Docker, Inc.
 
Dockerizing WordPress
Docker, Inc.
 
DockerCon SF 2015: How to talk to humans
Docker, Inc.
 
DockerCon 2015: Docker Engine Breakout Session
Docker, Inc.
 
DockerCon SF 2015: From Months to Minutes
Docker, Inc.
 
Dockerizing Stashboard
Docker, Inc.
 
DockerCon SF 2015: Beyond CI to Production Scale PaaS with Docker
Docker, Inc.
 
Mobycraft:Docker in 8-bit (Meetup at Docker HQ 4/7)
Docker, Inc.
 
Docker, Innovation Accelerator
Docker, Inc.
 
Autoscaling Docker Containers by Konstantinos Faliagkas, Docker Birthday #3 A...
Docker, Inc.
 
Dockerfile Basics Workshop #1
Docker, Inc.
 
Docker Online Meetup #30: Docker Trusted Registry 1.4.1
Docker, Inc.
 
Ad

Similar to Immutable Infrastructure with Docker and EC2 (20)

PDF
JavaOne 2015: Scaling micro services at Gilt
Adrian Trenaman
 
PDF
Building a Modern Microservices Architecture at Gilt: The Essentials
C4Media
 
PPTX
Pivotal Cloud Platform Roadshow Keynote
cornelia davis
 
PDF
When Developers Operate and Operators Develop
Adrian Cockcroft
 
PDF
Pragmatic Pipeline Security
James Wickett
 
PPTX
Top10 Characteristics of Awesome Apps
Casey Lee
 
PPTX
Serverless - DevOps Lessons Learned From Production
Steve Hogg
 
PDF
Optimize your CI/CD with GitLab and AWS
DevOps.com
 
PDF
Paa s concepts_mod_march11
Amir Zipory
 
PDF
A complete Open Source cloud: Storage, Virt, IaaS, PaaS
Dave Neary
 
PDF
15-factor-apps.pdf
Nilesh Gule
 
PPTX
Platform as a Service (PaaS)
Halil Burak Cetinkaya
 
PDF
From Monoliths to Services: Paying Your Technical Debt
TechWell
 
PPTX
Reduce Risk with End to End Monitoring of Middleware-based Applications
SL Corporation
 
PDF
How to Design a Backend for IoT
İbrahim Gürses
 
PDF
Cloud Native Application Development
Siva Rama Krishna Chunduru
 
PDF
Microservices: State of the Union
C4Media
 
PPTX
Strategies for Securing Availability and Optimizing Application Performance i...
Correlsense
 
PDF
Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015
Stuart Charlton
 
PDF
Rethink your infrastructure to rebuild your code
Codeship
 
JavaOne 2015: Scaling micro services at Gilt
Adrian Trenaman
 
Building a Modern Microservices Architecture at Gilt: The Essentials
C4Media
 
Pivotal Cloud Platform Roadshow Keynote
cornelia davis
 
When Developers Operate and Operators Develop
Adrian Cockcroft
 
Pragmatic Pipeline Security
James Wickett
 
Top10 Characteristics of Awesome Apps
Casey Lee
 
Serverless - DevOps Lessons Learned From Production
Steve Hogg
 
Optimize your CI/CD with GitLab and AWS
DevOps.com
 
Paa s concepts_mod_march11
Amir Zipory
 
A complete Open Source cloud: Storage, Virt, IaaS, PaaS
Dave Neary
 
15-factor-apps.pdf
Nilesh Gule
 
Platform as a Service (PaaS)
Halil Burak Cetinkaya
 
From Monoliths to Services: Paying Your Technical Debt
TechWell
 
Reduce Risk with End to End Monitoring of Middleware-based Applications
SL Corporation
 
How to Design a Backend for IoT
İbrahim Gürses
 
Cloud Native Application Development
Siva Rama Krishna Chunduru
 
Microservices: State of the Union
C4Media
 
Strategies for Securing Availability and Optimizing Application Performance i...
Correlsense
 
Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015
Stuart Charlton
 
Rethink your infrastructure to rebuild your code
Codeship
 

More from Docker, Inc. (20)

PDF
Containerize Your Game Server for the Best Multiplayer Experience
Docker, Inc.
 
PDF
How to Improve Your Image Builds Using Advance Docker Build
Docker, Inc.
 
PDF
Build & Deploy Multi-Container Applications to AWS
Docker, Inc.
 
PDF
Securing Your Containerized Applications with NGINX
Docker, Inc.
 
PDF
How To Build and Run Node Apps with Docker and Compose
Docker, Inc.
 
PDF
Hands-on Helm
Docker, Inc.
 
PDF
Distributed Deep Learning with Docker at Salesforce
Docker, Inc.
 
PDF
The First 10M Pulls: Building The Official Curl Image for Docker Hub
Docker, Inc.
 
PDF
Monitoring in a Microservices World
Docker, Inc.
 
PDF
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
Docker, Inc.
 
PDF
Predicting Space Weather with Docker
Docker, Inc.
 
PDF
Become a Docker Power User With Microsoft Visual Studio Code
Docker, Inc.
 
PDF
How to Use Mirroring and Caching to Optimize your Container Registry
Docker, Inc.
 
PDF
Monolithic to Microservices + Docker = SDLC on Steroids!
Docker, Inc.
 
PDF
Kubernetes at Datadog Scale
Docker, Inc.
 
PDF
Labels, Labels, Labels
Docker, Inc.
 
PDF
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Docker, Inc.
 
PDF
Build & Deploy Multi-Container Applications to AWS
Docker, Inc.
 
PDF
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
Docker, Inc.
 
PDF
Developing with Docker for the Arm Architecture
Docker, Inc.
 
Containerize Your Game Server for the Best Multiplayer Experience
Docker, Inc.
 
How to Improve Your Image Builds Using Advance Docker Build
Docker, Inc.
 
Build & Deploy Multi-Container Applications to AWS
Docker, Inc.
 
Securing Your Containerized Applications with NGINX
Docker, Inc.
 
How To Build and Run Node Apps with Docker and Compose
Docker, Inc.
 
Hands-on Helm
Docker, Inc.
 
Distributed Deep Learning with Docker at Salesforce
Docker, Inc.
 
The First 10M Pulls: Building The Official Curl Image for Docker Hub
Docker, Inc.
 
Monitoring in a Microservices World
Docker, Inc.
 
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
Docker, Inc.
 
Predicting Space Weather with Docker
Docker, Inc.
 
Become a Docker Power User With Microsoft Visual Studio Code
Docker, Inc.
 
How to Use Mirroring and Caching to Optimize your Container Registry
Docker, Inc.
 
Monolithic to Microservices + Docker = SDLC on Steroids!
Docker, Inc.
 
Kubernetes at Datadog Scale
Docker, Inc.
 
Labels, Labels, Labels
Docker, Inc.
 
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Docker, Inc.
 
Build & Deploy Multi-Container Applications to AWS
Docker, Inc.
 
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
Docker, Inc.
 
Developing with Docker for the Arm Architecture
Docker, Inc.
 

Immutable Infrastructure with Docker and EC2

  • 1. Immutable Infrastructure With Docker and EC2 Docker Conf 2014 Michael Bryzek CTO & Co-Founder Gilt [email protected] / @mbryzek http://tech.gilt.com / @gilttech
  • 2. What is Gilt? Founded in 2007 World’s best brands and products at 50-70% off New products launch at noon EST Limited inventory – products constantly sell out Over 1000 employees
  • 3. Gilt Tech • ~150 people • Strategy to attract great people and enable them to innovate • Lots of Small Teams • Micro services architecture • 300+ services • ~1000 git repos • Busy days see > 100 production releases • > 10k requests / second
  • 4. Immutable Infrastructure Why it Matters We believe innovation fuels growth. Part of our strategy to accelerate innovation Is to create truly autonomous teams Supported by tooling and automated processes to relentlessly decrease risk of change
  • 5. Lots of Small Applications (LOSA) • Technology Strategy focused on: • Autonomy • Decentralization • Parallelism • Isolation
  • 6. Teams and LOSA • Lots of Small Teams • 4-10 people / team • Have all “ingredients” to succeed • Deliver across stack for most projects
  • 9. Move Fast with Minimal Risk What that Actually Means
  • 10. Defining Risk Probability (event) * Cost(event) * Number of occurrences There is a risk to doing nothing
  • 11. Reducing Probability(event) • Testing • Manual or Automated • Prefer automated for long term • Not making changes • Peer review • Kaizen • Immutability • Ownership / Pride • Experience
  • 12. Reducing Cost(event) • Small change sets • Verification in target environment • Incremental rollout • Automated rollout / rollback
  • 13. Reducing NumberOccurrences(event) • Instant Rollback • Great Monitoring and Alerting
  • 14. Modern Software Deployment 1. Foundation of continuous delivery 2. Each deploy immutable 3. Incremental rollout 4. Metrics and alerting
  • 15. Continuous Delivery @ Gilt Pre Docker sbt release-remote 1. Build an RPM in Jenkins 2. Deploy RPM to test environment 3. Run unit and integration tests 4. Deploy to one node in production 5. Run healthcheck, auto rollback if necessary 6. Repeat 4-6 on remaining nodes
  • 16. Continuous Delivery @ Gilt w/ Docker ionblaster new api 1.2.3 ionblaster traffic api 1.2.2 90 1.2.3 10 1. Build docker container 2. Create new “stack” of infrastructure 3. Run container on each node in stack 4. Assign DNS to new stack 5. Manage traffic from old to new
  • 18. Immutable Infrastructure / Docker Huge win w/ docker Dependencies in Dockerfile Focus instead on cloud and new stacks
  • 19. Docker and Play Framework $ sbt stage $ more api/Dockerfile FROM giltarchitecture/ ubuntu-openjdk-7-jre-headless:12.0.4 ADD . /apidoc ENTRYPOINT ["/apidoc/bin/apidoc-api"]
  • 20. Sample command to start play container image -run “ --expose 80 -p 9000:80 giltarchitecture/apidoc-api-1-2-3 –Dhttp.port=90 -Dconfig.resource=xxx.conf ”
  • 21. Immutability w/ Docker Immutability emerges naturally when using Docker Upgrade Java? New version, new infrastructure, new containers. Security patch? New version, new infrastructure, new containers. Eliminate surprise for application owners.
  • 22. Automate Incremental Rollout Core area of focus now ionroller api 1.2.3 1.2.4 “24 hours” Measure response time and status codes - triggers based on tolerance between versions
  • 23. Instant Rollback If prior version around – just move traffic ionblaster traffic api 1.2.3 100 If not, same as before - deploy version But then can revise garbage collection policy for the app to decrease risk of a future event. (Kaizen)
  • 24. Amazing Metrics and Alerting Reporting and alerting is hard Used nagios, graphite, open TSDB w/ limited success. We are now building a REST API for alerting on top of influxdb (open source time series db). Plan to open source if successful.
  • 25. Lessons Learned: Incremental Rollout Minimize number of versions in production at any one time – e.g. “at most 2” Garbage collection important, but keep prior versions around for long enough (1 day? 1 week?) Different apps have different requirements on rollout time – back to calculation of Risk and the Cost(event)
  • 26. Lessons Learned - PAAS You must have platform as a service; impossible to build well if not your core business. It’s tempting to build out a PAAS; but the number of tools needed to make this work reliably at scale is large.
  • 27. Lessons Learned: Alerting Core interface: Send me at most one alert every n hours Core challenge always: • Signal to noise ratio critical and first class • Human tendency to ignore over time
  • 28. Immutable Infra w/ Docker and EC2 • Decrease Probability(Event) • Immutability • Decrease Cost(Event) • Verification in target env w/ no user traffic • Incremental Rollout • Automated rollout/rollback • Reduce NumberOccurrences(event) • Instant Rollback
  • 29. Thank You Michael Bryzek CTO & Co-Founder Gilt [email protected] / @mbryzek http://tech.gilt.com / @gilttech