mapbox / ecs-watchbot

Make robots do your work for you
ISC License
195 stars 30 forks source link

enhancement: writable filesystem, but keep the same container #308

Open vsmart opened 5 years ago

vsmart commented 5 years ago

It'd be neat to have a watchbot option that combines the two run modes of watchbot.

The use case we ran into is that we are running a system that has to write to the file system (and not just /tmp) so we need to use the writableFileSystem option, but we'd also like to keep the data around for the next message run, so we don't want an entirely new container.

This is a probably a bit of an edge case, since most people would want the assurance of a "clean slate" on each container run, but it'd be nice to support it anyway.

At the moment we can achieve this behaviour by monkey-patching the watchbot config with

watcher.Resources.WatchbotTask.Properties.ContainerDefinitions[0].ReadonlyRootFilesystem = false;
jakepruitt commented 5 years ago

🤔 I feel like the restrictions here were set up to prevent uncontrolled disk space growth. I wonder if it's possible to turn the part of your filesystem that you want to write to into a volume?