4 ms·
> Because its architecture doesn't fit the job. The same situation is with Ansible or Salt being used for maintaining configuration of servers. > I don't say s
by schizoidboy 10y ago
> Because its architecture doesn't fit the job. The same situation is with Ansible or Salt being used for maintaining configuration of servers.
> I don't say shell scripts are worse. I say the "push" architecture is worse for configuring machines than with an agent in "pull" mode. You could easily write an agent that works on a cron-like schedule, downloads commands to be run, (verify their origin with a digital signature,) runs them, and reports the results back, all in shell.
I'm still not completely understanding, so let me see if I can rephrase your objection and please correct me if I'm getting it wrong:
A "pull" architecture for configuration management is better than a "push" architecture because updating configuration shouldn't require synchronous human interaction.
If so, then one example of a counterargument is needing to reload/restart a service after updating its configuration file. What if there's an error reloading/restarting the service? Does the agent then email the administrator? And what if the emails fail?
- dozzie 10y ago> A "pull" architecture for configuration management is better than a "push" architecture because updating configuration shouldn't require synchronous human interaction. One may put it this way as one of the reasons, yes. > If so, then one example of a counterargument is needing to reload/restart a service after updating its configuration file. What if there's an error reloading/restarting the service? Does the agent then email the administrator? And what if the emails fail? You're on a good track here. There are several things not quite there yet, though. First, e-mail reports don't scale. For a dozen of servers the volume is still readable if every report fits on a single screen, but a move in any direction (report's length or number of servers) makes the situation unsustainable. Second, all of the operations should be reported, not just the failures, as you want to be able to see what was done, when, and in what order. Usually it's not interesting, as most logs are, but there are cases when you need this information and you learn about the need after the fact. Also, there are abnormalities that are reported as successes (e.g. a config that gets changed on every scheduled execution that gets replaced by something else, thus creating the need for updating the config again). Third, the operation logs should be structured. Plain text doesn't cut it, as you can't process them with a machine in a reliable and convenient way. And fourth, you were right when you asked what if the report transport breaks down. This is covered by having reports from each execution; a simple automaton (that either queries execution reports from their store or tracks them as they come) can easily tell that a server went missing. Such an automaton would be a part of reports receiver or reports store. By the way, reading execution reports from a push tool doesn't scale for the same reason as e-mail: too much manual reading. And if the tool stops on the first error to be encountered, tool's use will be annoying in the long run (how to recover and resume operations?)
- schizoidboy 10y agoThanks, I understand your perspective much better. Regarding the last point, I've always just re-run my last command. If the commands are broken up into separate independent scripts (e.g. install ElasticSearch, install Kibana, etc.), then I might only re-run the script (-c) that was failing to ensure that works, before re-running the whole spec (-z).