Docker in der Cloud

Post on 18-Jul-2015

445 views 5 download

Tags:

Transcript of Docker in der Cloud

DOCKER IN DER CLOUDSascha 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

●Docker

●Container technology for Linux

●Uses cgroups and kernel

namespaces

● Isolation of processes

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

DOCKER DEPLOYMENT

Amazon Cloud

WorkstationGitHub

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