Skip to content
drwahl edited this page Dec 12, 2012 · 13 revisions

Welcome To The Mongodb-ENC Project

The goal of this project is to provide a set of scripts which can be used to leverage mongodb as an external node classifier for puppet. Since mongodb is a schema-less database and offers HA out of the box it makes a great candidate for an ENC.

Documentation

Why Write Another ENC

The reason I decided to write another ENC for puppet is that I didn't feel there where many good ways to automate puppet in the cloud. Currently I am running a few hundred nodes in Amazon's EC2 environment and have been using LDAP as an ENC. LDAP provided a good way to get up and running quickly but LDAP has too many limitations when it comes to being used as an overall strategy for the cloud.

For instance not only do I want to use my mongodb replica set as a way to store puppet related info (ENC) but I also want to add EC2 related metadata to the same database where I was storing puppet info. For instance I want to be able to query a node and get info about what AMI is being used, when the node was deployed, when the node was destroyed, what IP address was assigned to that node, etc.. I also want to store puppet facts in the same database under the same node, and using LDAP to store that information becomes difficult to say the least.

For this project I will be focusing on puppet related information but writing your own scripts to update the same mongodb record with "other" information will be a simply task for anyone to accomplish as long as they don't update the embedded document where the ENC data is stored.

Features

Here is a list of the current features as of 8/5/2012 as well as a list of features I plan to add in the future:

  • Basic ENC Functionality

  • Node Classes

  • Node Environment

  • Node Parameters

  • Multi-Node Inheritance For Classes

  • Example: Create generic "default" node, create generic "hadoop" node which inherits "default", create specific host node "hadoop-01" which inherits hadoop and have puppet apply classes from both the generic "hadoop" node and generic "default" node.

  • Modify Node Classes

  • Add new classes to a node or update an inherited node

  • Put Puppet Facts In Mongodb (Future)

  • Puppet Puppet Reports In Mongodb (Future)