Ship java apps with docker!

download Ship java apps with docker!

of 32

  • date post

    06-Aug-2015
  • Category

    Software

  • view

    67
  • download

    2

Embed Size (px)

Transcript of Ship java apps with docker!

  1. 1. www.aurorasolutions.io Ship Java Apps with Docker!
  2. 2. www.aurorasolutions.io Raise your hands if you have... Tried Docker (online tutorial) Tried real Docker (e.g. deployed on remote VM) Installed Docker locally (e.g. with boot2docker) Written a Dockerfile (and built it!) An image on Docker hub (pushed or autobuilt) Deployed Docker images for dev/QA/test/prod etc.
  3. 3. www.aurorasolutions.io About: Rasheed Full Stack Developer & Co-Founder @ Aurora Solutions - Provides REMOTE Teams specializing in JVM languages and Angular + Ember My team at Aurora specializes in: Web/Backend Apps Java, Groovy, Grails, C# and AngularJS/EmberJS based single or multi page web apps Mobile Apps Android & iOS Business domains we specialize in: Media Streaming Automated/Algorithmic Trading Bitcoin / Crypto Currency LinkedIn: https://se.linkedin.com/in/rasheedwaraich Email: rasheed@aurorasolutions.io
  4. 4. www.aurorasolutions.io Agenda Background Container vs VM Define Sample App Build/Run Docker Images Docker Index Deploy Locally Deploy AWS Deploy GCE
  5. 5. www.aurorasolutions.io Background
  6. 6. www.aurorasolutions.io
  7. 7. www.aurorasolutions.io
  8. 8. www.aurorasolutions.io
  9. 9. www.aurorasolutions.io A useful analogy...
  10. 10. www.aurorasolutions.io
  11. 11. www.aurorasolutions.io
  12. 12. www.aurorasolutions.io
  13. 13. www.aurorasolutions.io
  14. 14. www.aurorasolutions.io
  15. 15. www.aurorasolutions.io
  16. 16. www.aurorasolutions.io Say again? Build: package your application in a container Ship: move that container from a machine to another Run: execute that container Any application: anything that runs on Linux Anywhere: local VM, cloud instance, bare metal
  17. 17. www.aurorasolutions.io Container vs. VM
  18. 18. www.aurorasolutions.io
  19. 19. www.aurorasolutions.io
  20. 20. www.aurorasolutions.io Basic Docker Concepts
  21. 21. www.aurorasolutions.io Main Docker Parts docker daemon used to manage docker (LXC) containers on the host it runs docker CLI used to command and communicate with the docker daemon docker image index a repository (public or private) for docker images
  22. 22. www.aurorasolutions.io Main Docker Elements Dockerfiles scripts automating the building process of images docker images snapshots of containers or base OS (e.g. Ubuntu) images docker containers directories containing everything-your-application
  23. 23. www.aurorasolutions.io Install Docker (Ubuntu 14.04) Step 1: add docker repository key to apt-key for package verification sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -" Step 2: add the docker repository to your list of repositories: sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" Step 3: finally install docker with an apt-get combo: sudo apt-get update sudo apt-get install lxc-docker
  24. 24. www.aurorasolutions.io Sample java app!
  25. 25. www.aurorasolutions.io Deploy Locally!
  26. 26. www.aurorasolutions.io Docker Index
  27. 27. www.aurorasolutions.io Docker Index https://index.docker.io/ Its GitHub for Docker images! You can pull activemq, mysql, mongodb, hadoop, etc. You can hook your docker index repository on to your own repository on GitHub!!! Build images automatically once you push something to Github
  28. 28. www.aurorasolutions.io Deploy on EC2!
  29. 29. www.aurorasolutions.io Deploy on GCE!
  30. 30. www.aurorasolutions.io Docker Linking
  31. 31. www.aurorasolutions.io
  32. 32. www.aurorasolutions.io Thank you! Questions...