Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes

731 vues

Publié le

My presentation in JavaDay conf Kharkiv (Ukraine). It has been targeted mainly to Java developers to demonstrate how modern containerisation tools can improve developers agility and productivity.

This presentations contains link to he Workshop that has been delivered in OpenSlava 2015

Publié dans : Technologie
  • Identifiez-vous pour voir les commentaires

Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes

  1. 1. Next-gen engineering with Docker and Kubernetes
  2. 2. :~ whoami: Antons Kranga Cloud architect and full-stack developer with ~15 years in Java technology
  3. 3. Docker and Java
  4. 4. Motivation dev Chuck Norris app ops deploy
  5. 5. Docker Guest OS VM Guest OS Container engine Container engine Hypervisor VM Applications isolated inside containers Rapid deployment Focuses on service is inside container dev ops Focuses on env outside container Dockerfile is a contract
  6. 6. Dockerfile Dockerfile FROM java:jdk COPY chnorr.jar /app.jar EXPOSE 8080 ENTRYPOINT ["java", "-jar", "/app.jar"]
  7. 7. Workflow Dockerfile FROM java:jdk COPY chnorr.jar /app.jar EXPOSE 8080 ENTRYPOINT ["java", "-jar", "/app.jar"] dev Java code & Dockerfile Compile & Unit test chnorr.jar build registry (private or public) push ops pull Container engine docker run
  8. 8. Things to remember Containers have ephemeral. Persistent volumes should be managed separately App logs > /dev/stdout. Logs will be streamed to log collector service Use environment variables to inject configuration parameters inside container Do not use ENV vars for secrets Use private registry to distribute containers Containers != VM (!!!)
  9. 9. Rugged Docker
  10. 10. Kubernetes Cluster manager for your containers
  11. 11. Docker needs Platform Guest OS VM Guest OS Container engine Container engine Hypervisor VM Docker is just a container engine many things are not there • Networking • Storage • Service discovery • Container scheduling • Placement and load balancing • Routing • Self healing ...
  12. 12. Kubernetes Architecutre
  13. 13. Logical view Service ports 80,443 10.0.1.10 container container 10.0.1.11 container container load balancer services pods rc
  14. 14. Chuck Norris pod example Service apiVersion: v1 kind: Service metadata: name: chuck-norris labels: name: chuck-norris-serv selector: chuck: norris spec: type: LoadBalancer clusterIP: 10.0.1.10 ports: - name: http port: 80 Replication Controller apiVersion: v1 kind: ReplicationController metadata: name: chuck-norris labels: chuck: norris spec: replicas: 3 selector: name: chuck-norris template: metadata: labels: name: chuck-norris spec: containers: - name: chuck image: akranga/chnorr:1.0.0 ports: - name: http containerPort: 8080 port exposed in Dockerfile
  15. 15. Things to remember DIND makes you naked needs privileged mode Do not abuse etcd of kubernetes you can brake the platform
  16. 16. Jenkins Better continuous delivery model
  17. 17. CI with Kubernetes dev push push ops pullgit master Compile & Unit test app.jar build private registry Create pod Chuck Norris app pull
  18. 18. Putting all together jenkins ports 80 jenkins_master load balancer services pods storage jenkins_java_slave jenkins_kube_slave jenkins_docker_slave jenkins ports 80 private_registry chnorr green ports 80 chucknorris:b24 chucknorris:b25 chnorr latest ports 80 cloud storage cloud storage
  19. 19. Things to remember Workflows can be part of app-baseline Share workspace between slaves Don’t forget private docker registry DIND is evil but unavoidable
  20. 20. Grab hands-on practice labs here: https://github.com/akranga/kube-workshop
  21. 21. Questions?

×