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

Brief introduction to Docker & AWS deployment @okta

Brief introduction to Docker & AWS deployment @okta

Brief introduction to Docker + AWS deployment

1c23303ba42e0f9c0e017a94e900ea6c?s=128

Victor Vieux

May 06, 2014
Tweet

Transcript

  1. Advance AWS Meetup - @okta– 05/06/2014 Brief introduction to Docker

    & AWS deployment Victor Vieux, Docker Inc. @vieux
  2. What is docker ?

  3. The Matrix From Hell

  4. Another Matrix From Hell

  5. Solution: the intermodal shipping container

  6. Solved!

  7. Solution to the deployment problem: the Linux container

  8. Solved!

  9. High level approach: lightweight VM •  own process space • 

    own network interface •  can run stuff as root •  can have it’s own /sbin/init (different from the host) “Machine Container”
  10. Low level approach: chroot on steroids •  can also not

    have it’s own /sbin/init •  container = isolated process(es) •  share kernel with the host “Application Container”
  11. What’s really docker ?

  12. user@dockerhost:~$ docker run –it ubuntu bash root@1b55513ade2e:/# ps aux USER

    PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 18048 1960 ? Ss 08:35 0:00 bash root 13 0.0 0.0 15276 1140 ? R+ 08:35 0:00 ps aux user@dockerhost:~$ docker run –d crosbymichael/redis 699eb403b54b user@dockerhost:~$ docker inspect 699eb403b54b "IPAddress": "172.17.0.2", "Ports": { ”6379/tcp": [{ "HostIp": "0.0.0.0", "HostPort": "49200" }] } Runtime for Linux containers
  13. Standard format for containers and a place to share them

    •  Fetch an image from the public registry with “docker pull” •  Enter an image with “docker run“ and do some changes •  Record those changes with “docker commit”, repeat as many times as needed •  And then share the result with “docker push” on the public registry, or a private one
  14. Deployment on:

  15. EC2 – Amazon Linux •  Choose the last Amazon Linux

    AMI •  Launch & ssh into the instance sudo yum install –y docker sudo service docker start •  Docker 0.9 is installed
  16. EC2 – Ubuntu •  Choose a 64Bit Ubuntu image • 

    In the Launch Instance Wizard, set #include https://get.docker.io as User data •  Launch & ssh into the instance •  Wait for the cloudinit script to finish •  Last version of docker is installed
  17. EC2 – Ubuntu - Testing •  edit /etc/default/docker DOCKER_OPTS="-H 0.0.0.0:4243”

    •  Restart the docker daemon sudo service docker restart •  Open the port 4243 in the EC2 console •  On you laptop, set DOCKER_HOST $>export DOCKER_HOST=<EC2_ip>:4243 $>docker run fedora:20 ls
  18. Elastic Beanstalk 1

  19. Elastic Beanstalk 2 3

  20. h"p://dockercon.com    

  21. Thank you! Questions? http://docker.io http://docker.com @docker - @vieux