Download presentation
Presentation is loading. Please wait.
1
Deployment Architectures For Containers
A platform agnostic way to update your Container Applications This is a Title Slide with Graphic slide ideal for including a picture with a brief title, subtitle and presenter information. Do not customize this slide with your own background. Jonathan Reeve Senior Director Product Management Oracle Container Cloud Service March, 2017
3
Agenda 1 Types of Container Updates A Deployment Approach Deployment Components Demo Q&A 2 3 4 5
4
Types of Updates
5
Blue Green Deployments
6
Blue / Green Deployments
You have an existing running version, say Blue You deploy a new version, say Green Once you are satisfied that green is healthy/tested, switch incoming requests at the router to green. User Router
7
Canary / Rolling Updates
8
Canary Release / Rolling Updates
Gradually roll out a change to a subset of users Existing version is blue, deploy a new version, Green Once you are satisfied that green is healthy/tested, switch some % of requests at the router to green. 10% User 90% Router
9
Orchestrators
10
Rolling Update Support in Orchestrators (K8S and Swarm)
Kubernetes supports rolling updates (via deployments in Kubernetes 1.2+) Part of deployments, control through “Max Unavailable” and “Max Surge” parameters guide/deployments/#rolling-update- deployment Docker Swarm rolling updates in 1.12+ Can define the #containers to update at a time and the delay Stops existing containers before starting new ones warm-tutorial/rolling-update/
11
An Orchestrator Independent Approach
Update container deployments simply with minimal dependency on Orchestration systems Required Components A way to deploy containers (CaaS or DIY) API to start/stop containers etc… A Load Balancer (we use a container load balancer) A “router” to direct traffic to new deployments Router should be able to pick up new containers (e.g. via confd) Service Discovery System (Consul etc…) To store the location of containers to be load balanced and configuration parameters Build System & Script to Control New Deployments
12
CaaS (Containers as a Service)
We need a way (management system) to deploy containers Could be DIY, or leverage a container service Stop, start containers, remove deployments Integrate via API Here we leverage Oracle Container Cloud Service
13
Load Balancer and Service Discovery
Load Balancer Runs NGINX and Confd Leveraging Runit Each container registers with service discovery Confd polls service discovery for container placement Reloads NGINX config i.e. picks up container adds and removes, config changes We use Service Discovery built in to OCCS here (similar to Consul) Load Balancer / Router Runit Service Discovery NGINX Confd Containers Docker Hosts
14
Putting it Together – A Example Deployment Pipeline
Push Image Docker Hub Pull Image Check In Build API Deploy Check In Code (& Docker File) to Github Trigger Build (of Docker image) in Travis CI (linked to GitHub account) j0nr33v3/hello-world Push image to Docker Hub Build script controls deployment of new containers on to Container Cloud Service via REST API, referencing built image.
15
Build System Deploy Script (Blue / Green)
Determine Target Color (opposite of existing color) Trigger Deployment via API Store Service Discovery Key for Target Color Wait for new deployment to be healthy Leverages “Healthchecks” in OCCS Point router at new deployment Remove original deployment (optional) Can leave original deployment to support roll back See
16
Blue/Green Service Discovery Keys
17
Blue / Green Demo This slide can also be used as a Q and A slide
18
Canary, Rolling Updates
Trigger Deployment of the candidate via API Wait for new deployment to be healthy Store Service Discovery Key for the Candidate Version Remove the Original (old candidate) Version Gradually Increase Traffic to the candidate (from the stable version) Promote the candidate to stable (gets all traffic)
19
Rolling Service Discovery Keys
20
Rolling Update Demo This slide can also be used as a Q and A slide
21
Q&A
22
Resources
23
Resources Hello-world example https://github.com/j0nr33v3/hello-world
Includes Dockerfile, Travis CI config, blue green and rolling shell scripts NGINX Routers (blue/green and rolling) images/tree/master/ContainerCloud/images
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.