SlideShare a Scribd company logo
Application delivery in a container world
4 octobre 2016 . #TIAD . @tiadparis
# TIAD@ tiadparis
Who am I?
2
Laurent Bernaille @d2si
• Linux background
• Cloud enthousiast
• Opensource advocate
• Love discovering, building (and breaking…) new things
• Passionate about the ongoing IT transformations
@lbernail
# TIAD@ tiadparis
Docker from development to production
3
• Local development
• Docker and Continuous integration
• Deploying to servers: scheduling containers
• Multi-server setup: service discovery
• Updating my application safely: Blue green deployment
• Dynamically enable/disable features: Feature toggling
# TIAD@ tiadparis
Demo
• Local Build
• Run locally (docker-compose)
• Update code
• Commit
• Intregration with travis to publish image to ECR registry
docker build -t demotiad/vote:0.1 --build-arg version=0.1 vote
docker tag demotiad/vote:0.1 demotiad/vote:latest
specific version tag ARG for label
Alias image to latest
ARG version
ADD Dockerfile /Dockerfile
LABEL eu.d2-si.python_version="2.7"
LABEL eu.d2-si.application="vote"
LABEL eu.d2-si.version="${version}"
Metadata about the image
Amazon
ECR
# TIAD@ tiadparis 5
Bastion
eu-west-1a
Public subnets
Let’s create an environment in AWS to deploy
Private subnets
NAT
GW
Public subnets
Private subnets
eu-west-1b
Public subnets
Private subnets
eu-west-1c
# TIAD@ tiadparis
Scheduling
How do I run my containers?
• Manual : ssh / docker run
• Automated: ansible
How do I choose a host?
• Static (see before)
• With a generic scheduler (Mesos, Nomad)
• With a specialized scheduler (Kubernetes, ECS, Swarm)
Choosing your scheduler
• Most complete: Kubernetes
• Kubernetes and Swarm provide more than scheduling
- Higher level of abstraction
- Control networking
- Really worth looking into once if you have run production workloads for a while
- hosts: redis
tasks:
- name: Run redis
docker_container:
name: redis
image: redis
- hosts: app
tasks:
- name: Run app
docker
name: vote
image: demotiad/vote
Demo: ECS (good integration with AWS / terraform, simple)
# TIAD@ tiadparis
Service discovery
How do my containers find each other when I have multiple hosts?
• Static: set up /etc/hosts entries in containers
• Rely on service discovery from scheduler
* Kubernetes
* Swarm
> Big assumptions on the nework, intrusive (overlay, proxy, iptables)
• Use a separate tool for service discovery
+ More control
+ Can be used for non-containers workloads (and for communication with them)
- An additional tool to manage
app redis
redis ?
- hosts: redis
tasks:
- name: Run redis
docker_container:
name: redis
image: redis
- hosts: app
tasks:
- name: Run app
docker
name: vote
image: demotiad/vote
etc_hosts:
redis: 10.0.0.4
Demo: Consul (one of the reference standalone solution)
# TIAD@ tiadparis 8
Bastion
Public subnets
NAT
GW
Public subnets Public subnets
CAg
(UI)
CS CS CS
Let’s create a consul cluster
# TIAD@ tiadparis
ECS
9
Bastion
Public subnets
NAT
GW
Public subnets Public subnets
ECS ECS
EFS file system
EFS Mount target EFS Mount target EFS Mount target
/mnt/efs /mnt/efs /mnt/efs
Deploy ECS servers
CAg
(UI)
CS CS CS
# TIAD@ tiadparis
ECS
10
Bastion
Public subnets
NAT
GW
Public subnets Public subnets
CAg
(UI)
CS CS CS
ECS ECS
EFS file system
EFS Mount target EFS Mount target EFS Mount target
/mnt/efs /mnt/efs /mnt/efs
CAg RG Cad CAg RG Cad CAg RG Cad
docker events
We need some services on all nodes
# TIAD@ tiadparis
ECS
11
Bastion
Public subnets
NAT
GW
Public subnets Public subnets
CAg
(UI)
CS CS CS
ECS ECS
EFS file system
EFS Mount target EFS Mount target EFS Mount target
/mnt/efs /mnt/efs /mnt/efs
CAg RG Cad CAg RG Cad CAg RG Cad
docker events
Let’s start two containers
Rd Ash
redis?
# TIAD@ tiadparis
ECS
12
Bastion
Public subnets
NAT
GW
Public subnets Public subnets
CAg
(UI)
CS CS CS
ECS ECS
EFS file system
EFS Mount target EFS Mount target EFS Mount target
/mnt/efs /mnt/efs /mnt/efs/redis
CAg RG Cad CAg RG Cad CAg RG Cad
Let’s deploy our application: backends
Red
Ctmpl+Nginx Ctmpl+Nginx
# TIAD@ tiadparis
A few notes on ECS
ECS tasks
• run « manually » (part of ECS servers bootstrap here)
• Consist of one or several related containers (« pod »)
• Consul Agent / Registrator / cAdvisor
ECS services
• Run a given number of tasks on the cluster
• Ensure they remain running
• Scheduling
* find host with capacity
* try to run tasks of the same service on different nodes / AZ
- Redis : 1
- Haproxy + Consul Template : 2
Persistency
• No solution for dynamic volume migration
• We use EFS and mount an EFS sub-directory inside containers with data
# TIAD@ tiadparis
Consul template
• Watch for entries in consul
• Generate configuration based on these entries
• Here
* Generate nginx configuration
* Start nginx as a child process
* Reload nginx when configuration as changed
server {
location / {
proxy_pass http://{{key_or_default "routes/vote" "blue”}};
}
}
server {
location / {
proxy_pass http://blue;
}
}
key routes/vote ?
• Let’s create routes/vote and set it to green
# TIAD@ tiadparis
ECS
15
Bastion
Public subnets
NAT
GW
Public subnets Public subnets
CAg
(UI)
CS CS CS
ECS ECS
EFS file system
EFS Mount target EFS Mount target EFS Mount target
/mnt/efs /mnt/efs /mnt/efs/redis
CAg RG Cad CAg RG Cad CAg RG Cad
Red
Ctmpl+Nginx Ctmpl+Nginx
Deploy our app Vote: http://tiad.awsdemo.d2-si.eu
AppApp
# TIAD@ tiadparis
How did nginx find the containers?
upstream green {
{{ range service "votegreen" }}
server {{.Address}}:{{.Port}};{{end}}
}
upstream green {
server 10.255.128.166:32769;
server 10.255.129.118:32770;
}
service votegreen ?
# TIAD@ tiadparis
ECS
17
Bastion
Public subnets
NAT
GW
Public subnets Public subnets
CAg
(UI)
CS CS CS
ECS ECS
EFS file system
EFS Mount target EFS Mount target EFS Mount target
/mnt/efs /mnt/efs /mnt/efs/redis
CAg RG Cad CAg RG Cad CAg RG Cad
Red
Ctmpl+Nginx Ctmpl+Nginx
AppApp
What about a new version?
App App
# TIAD@ tiadparis
Blue Green deployment
HA
P
HA
P
AppApp App App
routes/vote: green
Test before switching
Acces blue containers directly
Use custom header: X-Color
map $http_x_color $color {
"green" "green";
"blue" "blue";
default "{{= key_or_default "routes/vote" "blue”}}";
}
server {
location / {
proxy_pass http://$color;
}
}
X-color = blue?
# TIAD@ tiadparis
When ok switch
HA
P
HA
P
AppApp App App
routes/vote: blue
Dynamic parameters
Get title from consul
params/title/blue
title=get_param("title",color,"Hello TIAD")
# TIAD@ tiadparis
Feature toggling
HA
P
HA
P
AppApp App App
routes/vote: blue
features/containerid/blue
Switch on/off features
Release code not validated yet
Simplify branch management (always ship trunk)
Advanced use cases
Canary deployment (x% users)
Specific users only
if is_enabled_feature("containerid",color):
message=message+" on container "+ hostname
« Always Ship Trunk » (Paul Hammond, Velocity 2010)
« Feature Toggles » (Martin Fowler 2016: http://martinfowler.com/articles/feature-toggles.htm)
# TIAD@ tiadparis
Conclusion and perspectives
Going into production with docker
• With containers OPS and DEV are closer than ever
• Continuous Integration as a source for images
• Service discovery will be a challenge
=> Not specific to containers but to microservices in general
A few other (somewhat unrelated) notes
• Docker in production will require experienced sysadmins
• Avoid putting stateful (db) services in containers
• Security (image sources, container permissions)
# TIAD@ tiadparis
Thank you
@lbernail
Look at / Fork the code of this demo on github
https://github.com/lbernail/demotiad
Questions ?

More Related Content

What's hot (20)

Docker up and running
Docker up and runningDocker up and running
Docker up and running
Victor S. Recio
 
Docker Overview
Docker OverviewDocker Overview
Docker Overview
Rohit Jnagal
 
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & Ansible
Robert Reiz
 
Rapid Development With Docker Compose
Rapid Development With Docker ComposeRapid Development With Docker Compose
Rapid Development With Docker Compose
Justin Crown
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
謝 宗穎
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken Cochrane
dotCloud
 
Exploring Docker Security
Exploring Docker SecurityExploring Docker Security
Exploring Docker Security
Patrick Kleindienst
 
Learn basic ansible using docker
Learn basic ansible using dockerLearn basic ansible using docker
Learn basic ansible using docker
Larry Cai
 
Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based Deployments
Ben Hall
 
Adventures in docker compose
Adventures in docker composeAdventures in docker compose
Adventures in docker compose
LinkMe Srl
 
Docker Security Deep Dive by Ying Li and David Lawrence
Docker Security Deep Dive by Ying Li and David LawrenceDocker Security Deep Dive by Ying Li and David Lawrence
Docker Security Deep Dive by Ying Li and David Lawrence
Docker, Inc.
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0
Docker, Inc.
 
Docker-hanoi meetup #1: introduction about Docker
Docker-hanoi meetup #1: introduction about DockerDocker-hanoi meetup #1: introduction about Docker
Docker-hanoi meetup #1: introduction about Docker
Nguyen Anh Tu
 
Continuous Integration: SaaS vs Jenkins in Cloud
Continuous Integration: SaaS vs Jenkins in CloudContinuous Integration: SaaS vs Jenkins in Cloud
Continuous Integration: SaaS vs Jenkins in Cloud
Ideato
 
Django via Docker
Django via DockerDjango via Docker
Django via Docker
Brenden West
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Red Hat Developers
 
Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad
Docker, Inc.
 
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
Tectonic Summit 2016: Kubernetes 1.5 and BeyondTectonic Summit 2016: Kubernetes 1.5 and Beyond
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
CoreOS
 
Docker in practice
Docker in practiceDocker in practice
Docker in practice
Jonathan Giannuzzi
 
Advanced Task Scheduling with Amazon ECS (June 2017)
Advanced Task Scheduling with Amazon ECS (June 2017)Advanced Task Scheduling with Amazon ECS (June 2017)
Advanced Task Scheduling with Amazon ECS (June 2017)
Julien SIMON
 
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & Ansible
Robert Reiz
 
Rapid Development With Docker Compose
Rapid Development With Docker ComposeRapid Development With Docker Compose
Rapid Development With Docker Compose
Justin Crown
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
謝 宗穎
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken Cochrane
dotCloud
 
Learn basic ansible using docker
Learn basic ansible using dockerLearn basic ansible using docker
Learn basic ansible using docker
Larry Cai
 
Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based Deployments
Ben Hall
 
Adventures in docker compose
Adventures in docker composeAdventures in docker compose
Adventures in docker compose
LinkMe Srl
 
Docker Security Deep Dive by Ying Li and David Lawrence
Docker Security Deep Dive by Ying Li and David LawrenceDocker Security Deep Dive by Ying Li and David Lawrence
Docker Security Deep Dive by Ying Li and David Lawrence
Docker, Inc.
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0
Docker, Inc.
 
Docker-hanoi meetup #1: introduction about Docker
Docker-hanoi meetup #1: introduction about DockerDocker-hanoi meetup #1: introduction about Docker
Docker-hanoi meetup #1: introduction about Docker
Nguyen Anh Tu
 
Continuous Integration: SaaS vs Jenkins in Cloud
Continuous Integration: SaaS vs Jenkins in CloudContinuous Integration: SaaS vs Jenkins in Cloud
Continuous Integration: SaaS vs Jenkins in Cloud
Ideato
 
Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad
Docker, Inc.
 
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
Tectonic Summit 2016: Kubernetes 1.5 and BeyondTectonic Summit 2016: Kubernetes 1.5 and Beyond
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
CoreOS
 
Advanced Task Scheduling with Amazon ECS (June 2017)
Advanced Task Scheduling with Amazon ECS (June 2017)Advanced Task Scheduling with Amazon ECS (June 2017)
Advanced Task Scheduling with Amazon ECS (June 2017)
Julien SIMON
 

Similar to TIAD 2016 : Application delivery in a container world (20)

Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
QAware GmbH
 
DCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker ContainersDCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker Containers
Docker, Inc.
 
DevEx | there’s no place like k3s
DevEx | there’s no place like k3sDevEx | there’s no place like k3s
DevEx | there’s no place like k3s
Haggai Philip Zagury
 
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Patrick Chanezon
 
Kubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on KubernetesKubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on Kubernetes
Jeffrey Holden
 
Test cloud application deployments locally and in CI without staging environm...
Test cloud application deployments locally and in CI without staging environm...Test cloud application deployments locally and in CI without staging environm...
Test cloud application deployments locally and in CI without staging environm...
Thomas Rausch
 
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Mandi Walls
 
Cloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesCloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit Kubernetes
QAware GmbH
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
Ben Hall
 
Docker DANS workshop
Docker DANS workshopDocker DANS workshop
Docker DANS workshop
vty
 
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Docker, Inc.
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
Ben Hall
 
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsI Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
Michael Lange
 
Best Practices for Running Kafka on Docker Containers
Best Practices for Running Kafka on Docker ContainersBest Practices for Running Kafka on Docker Containers
Best Practices for Running Kafka on Docker Containers
BlueData, Inc.
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
Patrick Chanezon
 
K8s best practices from the field!
K8s best practices from the field!K8s best practices from the field!
K8s best practices from the field!
DoiT International
 
HOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDHOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLD
Aleksandr Maklakov
 
Kubernetes @ meetic
Kubernetes @ meeticKubernetes @ meetic
Kubernetes @ meetic
Sébastien Le Gall
 
Docker Multi-arch All The Things
Docker Multi-arch All The ThingsDocker Multi-arch All The Things
Docker Multi-arch All The Things
Docker, Inc.
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment
Arun prasath
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
QAware GmbH
 
DCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker ContainersDCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker Containers
Docker, Inc.
 
DevEx | there’s no place like k3s
DevEx | there’s no place like k3sDevEx | there’s no place like k3s
DevEx | there’s no place like k3s
Haggai Philip Zagury
 
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Patrick Chanezon
 
Kubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on KubernetesKubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on Kubernetes
Jeffrey Holden
 
Test cloud application deployments locally and in CI without staging environm...
Test cloud application deployments locally and in CI without staging environm...Test cloud application deployments locally and in CI without staging environm...
Test cloud application deployments locally and in CI without staging environm...
Thomas Rausch
 
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Mandi Walls
 
Cloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesCloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit Kubernetes
QAware GmbH
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
Ben Hall
 
Docker DANS workshop
Docker DANS workshopDocker DANS workshop
Docker DANS workshop
vty
 
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Docker, Inc.
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
Ben Hall
 
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsI Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
Michael Lange
 
Best Practices for Running Kafka on Docker Containers
Best Practices for Running Kafka on Docker ContainersBest Practices for Running Kafka on Docker Containers
Best Practices for Running Kafka on Docker Containers
BlueData, Inc.
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
Patrick Chanezon
 
K8s best practices from the field!
K8s best practices from the field!K8s best practices from the field!
K8s best practices from the field!
DoiT International
 
HOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDHOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLD
Aleksandr Maklakov
 
Docker Multi-arch All The Things
Docker Multi-arch All The ThingsDocker Multi-arch All The Things
Docker Multi-arch All The Things
Docker, Inc.
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment
Arun prasath
 

More from The Incredible Automation Day (20)

A smooth migration to Docker focusing on build pipelines - TIAD Camp Docker
A smooth migration to Docker focusing on build pipelines - TIAD Camp DockerA smooth migration to Docker focusing on build pipelines - TIAD Camp Docker
A smooth migration to Docker focusing on build pipelines - TIAD Camp Docker
The Incredible Automation Day
 
Docker in real life and in the Cloud - TIAD Camp Docker
Docker in real life and in the Cloud - TIAD Camp DockerDocker in real life and in the Cloud - TIAD Camp Docker
Docker in real life and in the Cloud - TIAD Camp Docker
The Incredible Automation Day
 
Orchestrating Docker in production - TIAD Camp Docker
Orchestrating Docker in production - TIAD Camp DockerOrchestrating Docker in production - TIAD Camp Docker
Orchestrating Docker in production - TIAD Camp Docker
The Incredible Automation Day
 
Monitoring in 2017 - TIAD Camp Docker
Monitoring in 2017 - TIAD Camp DockerMonitoring in 2017 - TIAD Camp Docker
Monitoring in 2017 - TIAD Camp Docker
The Incredible Automation Day
 
Strategy, planning and governance for enterprise deployments of containers - ...
Strategy, planning and governance for enterprise deployments of containers - ...Strategy, planning and governance for enterprise deployments of containers - ...
Strategy, planning and governance for enterprise deployments of containers - ...
The Incredible Automation Day
 
Cluster SQL - TIAD Camp Microsoft Cloud Readiness
Cluster SQL - TIAD Camp Microsoft Cloud ReadinessCluster SQL - TIAD Camp Microsoft Cloud Readiness
Cluster SQL - TIAD Camp Microsoft Cloud Readiness
The Incredible Automation Day
 
Build the VPC - TIAD Camp Microsoft Cloud Readiness
Build the VPC - TIAD Camp Microsoft Cloud ReadinessBuild the VPC - TIAD Camp Microsoft Cloud Readiness
Build the VPC - TIAD Camp Microsoft Cloud Readiness
The Incredible Automation Day
 
Opening Keynote - TIAD Camp Microsoft Cloud Readiness
Opening Keynote - TIAD Camp Microsoft Cloud ReadinessOpening Keynote - TIAD Camp Microsoft Cloud Readiness
Opening Keynote - TIAD Camp Microsoft Cloud Readiness
The Incredible Automation Day
 
Replatforming - TIAD Camp Microsoft Cloud Readiness
Replatforming - TIAD Camp Microsoft Cloud ReadinessReplatforming - TIAD Camp Microsoft Cloud Readiness
Replatforming - TIAD Camp Microsoft Cloud Readiness
The Incredible Automation Day
 
GitLab CI Packer - TIAD Camp Microsoft Cloud Readiness
GitLab CI Packer - TIAD Camp Microsoft Cloud ReadinessGitLab CI Packer - TIAD Camp Microsoft Cloud Readiness
GitLab CI Packer - TIAD Camp Microsoft Cloud Readiness
The Incredible Automation Day
 
Active Directory - TIAD Camp Microsoft Cloud Readiness
Active Directory - TIAD Camp Microsoft Cloud ReadinessActive Directory - TIAD Camp Microsoft Cloud Readiness
Active Directory - TIAD Camp Microsoft Cloud Readiness
The Incredible Automation Day
 
Application Stack - TIAD Camp Microsoft Cloud Readiness
Application Stack - TIAD Camp Microsoft Cloud ReadinessApplication Stack - TIAD Camp Microsoft Cloud Readiness
Application Stack - TIAD Camp Microsoft Cloud Readiness
The Incredible Automation Day
 
Keynote TIAD Camp Serverless
Keynote TIAD Camp ServerlessKeynote TIAD Camp Serverless
Keynote TIAD Camp Serverless
The Incredible Automation Day
 
From AIX to Zero-ops by Pierre Baillet
From AIX to Zero-ops by Pierre BailletFrom AIX to Zero-ops by Pierre Baillet
From AIX to Zero-ops by Pierre Baillet
The Incredible Automation Day
 
Serverless low cost analytics by Adways y Audric Guigon
Serverless low cost analytics by Adways y Audric GuigonServerless low cost analytics by Adways y Audric Guigon
Serverless low cost analytics by Adways y Audric Guigon
The Incredible Automation Day
 
Operationnal challenges behind Serverless architectures by Laurent Bernaille
Operationnal challenges behind Serverless architectures by Laurent BernailleOperationnal challenges behind Serverless architectures by Laurent Bernaille
Operationnal challenges behind Serverless architectures by Laurent Bernaille
The Incredible Automation Day
 
Build chatbots with api.ai and Google cloud functions
Build chatbots with api.ai and Google cloud functionsBuild chatbots with api.ai and Google cloud functions
Build chatbots with api.ai and Google cloud functions
The Incredible Automation Day
 
Real time serverless data pipelines on AWS
Real time serverless data pipelines on AWSReal time serverless data pipelines on AWS
Real time serverless data pipelines on AWS
The Incredible Automation Day
 
Azure functions
Azure functionsAzure functions
Azure functions
The Incredible Automation Day
 
TIAD 2016 - Beyond windowsautomation
TIAD 2016 - Beyond windowsautomation TIAD 2016 - Beyond windowsautomation
TIAD 2016 - Beyond windowsautomation
The Incredible Automation Day
 
A smooth migration to Docker focusing on build pipelines - TIAD Camp Docker
A smooth migration to Docker focusing on build pipelines - TIAD Camp DockerA smooth migration to Docker focusing on build pipelines - TIAD Camp Docker
A smooth migration to Docker focusing on build pipelines - TIAD Camp Docker
The Incredible Automation Day
 
Docker in real life and in the Cloud - TIAD Camp Docker
Docker in real life and in the Cloud - TIAD Camp DockerDocker in real life and in the Cloud - TIAD Camp Docker
Docker in real life and in the Cloud - TIAD Camp Docker
The Incredible Automation Day
 
Orchestrating Docker in production - TIAD Camp Docker
Orchestrating Docker in production - TIAD Camp DockerOrchestrating Docker in production - TIAD Camp Docker
Orchestrating Docker in production - TIAD Camp Docker
The Incredible Automation Day
 
Strategy, planning and governance for enterprise deployments of containers - ...
Strategy, planning and governance for enterprise deployments of containers - ...Strategy, planning and governance for enterprise deployments of containers - ...
Strategy, planning and governance for enterprise deployments of containers - ...
The Incredible Automation Day
 
Opening Keynote - TIAD Camp Microsoft Cloud Readiness
Opening Keynote - TIAD Camp Microsoft Cloud ReadinessOpening Keynote - TIAD Camp Microsoft Cloud Readiness
Opening Keynote - TIAD Camp Microsoft Cloud Readiness
The Incredible Automation Day
 
GitLab CI Packer - TIAD Camp Microsoft Cloud Readiness
GitLab CI Packer - TIAD Camp Microsoft Cloud ReadinessGitLab CI Packer - TIAD Camp Microsoft Cloud Readiness
GitLab CI Packer - TIAD Camp Microsoft Cloud Readiness
The Incredible Automation Day
 
Active Directory - TIAD Camp Microsoft Cloud Readiness
Active Directory - TIAD Camp Microsoft Cloud ReadinessActive Directory - TIAD Camp Microsoft Cloud Readiness
Active Directory - TIAD Camp Microsoft Cloud Readiness
The Incredible Automation Day
 
Application Stack - TIAD Camp Microsoft Cloud Readiness
Application Stack - TIAD Camp Microsoft Cloud ReadinessApplication Stack - TIAD Camp Microsoft Cloud Readiness
Application Stack - TIAD Camp Microsoft Cloud Readiness
The Incredible Automation Day
 
Serverless low cost analytics by Adways y Audric Guigon
Serverless low cost analytics by Adways y Audric GuigonServerless low cost analytics by Adways y Audric Guigon
Serverless low cost analytics by Adways y Audric Guigon
The Incredible Automation Day
 
Operationnal challenges behind Serverless architectures by Laurent Bernaille
Operationnal challenges behind Serverless architectures by Laurent BernailleOperationnal challenges behind Serverless architectures by Laurent Bernaille
Operationnal challenges behind Serverless architectures by Laurent Bernaille
The Incredible Automation Day
 
Build chatbots with api.ai and Google cloud functions
Build chatbots with api.ai and Google cloud functionsBuild chatbots with api.ai and Google cloud functions
Build chatbots with api.ai and Google cloud functions
The Incredible Automation Day
 

Recently uploaded (20)

Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 

TIAD 2016 : Application delivery in a container world

  • 1. Application delivery in a container world 4 octobre 2016 . #TIAD . @tiadparis
  • 2. # TIAD@ tiadparis Who am I? 2 Laurent Bernaille @d2si • Linux background • Cloud enthousiast • Opensource advocate • Love discovering, building (and breaking…) new things • Passionate about the ongoing IT transformations @lbernail
  • 3. # TIAD@ tiadparis Docker from development to production 3 • Local development • Docker and Continuous integration • Deploying to servers: scheduling containers • Multi-server setup: service discovery • Updating my application safely: Blue green deployment • Dynamically enable/disable features: Feature toggling
  • 4. # TIAD@ tiadparis Demo • Local Build • Run locally (docker-compose) • Update code • Commit • Intregration with travis to publish image to ECR registry docker build -t demotiad/vote:0.1 --build-arg version=0.1 vote docker tag demotiad/vote:0.1 demotiad/vote:latest specific version tag ARG for label Alias image to latest ARG version ADD Dockerfile /Dockerfile LABEL eu.d2-si.python_version="2.7" LABEL eu.d2-si.application="vote" LABEL eu.d2-si.version="${version}" Metadata about the image Amazon ECR
  • 5. # TIAD@ tiadparis 5 Bastion eu-west-1a Public subnets Let’s create an environment in AWS to deploy Private subnets NAT GW Public subnets Private subnets eu-west-1b Public subnets Private subnets eu-west-1c
  • 6. # TIAD@ tiadparis Scheduling How do I run my containers? • Manual : ssh / docker run • Automated: ansible How do I choose a host? • Static (see before) • With a generic scheduler (Mesos, Nomad) • With a specialized scheduler (Kubernetes, ECS, Swarm) Choosing your scheduler • Most complete: Kubernetes • Kubernetes and Swarm provide more than scheduling - Higher level of abstraction - Control networking - Really worth looking into once if you have run production workloads for a while - hosts: redis tasks: - name: Run redis docker_container: name: redis image: redis - hosts: app tasks: - name: Run app docker name: vote image: demotiad/vote Demo: ECS (good integration with AWS / terraform, simple)
  • 7. # TIAD@ tiadparis Service discovery How do my containers find each other when I have multiple hosts? • Static: set up /etc/hosts entries in containers • Rely on service discovery from scheduler * Kubernetes * Swarm > Big assumptions on the nework, intrusive (overlay, proxy, iptables) • Use a separate tool for service discovery + More control + Can be used for non-containers workloads (and for communication with them) - An additional tool to manage app redis redis ? - hosts: redis tasks: - name: Run redis docker_container: name: redis image: redis - hosts: app tasks: - name: Run app docker name: vote image: demotiad/vote etc_hosts: redis: 10.0.0.4 Demo: Consul (one of the reference standalone solution)
  • 8. # TIAD@ tiadparis 8 Bastion Public subnets NAT GW Public subnets Public subnets CAg (UI) CS CS CS Let’s create a consul cluster
  • 9. # TIAD@ tiadparis ECS 9 Bastion Public subnets NAT GW Public subnets Public subnets ECS ECS EFS file system EFS Mount target EFS Mount target EFS Mount target /mnt/efs /mnt/efs /mnt/efs Deploy ECS servers CAg (UI) CS CS CS
  • 10. # TIAD@ tiadparis ECS 10 Bastion Public subnets NAT GW Public subnets Public subnets CAg (UI) CS CS CS ECS ECS EFS file system EFS Mount target EFS Mount target EFS Mount target /mnt/efs /mnt/efs /mnt/efs CAg RG Cad CAg RG Cad CAg RG Cad docker events We need some services on all nodes
  • 11. # TIAD@ tiadparis ECS 11 Bastion Public subnets NAT GW Public subnets Public subnets CAg (UI) CS CS CS ECS ECS EFS file system EFS Mount target EFS Mount target EFS Mount target /mnt/efs /mnt/efs /mnt/efs CAg RG Cad CAg RG Cad CAg RG Cad docker events Let’s start two containers Rd Ash redis?
  • 12. # TIAD@ tiadparis ECS 12 Bastion Public subnets NAT GW Public subnets Public subnets CAg (UI) CS CS CS ECS ECS EFS file system EFS Mount target EFS Mount target EFS Mount target /mnt/efs /mnt/efs /mnt/efs/redis CAg RG Cad CAg RG Cad CAg RG Cad Let’s deploy our application: backends Red Ctmpl+Nginx Ctmpl+Nginx
  • 13. # TIAD@ tiadparis A few notes on ECS ECS tasks • run « manually » (part of ECS servers bootstrap here) • Consist of one or several related containers (« pod ») • Consul Agent / Registrator / cAdvisor ECS services • Run a given number of tasks on the cluster • Ensure they remain running • Scheduling * find host with capacity * try to run tasks of the same service on different nodes / AZ - Redis : 1 - Haproxy + Consul Template : 2 Persistency • No solution for dynamic volume migration • We use EFS and mount an EFS sub-directory inside containers with data
  • 14. # TIAD@ tiadparis Consul template • Watch for entries in consul • Generate configuration based on these entries • Here * Generate nginx configuration * Start nginx as a child process * Reload nginx when configuration as changed server { location / { proxy_pass http://{{key_or_default "routes/vote" "blue”}}; } } server { location / { proxy_pass http://blue; } } key routes/vote ? • Let’s create routes/vote and set it to green
  • 15. # TIAD@ tiadparis ECS 15 Bastion Public subnets NAT GW Public subnets Public subnets CAg (UI) CS CS CS ECS ECS EFS file system EFS Mount target EFS Mount target EFS Mount target /mnt/efs /mnt/efs /mnt/efs/redis CAg RG Cad CAg RG Cad CAg RG Cad Red Ctmpl+Nginx Ctmpl+Nginx Deploy our app Vote: http://tiad.awsdemo.d2-si.eu AppApp
  • 16. # TIAD@ tiadparis How did nginx find the containers? upstream green { {{ range service "votegreen" }} server {{.Address}}:{{.Port}};{{end}} } upstream green { server 10.255.128.166:32769; server 10.255.129.118:32770; } service votegreen ?
  • 17. # TIAD@ tiadparis ECS 17 Bastion Public subnets NAT GW Public subnets Public subnets CAg (UI) CS CS CS ECS ECS EFS file system EFS Mount target EFS Mount target EFS Mount target /mnt/efs /mnt/efs /mnt/efs/redis CAg RG Cad CAg RG Cad CAg RG Cad Red Ctmpl+Nginx Ctmpl+Nginx AppApp What about a new version? App App
  • 18. # TIAD@ tiadparis Blue Green deployment HA P HA P AppApp App App routes/vote: green Test before switching Acces blue containers directly Use custom header: X-Color map $http_x_color $color { "green" "green"; "blue" "blue"; default "{{= key_or_default "routes/vote" "blue”}}"; } server { location / { proxy_pass http://$color; } } X-color = blue?
  • 19. # TIAD@ tiadparis When ok switch HA P HA P AppApp App App routes/vote: blue Dynamic parameters Get title from consul params/title/blue title=get_param("title",color,"Hello TIAD")
  • 20. # TIAD@ tiadparis Feature toggling HA P HA P AppApp App App routes/vote: blue features/containerid/blue Switch on/off features Release code not validated yet Simplify branch management (always ship trunk) Advanced use cases Canary deployment (x% users) Specific users only if is_enabled_feature("containerid",color): message=message+" on container "+ hostname « Always Ship Trunk » (Paul Hammond, Velocity 2010) « Feature Toggles » (Martin Fowler 2016: http://martinfowler.com/articles/feature-toggles.htm)
  • 21. # TIAD@ tiadparis Conclusion and perspectives Going into production with docker • With containers OPS and DEV are closer than ever • Continuous Integration as a source for images • Service discovery will be a challenge => Not specific to containers but to microservices in general A few other (somewhat unrelated) notes • Docker in production will require experienced sysadmins • Avoid putting stateful (db) services in containers • Security (image sources, container permissions)
  • 22. # TIAD@ tiadparis Thank you @lbernail Look at / Fork the code of this demo on github https://github.com/lbernail/demotiad Questions ?