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
  2. 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”
  3. 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”
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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