Friday, April 4, 2014

Object Oriented Puppet

One of the most shocking aspects of working with Puppet is that it goes to a great length at providing a High Level Interface to Resources, but it provides literally no facility to abstract access to configuration values.

All is a hiera() and Hash/Array manipulation, from which to painfully extract subset of data with totally garbled and complex manipulations of the Hashes, Keys and Values, interspersed with some create_resources() to be able to cycle over a collection of homogeneous resources.

People who come from ANY Object Oriented, functional and fluent-interface programming languages, like Groovy or Java 8,  can only scream in horror in front of the total inelegance, un-refactorability, un-maintainability and lack of encapsulation of the Puppet DSL.

To this, add that YAML is not generally associated to a schema - hence you can't validate that you haven't broken your model somewhere in your hundred of YAML files - on per each host - and you have the mother of all Spaghetti Western Code.

For all these reasons, please Puppet Gods, heed my call, dump that pathetic DSL and adopt some OO language.

No comments: