Configuring volumes in Marathon
So far, we have learned how to deploy our microservice on a Mesos cluster using Marathon and configure ports using Marathon's web UI. One of the most common things you would want to do is be able to map volumes in your container to the host machine. Though this is not something that is super important to our geolocation application, when you deal with applications that save files on the filesystem, this is critical. You wouldn't want to lose your data, would you? In this recipe, we will look at how to map volumes using Marathon.
Getting ready
In order to learn how to configure volume mapping in Marathon, let's make our application save something to the filesystem. Let's say the geolocation application would like to store the geolocation JSON to the filesystem as it receives them. It might not be a great design, but for our understanding, let's make our geolocation application store the geolocation JSON files in a dedicated data directory as and when they arrive...