Mesos is a great platform for running container workloads, and Mesosphere's Marathon is one of the easiest and best ways to deploy those workloads on Mesos. For running periodic background jobs, Chronos is another great scheduler for Mesos to run distributed scheduled tasks.
While Mesos and Marathon are wonderful platforms, developers often run and build groups of applications on their development machines using Docker's Compose tool. Compose works well for local development, but production support is relatively new and untested.
At Skuid, we found we were often converting and rewriting docker-compose.yml files into Marathon application JSON files, and the work was tedious and redundant. Take the following docker-compose.yml for example:If you were to run this configuration on a laptop, you would have the monitoring system prometheus and dashboard visualization tool grafana running.
Marathon has a beautiful UI including a JSON mode, but to run this on Marathon, each parameter would have to be converted by hand. The end result for prometheus might look something like this: About a year and a half ago, I created container-transform for porting compose files to Amazon's EC2 Container Service, or to port containers to systemd units.
Because all of the docker parameters can be expressed in Marathon's or Chronos' application definitions, I added Marathon and Chronos support to the latest version of container-transform. Now, to convert the docker-compose.yml, I just need to run: