paz-sh / paz-service-directory

A catalog of services with versioned config for running as Docker containers with Fleet.
Other
1 stars 1 forks source link

Use persistent storage for services #10

Open pierredup opened 9 years ago

pierredup commented 9 years ago

Currently levelup is used to store service definitions. The issue is that it doesn't persist the data when the container shuts down. So when the service is re-started you suddenly don't have any service configs anymore (This happened twice to me already).

So one option is to not use levelup, but rather save the config in etcd. Or the other option is to create a volume for the db directory that can be mounted to the host so that the config can persist between container restarts.

Throughts?

lukebond commented 9 years ago

you are absolutely right about this @pierredup and i know how annoying it is when it happens to you when you're not expecting it at first.

when i've actually deployed things with Paz I've manually set up the mount and changed the unit files, which is not a viable solution considering we want this to be usable out of the box.

one change we're making atm is for the Paz Vagrant installation process to default to a single-node cluster and to do some sort of volume mounting to deal with this issue.

how that happens in production will probably be different and people will want it to be configurable. I'm open to ideas on that.

there are other options, as you say, and Etcd is a tempting one for the service directory. the scheduler kinda needs a database though as it needs to do range queries etc.