Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: shareable state (and less of it) #250

Closed
timbertson opened this issue Dec 6, 2014 · 1 comment
Closed

Idea: shareable state (and less of it) #250

timbertson opened this issue Dec 6, 2014 · 1 comment

Comments

@timbertson
Copy link

So this is just an idea. I've toyed with nixops, but didn't feel comfortable committing to it while its state is in a non-shared sqlite3 database somewhere on my disk. Also, in my testing I would have some state changing between runs (e.g changing DHCP ip addresses, vms being turned on or off manually), and nixops more or less carked it because the state of the world didn't match what it thought. It seems fitting that nixops should try and be as stateless as possible, given its nix roots.

My aims are:

  • I want a shareable source of state. This means something that lives alongside my .nix files, and which can be checked in to source control. It shouldn't change unnecessarily, and it should be as minimal as possible. It should probably even be a .nix file itself. Sharing this file means multiple users can do deployments (as long as they have the latest state file), and it makes me feel much more confident that nixops isn't going to suddenly forget how to deploy my boxes.
  • I would also like an "on-demand" style of state storage. For every piece of state where it's feasible, we should not store it but rather get it from the source of truth (e.g using ec2 / gce APIs). To be honest I don't know if this can work, because maybe some of the stuff nixops stores can't be introspected from various backends (e.g virtualbox probably has very little introspection), but having this would give me much more confidence that nixops will be acting on the live system, rather than a model of what it thinks the system should look like. It would obviously mean a slower deployment, but I'd be totally fine with that if it makes things more correct and less fragile.

Not sure if an issue it the place for ideas, but I thought I'd get them down. I'd like to take a go at implementing some of this myself, but feedback as to how plausible any of it is would probably be good, as I've barely looked into any of the code so far :)

@grahamc
Copy link
Member

grahamc commented Apr 20, 2020

#1264 implements state backends, and those backends could implement locking or remote storage.

@grahamc grahamc closed this as completed Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants