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

Victor Vieux

May 06, 2014
Tweet

More Decks by Victor Vieux

Other Decks in Technology

Transcript

  1. Advance AWS Meetup - @okta– 05/06/2014
    Brief introduction to Docker
    & AWS deployment
    Victor Vieux, Docker Inc.
    @vieux

    View Slide

  2. What is docker ?

    View Slide

  3. The Matrix From Hell

    View Slide

  4. Another Matrix From Hell

    View Slide

  5. Solution:
    the intermodal shipping container

    View Slide

  6. Solved!

    View Slide

  7. Solution to the deployment problem:
    the Linux container

    View Slide

  8. Solved!

    View Slide

  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”

    View Slide

  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”

    View Slide

  11. What’s really docker ?

    View Slide

  12. [email protected]:~$ docker run –it ubuntu bash
    [email protected]:/# 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
    [email protected]:~$ docker run –d crosbymichael/redis
    699eb403b54b
    [email protected]:~$ docker inspect 699eb403b54b
    "IPAddress": "172.17.0.2",
    "Ports": {
    ”6379/tcp": [{
    "HostIp": "0.0.0.0",
    "HostPort": "49200"
    }]
    }
    Runtime for Linux containers

    View Slide

  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

    View Slide

  14. Deployment on:

    View Slide

  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

    View Slide

  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

    View Slide

  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=:4243
    $>docker run fedora:20 ls

    View Slide

  18. Elastic Beanstalk
    1

    View Slide

  19. Elastic Beanstalk
    2
    3

    View Slide

  20. h"p://dockercon.com  
     

    View Slide

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

    View Slide