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 & rancher

183 views

Published on

From Docker basics to Rancher Catalog.
From developing application within Docker to deploying them in production with Rancher Catalog.

Published in: Software
  • DOWNLOAD FULL. BOOKS INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Docker & rancher

  1. 1. Alin Voinea Eau de Web, Romania Docker & Rancher Docker Hub, Rancher Catalog
  2. 2. Summary ● Docker ○ Docker Hub ● Rancher ○ Rancher Catalog
  3. 3. What is Docker? ● OS level virtualization - “containerization” ● First released in 2013 - Solomon Hykes - dotCloud ● Maintained and and developed by Docker Inc. ● Lightweight than virtual machines ● Single operating-system kernel ● Portable ● Scalable ● Stackable
  4. 4. Running Applications w/ Docker $ docker run plone:5 $ docker run eeacms/eionet:5.1-1.0 $ docker run registry.gitlab.com/avoinea/docker:3.5
  5. 5. Custom Docker Image: Dockerifle FROM plone:5.1.5 RUN apt-get update && apt-get install -y --no-install-recommends libldap2-dev libssl-dev && rm -rf /var/lib/apt/lists/* COPY site.cfg /plone/instance/ COPY docker-entrypoint.sh RUN gosu plone buildout -c site.cfg HEALTHCHECK --interval=1m --timeout=5s --start-period=1m CMD curl -f http://localhost:8080/ || exit 1 ENTRYPOINT [“/plone/instance/docker-entrypoint.sh”]
  6. 6. Custom Docker Image: docker-entrypoint.sh #!/bin/bash set -e # Make sure that the application can write within data volume chown -R plone:plone /data # Move the main application to `PID 1` by using `exec` # Use a non-root user to start your app exec gosu plone bin/instance "$@"
  7. 7. Build Docker Image: devel $ docker build -t eionet-dev /path/to/Dockerfile $ docker run -p 8080:8080 eionet-dev
  8. 8. Build Docker Image: production $ docker push eeacms/eionet $ git tag 5.1-1.0 $ git push --tags
  9. 9. $ docker-compose up $ docker-compose down $ docker-compose down -v Orchestration: Single host
  10. 10. $ docker-compose up -d $ docker-compose scale plone=3 version: "2" services: plone: image: eeacms/eionet:5.1-1.0 environment: - ZEO_ADDRESS=zeo:8100 zeo: image: plone:5.1.5 command: zeoserver volumes: - data:/data volumes: data: driver: local Orchestration: docker-compose docker-compose.yml
  11. 11. Orchestration: Multiple host
  12. 12. version: "2" services: plone: scale: 2 health_check: healthy_threshold: 2 response_timeout: 2000 port: 8080 unhealthy_threshold: 3 interval: 5000 strategy: recreate request_line: GET / zeo: scale: 1 health_check: ... version: "2" services: plone: mem_reservation: 1g mem_limit: 2g labels: io.rancher.scheduler.affinity:host_label: backend=yes io.rancher.scheduler.affinity:host_label_ne: reserved=yes io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} eu.europa.eionet.plone: true … volumes: data: driver: rancher-ebs / netapp / rancher-nfs / local driver-opts: size: 1g volumeType: gp2 docker-compose.yml rancher-compose.yml Orchestration: rancher-compose
  13. 13. version: "2" catalog: name: "Eionet - WWW" description: "Eionet Plone 5 website" version: "5.1-1.0" questions: - variable: "HOST_LABELS" label: "Do not schedule services on these hosts" description: "List of host labels” type: "string" required: true default: "reserved=yes" - variable: "TZ" ... version: "2" services: plone: labels: io.rancher.scheduler.affinity:host_label_ne: ${HOST_LABELS} … volumes: data: driver: ${DATA_VOLUME_DRIVER} driver-opts: {{.Values.DATA_VOLUME_DRIVER_OPTS}} docker-compose.yml rancher-compose.yml Rancher Catalog
  14. 14. $ rancher catalog ls $ rancher catalog install --name www-eionet-demo --answers /path/to/answers.txt EEA:www-eionet:1 Rancher Catalog: CLI & Web UI
  15. 15. Rancher Catalog: answers.txt
  16. 16. Rancher Catalog: Upgrades & Roll-back
  17. 17. Rancher Load Balancer ● Service rules ● Selector rules
  18. 18. Thank you! ● EEA Rancher Catalog: ○ github.com/eea/eea.rancher.catalog ● Documentation ○ docker.com ○ rancher.com ● Examples ○ github.com/eea?q=docker

×