On 02/23/2011 10:15 PM, Douglas Garstang wrote:
So... in puppet.conf on the puppet master, there's the external_nodes setting, which defines the location of the external nodes script. If I am using multiple environments, I guess I have to have ONE set of external nodes since external_nodes in puppet.conf is set ONCE, right?

Ie, I can't have:

/etc/puppet/env/env_1/manifests/extdata/nodes
/etc/puppet/env/env_2/manifests/extdata/nodes

.... I have to have instead:

/etc/puppet/manifests/extdata/nodes

.... right? I was kind of hoping I could have one set of external nodes per environment.



Doug,

There are lots of options on the storage of external node information. We are using LDAP for this. With LDAP, there is an attribute that you have to set: "environment". I am sure the same is possible, no matter what your external node storage method is. The benefit of external storage is that this allows for separation of critical details from manifests, like passwords, that you do not want in version control.

But the end result is the same. You have to use the variable, $environment, for those manifests that you apply to all your nodes.
Then for each environment, you do the following:
Partition your manifests according to your environment. Here is how I did that:

I have added the following in my puppetmaster.conf file:

[production]
    manifest = $vardir/env/production/manifests/site.pp
    modulepath = $vardir/env/production/modules:$vardir/env/common/modules

[test]
    manifest = $vardir/env/test/manifests/site.pp
    modulepath = $vardir/env/test/modules:$vardir/env/common/modules

[development]
    manifest = $vardir/env/development/manifests/site.pp
    modulepath = $vardir/env/development/modules:$vardir/env/common/modules


On each client, in puppet.conf:

[main]
        environment = test


The end result is 3 sets of manifests and modules. I then can move a module between the environments as needed.


Thanks,
Dave

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to