Deploying Docker to AWS

** POST IN DEVELOPMENT **

So to say that deploying docker images to AWS is hard would be an understatement in my opinion. There is so much Jargon and so many configurations that it can be seriously overwhelming. There are roughly six steps in deploying docker containers to AWS. First ill outline those and then we will define a glossary for the Jargon.

The Six Steps to Deploy Docker to AWS

  1. Create an ECS Cluster
  2. Create an ELB
  3. Create IAM Roles
  4. Create an Auto Scaling Group
  5. Run Docker containers in your ECS Cluster
  6. Update Docker containers in your ECS Cluster

Glossary

  • ECS stands for Elastic Container Service: All it means is it is a service that runs Docker containers.
  • ECR is the Elasitc Container Registry. Basically, it's AWS's version of Dockerhub.
  • ECS Cluster Wikipedia says it nicely, A computer cluster is a set of loosely or tightly connected computers that work together so that, in many respects, they can be viewed as a single system.
  • ELB stands for Elastic Load Balancer. It is responsible for taking all of the incoming requests and routing them to each piece of the cluster where they should go.
  • IAM Roles IAM stands for Identity Access Management. It says who can do what. If you have ever used wordpress for instance, there are authors, subscribers, users, admins ect.. Each role has different capabilities. Another term for this is an ACL, or access control list.
  • Auto Scaling Group is like autopiolot for making sure your app stays up. If one piece of it goes down, auto scaling knows to bring it back up. In other words, autoscaling groups controls the number of containers running and when to start them and do other managerial tasks.
  • Repository you can think of this as a virtal folder that holds all of the images you push to Amazon's registry ( ECR )
  • AMI is just a fancy way of saying an Amazon VM. It stands for Amazon Machine Image.

How does the general work flow go?

  1. First, you setup a cluster to hold all of your container instances.
  2. You create a load balancer to intercept requests and route them to where they need to go.
  3. You set permissions with IAM roles.
  4. Next you create an auto scaling group and define your rules. When it should start new instances, what types of instances it should start, ect.
  5. Lastly start up your instances.