/docker-image-concourseci-worker-solid

A little wrapper arround concourse worker to avoid issues when workers shutdown

Primary LanguageRoff

deprecated: with Concourse 5.x the concept changed drastically and there should be no need for this implementation any longer.

WAT

Currently when running concourse-workers in non BOSH environments, like we do with docker-compose, see https://github.com/EugenMayer/concourseci-server-boilerplate when you shutdown the stack for restart or upgrade, the worker becomes to be in a broken, undefined state, leading to a lot of different issues like

  • "file not found" when running a task /job in concourse or during a resource trigger
  • job / task is stalled / stuck in the "preparing build" state, not doing anything

The main reasons are, that during the shutdown and the not proper persistence, the worker comes back online with a mixed state, see this issue concourse/concourse#1457 (comment) for more details.

What we do here is simply put, trap the worker and concourse retire-worker before we kill / stop the worker-container And thats about it

This image always is based on the latest concourse/concourse base image release and will not manipulate anything else then that wrapper

Usage

The docker-image can be found under eugenmayer/concourse-worker-solid

instead of using concourse/concourse as your worker image, use eugenmayer/concourse-worker-solid and either omit the command keyword in docker-compose or use (default) retire-workeror land-worker. The entrypoint is now change to worker_wrapper

You can change the default strategy to unregister workers from land-worker to retire-worker by simply

command: retire-worker

All parameters you pass to worker_wrapper will be passed to worker except the first one ( strategy ), so use whatever you like

command: land-worker --special-worker-param1=1 --special-worker-param1=

build it yourself

docker build .t <yourname> will do it - but since we concourse, you can also use this pipeline

https://github.com/EugenMayer/concourse-our-open-pipelines