BT

Managing Stateful Docker Containers with Cloud Foundry BOSH

| by Carlos Sanchez Follow 0 Followers on Jun 11, 2014. Estimated reading time: 2 minutes |

Cloud Foundry has released an experimental CF-BOSH release for Docker as an open source project, providing the same functionality as the original BOSH project, deployment and lifecycle management of large scale distributed services, but applied to Docker containers.

Cloud Foundry BOSH is a general tool chain that can orchestrate multi-node applications on top of IaaS and manage its lifecycle including stateful data, while providing monitoring, alerting and self-healing capabilities. It manages the VM templates, called stemcells in Cloud Foundry terminology, software releases and deployments. BOSH takes a YAML manifest and creates and manages a pool of VMs, picking a VM from the pool for each job of the release, and updating its configuration according to the deployment manifest.

Ferran Rodenas, platform engineer at the Cloud Foundry team, lists some of the benefits of the BOSH release for Docker:

  1. Multiple Docker containers can be orchestrated into multiple virtual machines.

  2. Containers can be deployed to a choice of IaaS (AWS, OpenStack, VSphere, VCHS, CloudStack or Google Compute Engine).

  3. Containers are monitored automatically and restarted in case of failures.

  4. If a container fails, when it is restarted then all of the dependent containers will be restarted too.

  5. Virtual machines are automatically monitored and recreated in case of a failure.

  6. Host volumes can be bound to Docker containers.

  7. Data disks attached to a Docker container can be resized without losing data.

Cloud Foundry BOSH release for Docker uses a declarative approach when deploying, based on a YAML file that defines the jobs, or virtual machines, as well as the Docker containers to deploy. It monitors not only that the Docker daemon process is up and listening, but also that each of the deployed containers are also running. If for some reason the Docker daemon or one of the containers dies, BOSH will automatically detect the failure and restart again the processes without any human intervention until it succeeds.

BOSH includes a health monitor that periodically pings an agent running inside the virtual machine to check its state and will trigger an alert if it is unable to contact the agent or the state of the deployment is not what it was expected. The alert can be sent by different means, such as email or pager, and can also trigger a special "resurrector" responder that will automatically replace the VM, reattach the existing persistent disk, and deploy and start the processes again.

There are some other efforts trying to integrate Docker images or Dockerfiles with Cloud Foundry. The Diego project replaces Cloud Foundry execution agent (DEA) making it more extensible across multiple runtime environments, including Docker. CloudCredo has written Decker, a reimplementation of Cloud Foundry DEA using Docker as a backend.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT