Project

General

Profile

External Nodes » History » Revision 2

Revision 1 (Ohad Levy, 09/08/2009 04:58 AM) → Revision 2/30 (Ohad Levy, 09/08/2009 04:59 AM)

h1. Torque can act as a classifier to Puppet through the external nodes interface. 

 h2. h1. Import your environment and classes setup 

 First of all, you probably want to let Torque know about your setup, its recommended to automatically import your Environments and classes by: 

 <pre> 
 rake puppet:import:puppet_classes RAILS_ENV=production 
 </pre> 

 If you prefer, you may manually add classes through the setting page, however, the class names must match Puppet classes. 


 h2. h1. Define classes and variables per host 

 You can define per host, classes and variables(parameters), simply create/edit a host, and select its classes. 
 if you see an empty list, make sure that you do have classes (as define in the step above). 

 If you want to add variables(parameters), simply add them in the same page as a set name and value. 

 h2. h1. Host Groups 

 Torque allows you to group classes, into common groups similar to node inheritances in puppet  
 Each group can contain many classes, and variables. 

 If you wish to override the parameters for a specific host, create a parameter with the same name in the host level,  
 Torque will override the values defined in the group level. 


 h2. h1. Other places you can define parameters 

 It is also possible to define default (common)) parameters for all of your hosts (setting -> Global parameters). 
 Additionally, you can also define them on the domain level (settings -> Domain -> Domain Parameters) 

 *The order where the parameters are processed is: 
 Global, Domain, Host Group and Node, the last occurrence of the parameter will be the one used. 
 * 

 h2. h1. Example puppet script 

 under the    <b>extras/externalnodes</b> directory you would find an example script to query Torque DB. 

 You would need to setup puppet to use external nodes  
 <pre>    external_nodes = /etc/puppet/node.rb 
   node_terminus    = exec</pre> 
 For additional info please see "Puppet documentation":http://reductivelabs.com/trac/puppet/wiki/ExternalNodes 

 h2. h1. Verify your setup 

 You may also click on the YAML link to see the output that would be used for puppet external nodes.