Environments

Puppet Environments offer a way to have completely separated environments on a Puppet Server, each of which has its own classes, modules, manifests, nodes, anything. When a client contacts the server, it must be determined in which environment it belongs.

  1. Create multiple environments

    Add to the end of /etc/puppet/puppet.conf:

    [production]
        modulepath  = /srv/puppet/envs/production/modules
        templatedir = /srv/puppet/envs/production/templates
        manifestdir = /srv/puppet/envs/production/manifests
        manifest    = /srv/puppet/envs/production/manifests/site.pp
    
    [testing]
        modulepath  = /srv/puppet/envs/testing/modules
        templatedir = /srv/puppet/envs/testing/templates
        manifestdir = /srv/puppet/envs/testing/manifests
        manifest    = /srv/puppet/envs/testing/manifests/site.pp
    	  

    And restart Apache (since we're using mod_passenger):

  2. Point the clients to 'testing'