When Ferran Rodenas first introduced the docker-boshrelease he included some example deployment manifests that used some example Docker images hosted on Docker Hub. The original Dockerfiles were hosted somewhere else again. And then we further complicated it by creating spiff templates and putting them in a different repo.

Then a client asked an innocent question:

How do I change the logstash.conf in our logstash service?

One whiteboard full of tangled explanation later and I felt embarrassed by the complexity. I mean, IT WASN'T MY FAULT, but... clears throat... but I still needed to do something so he could fiddle with the configuration until it worked for him.

So we continued along the path of dedicated BOSH releases per Docker image (see original article introducing consul-docker-boshrelease and how we can now embed Docker images into BOSH releases).

Introducing https://github.com/cloudfoundry-community/logstash-docker-boshrelease for deploying Logstash/Elasticsearch to BOSH VMs.

This BOSH release has three use cases:

  1. run a single Docker container of a Logstash/ES Docker image on a single BOSH VM
  2. run a Cloud Foundry service broker that itself runs containers of Logstash/ES Docker image on a BOSH VM based on user requests
  3. embedded Logstash/ES Docker image that could be used by another BOSH release

The Logstash/Elasticsearch image can be referenced either:

  • from an embebbed/bundled image stored with each BOSH release version
  • from upstream and/or private registries

This flattened BOSH release, that bundles the Docker image and the Dockerfile, means it is so much easier to explain how it all works to others (and to my future self who will forget).

Included Dockerfile

What is new about this BOSH release is that the Dockerfile used to create the Docker image is included in the BOSH release.

See images/logstash for the Dockerfile and the README.

How to dev/test changes

Since docker build on this Dockerfile is expensive - time to build everything and time to push - there is also a second folder for developers/forkers/experimenters to play with configuration.

images/logstash-dev for the README instructions for dev/test cycle with bosh-lite.

Fortunately now my client team mate can twiddle the logstash.conf filters to his heart's content without knowing anything about Docker or BOSH.