Live data from Hacker News

Ignition: A new CoreOS machine provisioning utility

coreos.com

51–57 of 57 posts

Re: Ignition: A new CoreOS machine provisioning utility

#51
post #37

Earlier quoted context omitted.

I wouldn't apologize for that, you're addressing the elephant in the room here. JSON has turned into the new XML. There seems to be a pervasive undercurrent that if it looks website-ish, it's got to be good. So it seems to be used quite a bit in lieu of looking carefully at the problem and figuring out the best structured format. Configuration files tend to have a lot of ambiguity in them, going to a format that make…

Honestly, I don't think JSON config files are a big problem. What's shitty is when humans are expected to manually create and edit plain JSON, but what's stopping us from using whatever tools we want to generate those JSON configs? There are some very nice tools out there for this; I have taken to using jsonnet ( http://jsonnet.org/ ), which is excellent as a configuration language. It's pretty comparable to Hashicor…

Unfortunately, it suffers from the huge problem of not having any comments, which was what the original poster was pointing out. Configuration is code that happens to be interpreted at runtime. Having to dig through uncommented code at two in the morning sucks, especially when you're trying to figure out why your automated code and/or config generator just failed. Yes, having to write a config file by hand sucks, however, there are still enough cases out there where you end up having to do just that, and JSON makes the problem of keeping them lucid all the more difficult.

Re: Ignition: A new CoreOS machine provisioning utility

#52
post #36
post #13

Earlier quoted context omitted.

Any suggestions for a format that is sane?

I am going to be downvoted, but for me XML is sane and I don't bother to use anything else when given the option.

No, you're got upvoted by me. XML is great and has all kinds of well-tested tools - query language, schema validation, namespaces, etc.! Not sure why people think it's worse than JSON, TOML or the likes. Less readable? Not really. Plus, more people know HTML than JSON and so it should be less easy to learn than even JSON for people who already know HTML. Maybe the only improvement would be to make it more relaxed like HTML5.

Re: Ignition: A new CoreOS machine provisioning utility

#53
post #13

Earlier quoted context omitted.

Any suggestions for a format that is sane?

TOML. https://github.com/toml-lang/toml

I (original commenter) second TOML. It is very simple, is instantly familiar to anyone who has used ini files or many Unix-style config files, and has many good implementations available.

The [[array]] notation mentioned below is a tad weird, but I've never had an occasion to use it.

Re: Ignition: A new CoreOS machine provisioning utility

#54
post #30

Earlier quoted context omitted.

At long as an app isn't strictly validating the JSON, you should be able to add keys like { "comment": "this does xxx" } to a JSON configuration object.

There's that, or: "Comments in JSON I removed comments from JSON because I saw people were using them to hold parsing directives, a practice which would have destroyed interoperability. I know that the lack of comments makes some people sad, but it shouldn't. Suppose you are using JSON to keep configuration files, which you would like to annotate. Go ahead and insert all the comments you like. Then pipe it through JS…

Rather than remove comments, address the primary use case:

https://github.com/edn-format/edn#tagged-elements

Re: Ignition: A new CoreOS machine provisioning utility

#55
post #37

Earlier quoted context omitted.

Honestly, I don't think JSON config files are a big problem. What's shitty is when humans are expected to manually create and edit plain JSON, but what's stopping us from using whatever tools we want to generate those JSON configs? There are some very nice tools out there for this; I have taken to using jsonnet ( http://jsonnet.org/ ), which is excellent as a configuration language. It's pretty comparable to Hashicor…

Unfortunately, it suffers from the huge problem of not having any comments, which was what the original poster was pointing out. Configuration is code that happens to be interpreted at runtime. Having to dig through uncommented code at two in the morning sucks, especially when you're trying to figure out why your automated code and/or config generator just failed. Yes, having to write a config file by hand sucks, how…

My suggestion, in general, is to use a static language like jsonnet to write config files. It's rather hard for them to break, because the language just isn't capable of talking to the network or various other things that config files shouldn't do. I do agree with you, and I would really prefer to have apps use formats that allow some sort of commenting, but I can live with json - by letting the computer deal with it.

Re: Ignition: A new CoreOS machine provisioning utility

#56
post #37

Earlier quoted context omitted.

Honestly, I don't think JSON config files are a big problem. What's shitty is when humans are expected to manually create and edit plain JSON, but what's stopping us from using whatever tools we want to generate those JSON configs? There are some very nice tools out there for this; I have taken to using jsonnet ( http://jsonnet.org/ ), which is excellent as a configuration language. It's pretty comparable to Hashicor…

Ooh, they still do, especially things by Elastic.

oh god, LOGSTASH >_<
Post reply on HN