问题原文
原帖链接 · Zama Ques · CC BY-SA 3.0
We are using a shared Puppet Server to manage both QA and DEV environments . The default configurations Puppet Server uses is Production environment
# puppet master --configprint all | grep production
environment = production
manifest = /data/puppetlabs/code/environments/production/manifests
modulepath = /data/puppetlabs/code/environments/production/modules:/data/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules
I want to enable two more environments DEV and QA. For this I will copy the above directories and rename to qa and development environment respectively on Puppet Server. What configuration items to enable in puppet.conf to enable the new environments in Puppet Server. If I create multiple entries as in example above will it work . Please suggest .
已采纳解答
原帖链接 · Dmitry Ilyin · CC BY-SA 3.0
The classical way to configure the environment is this:
#Environments
[development]
modulepath =/etc/puppet/development/modules
manifest = /etc/puppet/development/manifest/site.pp
manifestdir = /etc/puppet/development/manifest
[testing]
modulepath =/etc/puppet/testing/modules
manifest = /etc/puppet/testing/manifest/site.pp
manifestdir = /etc/puppet/testing/manifest
[production]
modulepath =/etc/puppet/production/modules
manifest = /etc/puppet/production/manifest/site.pp
manifestdir = /etc/puppet/production/manifest
Then you can place modules and manifests for every enviroment into these folders.
But this method is considered depricated and people are using directory based environemnts. Set environmentpath to /etc/puppet/environments and create environment folders with modules and manifests there.
For example:
/etc/puppet/environments/production/modules/
/etc/puppet/environments/production/manifests/
/etc/puppet/environments/testing/modules/
/etc/puppet/environments/testing/manifests/
The, you can use r10k to automagickally download these environments fron Git branches.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
