DOCKER ON AWS
Sascha Möllering | zanox AG
Sascha Möllering
sascha.moellering@zanox.com
Lead Engineer / DevOps Hipster
zanox AG
http://autoscaling.io
@sascha242
ABOUT ME
JAVA MAGAZIN 11.14
ARCHITEKTUR IM KONTEXT DER CLOUD: PATTERNS UND BEST
PRACTICES
AWS VIRTUAL CLOUD SUMMIT
CONTINUOUS DELIVERY IN AWS USING DOCKER
ENTWICKLER SPEZIAL: DOCKER
ÜBER DEN WOLKEN: EIN ERFAHRUNGSBERICHT ZUM DOCKER-
EINSATZ IN DER AMAZON CLOUD
ABOUT ME
●Our current project
●Highly scalable tracking application
●Multi-Region
●Multi-AZ
●Latency based routing
GENERALARCHITECTURE
RegionUS-WEST (N. California) EU-WEST (Ireland)
ASIA PAC
(Tokyo)
ASIA PAC
(Singapore)
US-WEST (Oregon)
SOUTH AMERICA (Sao
Paulo)
US-EAST (Virginia)
GOV CLOUD
ASIA PAC
(Sydney)
EU-CENTRAL (Frankfurt)
GENERALARCHITECTURE
Availability
Zone
GENERALARCHITECTURE
Internet
Auto Scaling group
Auto Scaling group
Availability Zone
Availability Zone
GENERALARCHITECTURE
Apache Kafka
IMMUTABLE SERVER
Berlin | 08.06.2012 | zanox | Company Präsentation
IMMUTABLE SERVER
●Trash your servers!!!
●New deployment => new infrastructure
●Don’t change an existing server
●Problem: snowflake server
IMMUTABLE SERVER
Berlin | 08.06.2012 | zanox | Company Präsentation
IMMUTABLE SERVER
IMMUTABLE SERVER
DOCKER REGISTRY
●Private Docker registry
●Based an EC2 and S3
●Stores custom images
EC2 instance with Docker
registry (port 5000)
S3 bucket to store
Docker images
DOCKER REGISTRY
DOCKER REGISTRY
Amazon Cloud
Workstation
GitHub Jenkins
Python/Boto
Docker Image
Docker Registry S3 bucket with
Docker Images
● Implementation progress:
● CloudFormation template
● Uses VPC and Multi-AZ
● Scalable (ELB)
● SSL support missing
● https://github.com/SaschaMoellering/docker-
registry-aws
DOCKER REGISTRY
DEPLOYMENT
DEPLOYMENT
DEPLOYMENT
python start_docker_instance.py 
-r <myregistry>:5000 
-i tracking-ppv 
-t 95 
-q 4 
-s quality 
-n 'Sascha Moellering’
-e 'sascha.moellering@zanox.com'
-m trackingppv
-d '-d -p 8080:8080'
DEPLOYMENT
python start_elb.py 
-r <myregistry>:5000 
-i tracking-ppv 
-t 95 
-s quality 
-d '-d -p 8080:8080’
EC2 INSTANCES AND ELB
EC2 CONTAINER SERVICE
●Amazon EC2 Container Service (ECS):
● Container management service
● Fast
● Highly scalable
● Supports Docker
EC2 CONTAINER SERVICE
●Cluster
●Container Instance
●Task Definition
●Task
●Container
EC2 CONTAINER SERVICE
EC2 CONTAINER SERVICE
EC2 CONTAINER SERVICE
EC2 CONTAINER SERVICE
#!/bin/bash
echo ECS_CLUSTER = 
your_cluster_name >> 
/etc/ecs/ecs.config
EC2 CONTAINER SERVICE
EC2 CONTAINER SERVICE
EC2 CONTAINER SERVICE
EC2 CONTAINER SERVICE
EC2 CONTAINER SERVICE
EC2 CONTAINER SERVICE
EC2 CONTAINER SERVICE
EC2 CONTAINER SERVICE
Docker on AWS

Docker on AWS

Editor's Notes

  • #7 9 bzw. 10 verschiedene Regionen Region: separierte geographische Bereiche Neu: EU-Central in Frankfurt
  • #8 Regions werden in Availability Zones unterteilt Jede AZ is isoliert, aber durch Leitungen mit niedriger Latenz verbunden A group of AZ is a Region A group of Datacenter is an AZ
  • #9 S3 DynamoDB RDS RedShift EMR
  • #20  ----- Meeting Notes (26/10/14 22:22) ----- Fabric -> Boto
  • #31 Cluster: a logical grouping of container instances that you can place tasks on. Container Instance: an Amazon EC2 instance that is running the Amazon ECS agent and has been registered into a cluster. Task Definition: a description of an application that contains one or more container definitions. Task: an instantiation of a task definition that is running on a container instance. Container: a Linux container that was created as part of a task.
  • #38 - Task-definition