我正在尝试使用http://puppetlabs.com/blog/git-workflow-and-puppet-environments/作为指导来设置dynamic环境。 不幸的是,我并不完全清楚自己在做什么。
我在/ etc / puppetlabs / puppet / environments /下创build了一个目录,
我已经将configuration示例从上面的文档复制到我的木偶大师的puppet.conf文件。 我在文档的每个部分中添加了三行到puppet.conf文件的相应部分,并进行了适合我的系统(path等)的更改。在这些更改之前,我正在使用default-post- puppet.conf的安装副本
现在当我尝试从客户端机器运行puppet agent -t -noop时,或者从服务器运行时出现以下错误。
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class pe_compliance for puppet-test-01.mydomain.net on node puppet-test-01.mydomain.net warning: Not using cache on failed catalog err: Could not retrieve catalog; skipping run
如果我摆脱了所有的东西,手动放在master上的puppet.conf文件中,那么我可以添加environment = testenv到客户端上的puppet.conf文件,我想我得到一个新的环境..但是在networking用户界面中我看不到任何这样的东西…所以我不确定这是否正常工作。
我在做什么? 接下来我需要做什么
在傀儡企业中,有许多模块必须存在才能正常工作。
您需要将其复制到每个环境的$ modulepath中,或者将默认path添加到每个环境path中。
Puppet Enterprise的默认模块path是(根据文档 ) /etc/puppetlabs/puppet/modules:/opt/puppet/share/puppet/modules 。
您需要将其添加到您的环境中,例如:
modulepath = /etc/puppet/environments/production/modules:/etc/puppetlabs/puppet/modules:/opt/puppet/share/puppet/modules
我build议在你的[master]部分中使用一个单独的模块path,如下所示:
modulepath = $confdir/environments/$environment/modules:/etc/puppetlabs/puppet/modules:/opt/puppet/share/puppet/modules
这不仅意味着您inputconfiguration文件的次数减less了,而且还可以根据需要添加新的环境。 通过保留默认模块path,您不必将所有PE特定模块复制到每个环境中。