The language-puppet website.

Work with your manifests!

Version 0.9.0 Released

This version is out of the beta stage, and I have updated the repository. For some reason I am currently getting a bad request from Hackage when trying to upload it, and will try to solve this ASAP. New binaries are available for downloading.

New stuff

  • Colors everywhere ! The new pretty printers are much nicer to work with. puppetresources will default to monochrome when it detects it is not printing on a terminal.
  • A lot of behavior is just more correct.
  • The hsfacter and puppetresources packages have been deprecated and incorporated in language-puppet.
  • The hruby package (it is used to embed a ruby interpreter in your Haskell program) should now support Ruby 1.8, 1.9 and 2.0.
  • The filecache package (caches computation results based on a file name, expires them with inotify) is a more robust solution for caching parsed manifests.
  • The puppetresources command has now evolved a lot, and is now much more useful. In particular, it will let you compile catalogs and display only a subset of the resources. I will post another post soon describing this mode of operation, but here is a teaser. When I type puppetresources -p . -o nodename -t '^package$' -n 'git', I get :

Searching for git packages

As you can see, you can now filter the catalog output using regexps on resource types and names. The output is colored, and you get useful information, such as where the resource was declared, in which container (class or define), and what was the context at that time.

Still not done

  • Support of hiera. I do not use it at my site, but this is probably very much required.
  • A real Puppet master replacement. All the bricks are available, and it has even been tested a little bit ! I only need to check how to register stuff in the PuppetDB (facts, exported resources, catalogs …). I expect it to be around ten times faster for compiling catalogs, and eat a lot less memory than the Ruby version.
  • Polish the testing DSL : it is usable, but it isn’t really nice.
  • Creating an external testing DSL. I plans to use this tool for continuous testing and integration. Having tests written in plain text files that would not require compilation would make this possible.
  • Repopulate the Haddocks, as they have been decimated during the big rewrite.
  • Filtering resources displayed by puppetresources using a standard Puppet selector. This should be a piece of cake, and would really help when designing complex selectors.
  • The hruby package is currently used in a weird way when you need to create Ruby objects from Haskell. If you instantiate a bunch of them, Ruby’s GC might just release them as you go, as their are not referenced. For this reason, you currently need to freeze Ruby’s GC, run everything that needs your shiny objects, and then restore the GC. It would be more efficient to mark these objects as managed by a foreign program, and use something like ResourceT to free them when the computation is over.

Feedback needed !

I am certain this project is almost exclusively used at my site, and this frustrates me a bit. I suppose that the fact that it is not in Ruby is playing against it, as most of the Puppet ecosystem happens to be written in that language, and everybody seems to believe that Ruby is for devops. It can however do things that just can’t be done with the tools I know of, and very quickly with that.

So if you have an idea about what is wrong with language-puppet, or advice to put it under the spotlight, please let me know.