Puppet & Noah


The estimable John Vincent has been developing a lighter weight version of the Apache Zookeeper configuration store. He’s called it Noah (I don’t know if it has two of everything but it’s pretty well stocked). One of the things I’ve been wanting to do since he got started was write some Puppet integration for it. The integration is in the form of a module called Puppet-Noah. It contains a few items that should prove useful in using Puppet with Noah but is very much an initial take on integration and I’d welcome further feedback and ideas. The first is an ENC or External Node Classifier, in bin/noah_enc, that queries a Noah server for a host and uses the list of its services to specify which classes to configure the host. The second is a function called noah_get that retrieves information from a Noah server from a variety of its RESTful APIs including:

The third is a function called noah_put that sends information to a Noah server - again using all of the available APIs. You can create hosts, services, applications and simple configuration items although there are some limitations with the interaction with the Configuration API I’d welcome ideas on how to solve. The fourth is a fact called noah_config which returns all data specified in the key -> value form via the Configuration API as facts, for example:

config.json => {

database.yml => development:
database: development_database
adapter: mysql
username: dev_user
password: dev_password
noah_host => localhost
noah_port => 9292
redis_url => redis://