Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Docker. Does it matter for Java developer ?

9,896 views

Published on

Do you know, being a Java dev, how to manage development environments with less effort? How to achieve continuous delivery using immutable server concept? How to manage set up a cloud within your workstation and many more? It might be the case you know, I bet it's much more easier to do with Docker.

Published in: Software
  • Hello! Get Your Professional Job-Winning Resume Here - Check our website! https://vk.cc/818RFv
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Docker. Does it matter for Java developer ?

  1. 1. Does it matter for Java Dev?
  2. 2. ● just baked father ● SA at EPAM Systems ● primary skill is Java ● hands-on-coding with Groovy, Ruby ● trying to get in touch with Erlang/Elixir ● passionate about agile, clean code and devops Izzet Mustafayev@EPAM Systems @webdizz webdizz izzetmustafaiev http://webdizz.name
  3. 3. Agenda ● what is docker? ● concepts ● how to ● dev env ● demo time ● what’s next ● summary ● q&a
  4. 4. Docker https://www.docker.com/ Docker - An open platform for distributed applications for developers and sysadmins. ● Develop an app with any language and any toolchain ● Ship the “Dockerized” app and dependencies anywhere ● Scale, move between data centers, update with zero downtime and more
  5. 5. 1.6.2 released
  6. 6. Virtualization
  7. 7. Containerisation
  8. 8. Virtualization vs Containerisation
  9. 9. Container under the hood
  10. 10. Running containers
  11. 11. Concepts
  12. 12. Automation ● Build automation ● Provisioning automation ● Configuration automation ● Delivery Automation
  13. 13. ● Environment as a code ● Prohibition of ad-hoc changes Immutability
  14. 14. ● Build ● Run ● Destroy Disposability
  15. 15. Containerisation ● Container as deployment artifact ● Environment agnostic ● New version - new container ● All dependencies built in
  16. 16. Installation # apt-get update # wget -qO- https://get.docker.com/ | sh Assumption: Ubuntu
  17. 17. Dockerfile FROM phusion/baseimage:0.9.12 RUN apt-get -y update && apt-get -y install software-properties-common python-software- properties && add-apt-repository ppa:webupd8team/java && apt-get clean RUN apt-get -y update && echo oracle-java8-installer shared/accepted-oracle-license-v1- select true | /usr/bin/debconf-set-selections && apt-get -y install oracle-java8-installer && apt-get clean && update-alternatives --display java ENV JAVA_HOME /usr/lib/jvm/java-8-oracle 1 3 4 5
  18. 18. Command Line $ docker build -t webdizz/baseimage-java8 . $ docker images $ docker run -d --name=java8 webdizz/baseimage-java8 $ docker ps $ docker logs java8 $ docker stop java8 $ docker start java8 $ docker top java8
  19. 19. Docker Hub ● User accounts and Authentication ● Public namespaces ● Automated builds ● Registry for images with checksums ● Meta-data store (comments, stars, list public repositories)
  20. 20. Official images
  21. 21. Official images for Java
  22. 22. Official images for Java... ● Clojure ● Tomcat ● Jruby ● Maven ● Glassfish ● Elasticsearch ● Jenkins ● SonarQube ● And more non-official
  23. 23. Dev Env
  24. 24. Perfect together
  25. 25. Routine is boring
  26. 26. Docker-compose is our way ● YAML syntax ● Configuration inclusion/inheritance ● Comprehensive CLI ● Bash completion
  27. 27. Docker-compose YAML ● image ● command ● links ● ports/expose ● volumes ● environment ● ...
  28. 28. Docker-compose CLI ● build ● up ● logs ● ps ● run ● start/stop ● scale ● ...
  29. 29. Demo Time
  30. 30. Service Discovery ● Configuration registry ● DNS ● Health checking Tools ● Consul ● Etcd ● Zookeeper
  31. 31. Resource Management ● Scheduling ● Task execution ● Auto scale Tools ● Mesos ● Flynn ● Fleet
  32. 32. Monitoring ● Failures and Outages are expected for distributed apps ● Business aware metrics matters Tools ● Dropwizard Metrics ● Netflix Servo ● cAdvisor
  33. 33. Logging ● Critical for operation ● Even more critical for distributed operation ● Remains critical with operation in Docker Tools ● Elasticsearch Logstash Kibana ● Elasticsearch Fluentd Kibana
  34. 34. Continuous Delivery ● Container as deployable artifact ● New container for new application version ● Start/stop proper version of container for proper version of application Tools ● Ansible ● Docker Swarm
  35. 35. Summary ● Easy and fast building of images ● Easy to share in your team ● Easy to scale ● Easy to work with new technologies ● Of course learning curve ● Production like dev env*
  36. 36. ● http://docs.docker.com/ ● https://hub.docker.com/ ● http://www.fig.sh/ ● https://mesosphere.com/ ● http://www.consul.io/ ● https://flynn.io ● https://github.com/coreos/fleet ● http://goo.gl/NEAfF2 ● http://goo.gl/gfi94z References
  37. 37. Q&A
  38. 38. Izzet Mustafayev@EPAM Systems @webdizz webdizz izzetmustafaiev http://webdizz.name

×