4 ms·
Trying to turn YAML into a programming language reminds me of Ansible playbooks.
by tuankiet65 6y ago
Trying to turn YAML into a programming language reminds me of Ansible playbooks.
- dhosek 6y agoWe went through great lengths to be able to do parameterized YAML using jinja2 templates. I designed a system that let us effectively create a new yaml out of two other yamls which let us handle repetitive configuration tasks reasonably well but there were occasional unexpected challenges thanks to the syntactically significant white space of yaml.
- hbogert 6y agosincerely, why do this in the first place?
- dhosek 6y agoWe were targetting configurations of Concourse for deploying software. We would have to do essentially the same deployment to multiple environments (dev, qa, staging, performance, prod) and Concourse doesn't provide a sufficiently rich configuration in its use of yaml. For a single app cut and paste is acceptable but once you get into multiple microservices, it becomes more efficient to do it this way.
- q3k 6y agoHave you looked into Jsonnet/CUE/Dhall? They attempt to solve this problem, but give you an actual programming language instead. I've been using Jsonnet to successfully escape the 'yaml-templating-yaml' hell for years now. But yeah, concourse configuration files are probably the worst YAML verbosity offenders, even worse than k8s manifests.
- IshKebab 6y agoThat sounds ridiculous.
- kabacha 6y agoIsn't that what Helm[1] is? 1 - https://helm.sh/ https://helm.sh/
- icameherefor 6y agoUs too (well, along the lines). Did you end up finding some better solution or ended up having a bad programming language with a buggy interpreter in the end (bc of serious time constraints) as well?
- deleted 6y ago[deleted]
- oblio 6y agohttp://ant-contrib.sourceforge.net/tasks/tasks/if.html http://ant-contrib.sourceforge.net/tasks/tasks/if.html