Top Banner
© 2014
11

Managing Stateful Docker Containers with BOSH (Cloud Foundry Summit 2014)

Jan 27, 2015

Download

Technology

Pivotal

Technical Track presented by Ferran Rodenas, Staff Engineer, Cloud Foundry at Pivotal.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Managing Stateful Docker Containers with BOSH (Cloud Foundry Summit 2014)

© 2014

Page 2: Managing Stateful Docker Containers with BOSH (Cloud Foundry Summit 2014)

Managing Stateful Docker Containers Using Cloud Foundry BOSH

Ferran Rodenas – @ferdy

Page 3: Managing Stateful Docker Containers with BOSH (Cloud Foundry Summit 2014)

DOCKER!DOCKER!DOCKER!

Docker Monkey Dance!

Page 4: Managing Stateful Docker Containers with BOSH (Cloud Foundry Summit 2014)

Docker CF-BOSH release

https://github.com/cf-platform-eng/docker-boshrelease

Page 5: Managing Stateful Docker Containers with BOSH (Cloud Foundry Summit 2014)

• Multiple Docker containers can be orchestrated into multiple vms

• Your choice of IaaS: AWS, OpenStack, VSphere, VCHS, CloudStack or GCE

• Containers self-healing• Container dependencies• Virtual machines self-healing• Host volumes can be bound to Docker containers• Resize data disks on-the-fly without losing data• Route container’s output to a remote syslog

Awesomeness!

Page 6: Managing Stateful Docker Containers with BOSH (Cloud Foundry Summit 2014)

Demo Time

Page 7: Managing Stateful Docker Containers with BOSH (Cloud Foundry Summit 2014)

- name: redis image: "dockerfile/redis” command: "--dir /var/lib/redis/ --appendonly yes” bind_ports: - "6379:6379” bind_volumes: - "/var/lib/redis” entrypoint: "redis-server” env_vars: - "EXAMPLE_VAR=1"

Container properties

Page 8: Managing Stateful Docker Containers with BOSH (Cloud Foundry Summit 2014)

- name: elasticsearch image: "bosh/elasticsearch” dockerfile: | FROM dockerfile/java

RUN \ cd /tmp && \ wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.1.tar.gz && \ tar xvzf elasticsearch-1.1.1.tar.gz && \ rm -f elasticsearch-1.1.1.tar.gz && \ mv /tmp/elasticsearch-1.1.1 /elasticsearch

WORKDIR /data

CMD ["/elasticsearch/bin/elasticsearch"]

EXPOSE 9200 EXPOSE 9300

Container properties

Page 9: Managing Stateful Docker Containers with BOSH (Cloud Foundry Summit 2014)

Resources

Docker CF-BOSH release: https://github.com/cf-platform-eng/docker-boshreleaseShipyard CF-BOSH release: https://github.com/cf-platform-eng/shipyard-boshrelease.git

CF-BOSH Documentation: http://docs.cloudfoundry.org/bosh/CF-BOSH Artifacts: http://boshartifacts.cloudfoundry.org/CF-BOSH Users mailing list: https://groups.google.com/a/cloudfoundry.org/forum/#!forum/bosh-users

YouTube videos:• Part 1: Orchestrating Docker containers with persistent data (http://youtu.be/h9AnuR6LkC4)• Part 2: Containers self-healing (http://youtu.be/6-qK_nRiHok)• Part 3: VM self-healing (http://youtu.be/HZcrX3coSfk)• Part 4: Resizing your persistent disk (http://youtu.be/z175tLnBZ9Y)

Page 10: Managing Stateful Docker Containers with BOSH (Cloud Foundry Summit 2014)

Don’t miss Decker session!

Wednesday

Page 11: Managing Stateful Docker Containers with BOSH (Cloud Foundry Summit 2014)

Q&A