Upgrade to Pro — share decks privately, control downloads, hide ads and more …

magic-night-2016-07-19-aws-ecs

 magic-night-2016-07-19-aws-ecs

Talk through useful concepts and tools needed for the AWS ECS (Docker containers' clustering solution) Magic Night on 2016-07-19.

AWSSD

July 19, 2016
Tweet

Other Decks in Programming

Transcript

  1. AWS SAN DIEGO MEETUP AMAZON EC2 CONTAINER SERVICE ▸ a.k.a.

    ECS ▸ Docker containers’ management system ▸ Run Docker containers on clusters of EC2 instances ▸ API enabled ▸ POST:CreateCluster ▸ POST:CreateService ▸ etc
  2. AWS SAN DIEGO MEETUP DOCKER CONTAINERS ▸ Portable packaging system

    for applications ▸ Web servers ▸ Databases ▸ Search engines ▸ Your code!
  3. AWS SAN DIEGO MEETUP WHAT WILL YOU NEED TO GET

    STARTED WITH AWS ECS ▸ AWS account ▸ Relatively new AWS CLI ▸ Docker ▸ Access to the services you use (EC2, etc)
  4. AWS SAN DIEGO MEETUP USEFUL AWS ECS CONCEPTS ▸ Amazon

    Docker Container Registry (ECR) ▸ Once you create your AWS ECR repository look at “View Push Commands” for tips on how to properly build, tag, and publish your images ▸ ECS Optimized AMI ▸ ECS Agent ▸ ECS Task Definitions ▸ Application’s blueprints (container image to use, etc) ▸ ECS Task ▸ Instantiation of an ECS Task Definition ▸ ECS Services ▸ Abstraction that allows you to control an ECS Task’s deployment/runtime behavior (e.g. number of running instances at any given point in time)
  5. AWS SAN DIEGO MEETUP THINGS YOU MIGHT NEED TO DO

    TO DEPLOY APPLICATIONS ON AWS ECS ▸ Use correct IAM Roles ▸ Configure inbound and outbound traffic rules to your container instances
  6. AWS SAN DIEGO MEETUP DOCKER WORKFLOW ▸ Write application ▸

    $PREFIX/your-app ▸ Define container image ▸ $PREFIX/your-app/Dockerfile ▸ Build container image ▸ docker build ▸ Test/Run your image ▸ docker run ▸ Tag your image ▸ docker tag ▸ Publish your image to a Docker repository ▸ docker push
  7. AWS SAN DIEGO MEETUP USEFUL DOCKER CONCEPTS TO BE AWARE

    OF ▸ Port mapping (from host to container)
  8. AWS SAN DIEGO MEETUP CHALLENGE https://github.com/awssd/aws-ecs-magic-night 1. Create an HTTP

    server with the route GET:magicnight that should return a JSON response as: { "response": "hello magic night from TEAM_NAME!” } 2. Create a Docker image with your HTTP server 3. Run your Docker container on AWS ECS 4. Confirm you can hit your end-point from the outside world.
  9. AWS SAN DIEGO MEETUP CHALLENGE, EXTRA POINTS 1. Load balance

    your HTTP server. 2. Make both your HTTP server and your EC2 containers instance auto scalable.