Live data from Hacker News

Imperative configs are out; Declarative configs are in

prodvana.io

91–94 of 94 posts

Re: Imperative configs are out; Declarative configs are in

#91
post #67

Earlier quoted context omitted.

> Now, a declarative system is one where the user describes the desired end state and invariants on the admissible intermediate states of the universe. The system needs to figure out the current state of the universe, find the difference and find an admissible path to eliminate the difference. The litmus test to discern the two types of systems is whether the system concerns itself with the difference as a primary co…

> Declarative systems work by generating the desired state 'from scratch', often with some kind of efficient cache. This is an option, but it is certainly not a requirement. If I say "I want cheeseburger", it is irrelevant to me if the cheeseburger is made from scratch or had been partially assembled ahead of time. You are concerning yourself solely with configuration that can be generated not only declaratively, but…

I completely agree! I mistakenly ommitted the word 'can' from the quoted sentence. I just meant to offer another example of declarative configuration management. The style of configuration/automation (of a config management tool) can be declarative whether the implementation has to consider the current state of the system or not.

Re: Imperative configs are out; Declarative configs are in

#92
post #59

Earlier quoted context omitted.

Sort-of a nitpick, but for stateless services that's _precisely_ what you want to happen!

The clients and network have state. If you kill every service, and set everything up from scratch, your users are probably seeing an error message. Their connections all died and the retries failed while you were spinning up the new version of things.

Right, which is why you set up the new versions of the service _first_ and cutover to them before tearing down.

Re: Imperative configs are out; Declarative configs are in

#93
post #62
post #59

Earlier quoted context omitted.

Sort-of a nitpick, but for stateless services that's _precisely_ what you want to happen!

Not when your infrastructure includes your data store, though. Or if it includes such things as your application endpoint. You may want to stand up the new endpoints and then drain over traffic, as an example. Not take an outage for a deployment.

Right, yes - sorry, I should have clarified that I didn't mean "tear down then set up", but rather "set up (new), cut over, then tear down (old)". But still - the service should be "created from scratch"!

Re: Imperative configs are out; Declarative configs are in

#94
Declarative: Specify the result you want. Imperative: Specify (step by step) how to get the result you want.

Examples:

Declarative: I want a PC with the following code installed: X, Y and Z. Imperative: First upgrade X, then install Y, then uninstall W, then install Y and Z.

Post reply on HN