DOCKER IN DER AWS CLOUD
Sascha Möllering | zanox AG
Sascha Möllering
sascha.moellering@zanox.com
sascha@autoscaling.io
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
AGENDA
1. Docker
2. Amazon Web Services
3. Docker Container Deployment
4. Immutable Server Pattern
5. EC2 Container Service
DOCKER
●Amazon Web Services
●Collection of remote computing
services
●Cloud computing platform by
Amazon.com
●Well known: EC2 and S3
DOCKER DEPLOYMENT
●Amazon Services with Docker support:
●Amazon OpsWorks*
●Elastic Beanstalk
●EC2 Container Service
*by adding a custom Docker Layer
DOCKER DEPLOYMENT
Amazon Cloud
Workstation
GitHub Jenkins
Python/Boto
Docker Image
Docker Registry S3 bucket with
Docker Images
EC2 instance with Docker
registry (port 5000)
S3 bucket to store
Docker images
DOCKER DEPLOYMENT
DOCKER DEPLOYMENT
DEPLOYMENT
DOCKER DEPLOYMENT
●Deployment of Docker containers
1. Remote API
2. EC2 user data
DOCKER DEPLOYMENT
●API to access Docker daemon
●Can be bound to specific host/port
●E.g. Jenkins can trigger deplyoments
●GET /containers/json
REMOTE API
DOCKER DEPLOYMENT
●Data to configure instance during
launch
●Install Docker
●Start Daemon
●Run Docker container
EC2 USER DATA
IMMUTABLE SERVER
●Trash your servers!!!
●New deployment => new infrastructure
●Don’t change an existing server
●Problem: snowflake server
IMMUTABLE SERVER
IMMUTABLE SERVER
IMMUTABLE SERVER
Blue
Green
Version 3
Version 4
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
#!/bin/bash
echo ECS_CLUSTER = 
your_cluster_name >> 
/etc/ecs/ecs.config
EC2 CONTAINER SERVICE
Docker in der AWS Cloud

Docker in der AWS Cloud

Editor's Notes

  • #6 Cloud Computing Plattform von Amazon
  • #9 Eb - Single Container - Multiple Containers (dependencies using JSON format) - Cool: direct integration into ELB (not just on EC2 level)
  • #10  ----- Meeting Notes (26/10/14 22:22) ----- Fabric -> Boto
  • #22  ----- Meeting Notes (26/10/14 22:22) ----- Fabric -> Boto
  • #25 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.
  • #29 - Task-definition