2

i am working in a company where the operations team often touches production configurations (i know, not ideal, but the customers have physical processes that often change and that need to be mirrored in the configuration - its a hardware enabled saas business). Now the problem is, that since they are not native developers and thus lack in depth knowledge about the details of the configurations they work on there are often errors that have to be rolled back.

Is there a tool/solution to help people editing configurations to prevent mistakes? We are using github as the configuration storage (where the editing happens).

Edit: the most common errors are entering values that are out of range or using incorrect syntax

  • Maybe install some commit hooks checking the configuration files. It is a bit hard to tell what would be the best remedy as theer is no message about the type of errors. – albert Apr 18 at 16:11
  • "Prevent configuration" isn't enough explanation. Can you be more specific? What's your OS, what do you expect the program to do, lock the configuration file, limit access to it? Or just a syntax check? Please visit How do I ask a good question? - Help Center - Software Recommendations Stack Exchange. – onurcano Apr 18 at 18:20
  • @onurcano22: i realize i have left out details that would've made it easier to answer the question. I will try to give more details the next time around. For now, the other answers have given enough input for stuff that we can try. – Benjamin Gosse Apr 23 at 8:27
0

I personally had this problem too and hence I forked this project

https://github.com/josdejong/jsoneditor/

and added more functionality, but for your use case the original project has enough error checking. There are multiple ways to implement this functionality as well, please take a look at the API.

You might want to integrate it as a configuration parser, which is not that hard to do. I had to work with JSON though, you did not name the configuration format you used.

  • Hey Sir Muffingten, thanks for the input, that looks pretty interesting! Especially because in some areas we also deal with JSON files. – Benjamin Gosse Apr 23 at 8:34
0

You write a program to (help) make the configuration changes for your program.

No, really. Users can/will mess up anything and everything. Users who mostly know what they are doing will do so in spectacular ways.

Two ways to do it - determine all possible config possibilities, store all non-default values you've set in a database, give them a GUI to pick and choose from valid values/options, and write out the file programatically.

Alternatively, look at the way the sudo utility works with using visudo to edit it. The visudo calls your preferred editor, opens a copy of the file, and when the edit is done it checks all syntax, etc. before replacing the original known-good copy. This process is called linting. Depending on what application stack you are using there may be configuration-test utilities for each part that will do the actual checking for you, you'll just need a wrapper script.

remember - easier to teach a developer how to be a sysadmin than it is to teach a sysadmin to be a developer.

  • Hey ivanivan, this sounds interesting as a concept. I will talk that through with the team. Maybe there are some quickwin to be generated there before we fully develop a whole internal tool. regarding the linting, that could help at least for syntax control - thanks for the impulse! – Benjamin Gosse Apr 23 at 8:31
0

I think you need some way of form validation.

You can only save the changes if the validation was successful.

We use django and its form validation.

How much gets done during form validation is up to you. I think no ready available software exists to help you for your particular validation.

You could do simple checks like "a integer value must only contain numbers". Or you can run a test suite with several hundred tests (like continuous integration)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.