Why AWS?

Elastic Container Service

Elastic Container Service

Linux Container LXC

it is an operating-system-level virtualization environment for running multiple
isolated Linux systems (containers) on a single Linux control host.

Linux Container LXC

it is an operating-system-level virtualization environment for running multiple
isolated Linux systems (containers) on a single Linux control host.

I love Wikipedia

Docker

Docker containers wrap up a piece of software in a complete
filesystem that contains everything it needs to run: code, runtime, system tools,
system libraries – anything you can install on a server

Docker

Commands:
attach Attach to a running container
build Build an image from a Dockerfile
images List images
kill Kill a running container
logs Fetch the logs of a container
ps List containers
restart Restart a container
rm Remove one or more containers
rmi Remove one or more images
run Run a command in a new container
search Search the Docker Hub for images
start Start one or more stopped containers
stop Stop a running container

ECS in practice

ECS in practice

ecs-cli compose --file docker-compose.yml \
--project-name wp1 up

Up your first wordpress task, wp1

ECS in practice

ecs-cli ps

See status of your tasks

ECS in practice

COMMANDS:
configure Configures your AWS credentials
up Create the ECS Cluster
down Delete the ECS Cluster and associated resources
scale Modify the number of container instances.
ps List all of the running containers.
compose Execute docker-compose style commands
on an ECS cluster.
help, h Shows a list of commands or help for one command

docker-compose style commands?!

Now we have 2 wordpress that run on different ports 8080 and 8081

Our problem are not finished

HAProxy helps you

high availability, load balancing, and proxying for TCP and HTTP-based applications.
It is particularly suited for very high traffic web sites and powers quite a
number of the world's most visited ones.