Simon Coggins
2008-Dec-11 02:17 UTC
[Puppet Users] Having issues getting environments working.
Hi all, I''ve been trying to change over to using environments now that I have upgraded to 0.24.6. I have a puppet.conf file that looks like this: ------- [main] environment = production listen = true runinterval = 1800 server = puppet.cqu.edu.au report = true factsync = true [puppetd] environments = production, development [production] server = puppet.cqu.edu.au masterport = 8140 [development] server = jester.cqu.edu.au masterport = 18140 ------ This is what I get when I try to run it: [root@t1000dev]:~# /usr/local/bin/puppetd --test --environment=production --configprint environment production [root@t1000dev]:~# /usr/local/bin/puppetd --test --environment=production --configprint server puppet.cqu.edu.au [root@t1000dev]:~# /usr/local/bin/puppetd --test --environment=production --configprint masterport 8140 [root@t1000dev]:~# /usr/local/bin/puppetd --test --environment=development --configprint environment development [root@t1000dev]:~# /usr/local/bin/puppetd --test --environment=development --configprint server jester.cqu.edu.au [root@t1000dev]:~# /usr/local/bin/puppetd --test --environment=development --configprint masterport 18140 [root@t1000dev]:~# /usr/local/bin/puppetd --test --environment=development info: Loading fact serialnumber info: Loading fact zones info: Loading fact hardware_platform info: Loading fact sshkeys info: Loading fact sun_webserver notice: Ignoring --listen on onetime run info: Retrieving facts err: /File[/var/puppet/facts]: Failed to generate additional resources during transaction: Could not connect to puppet.cqu.edu.au on port 8140 err: /File[/var/puppet/facts]: Failed to retrieve current state of resource: Could not connect to puppet.cqu.edu.au on port 8140 Could not describe /facts: Could not connect to puppet.cqu.edu.au on port 8140 info: Loading fact serialnumber info: Loading fact zones info: Loading fact hardware_platform info: Loading fact sshkeys info: Loading fact sun_webserver err: Could not retrieve catalog: Could not connect to puppet.cqu.edu.au on port 8140 warning: Not using cache on failed catalog Any ideas? From what I can gather this should work. I can''t see anyone else that says it isn''t working and I''ve found as many examples via google as I can and they all have pretty much the same setup I do in my puppet.conf file. The closest thing I came to was http://reductivelabs.com/trac/puppet/ticket/1183 which seems to be the opposite of my problem, configprint works, but running it normally doesn''t. Regards Simon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Paul Lathrop
2008-Dec-11 02:29 UTC
[Puppet Users] Re: Having issues getting environments working.
In the documentation (http://reductivelabs.com/trac/puppet/wiki/UsingMultipleEnvironments) you will see the following: "Only certain parameters make sense to be configured per-environment, and all of those parameters revolve around specifying what files to use to compile a client''s configuration. Those parameters are: * modulepath: Where to look for modules. It''s best to have a standard module directory that all environments share and then a per-environment directory where custom modules can be stored. * templatedir: Where to look for templates. The modulepath should be preferred to this setting, but it allows you to have different versions of a given template in each environment. * manifest: Which file to use as the main entry point for the configuration. The Puppet parser looks for other files to compile in the same directory as this manifest, so this parameter also determines where other per-environment Puppet manifests should be stored. With a separate module path, it should be easy to use the same simple manifest in all environments." I believe that succinctly answers your question. --Paul On Wed, Dec 10, 2008 at 6:17 PM, Simon Coggins <scoggins@gmail.com> wrote:> > Hi all, > > I''ve been trying to change over to using environments now that I have > upgraded to 0.24.6. I have a puppet.conf file that looks like this: > > ------- > [main] > environment = production > listen = true > runinterval = 1800 > server = puppet.cqu.edu.au > report = true > factsync = true > > [puppetd] > environments = production, development > > [production] > server = puppet.cqu.edu.au > masterport = 8140 > > [development] > server = jester.cqu.edu.au > masterport = 18140 > ------ > > This is what I get when I try to run it: > > [root@t1000dev]:~# /usr/local/bin/puppetd --test > --environment=production --configprint environment > production > [root@t1000dev]:~# /usr/local/bin/puppetd --test > --environment=production --configprint server > puppet.cqu.edu.au > [root@t1000dev]:~# /usr/local/bin/puppetd --test > --environment=production --configprint masterport > 8140 > [root@t1000dev]:~# /usr/local/bin/puppetd --test > --environment=development --configprint environment > development > [root@t1000dev]:~# /usr/local/bin/puppetd --test > --environment=development --configprint server > jester.cqu.edu.au > [root@t1000dev]:~# /usr/local/bin/puppetd --test > --environment=development --configprint masterport > 18140 > [root@t1000dev]:~# /usr/local/bin/puppetd --test --environment=development > info: Loading fact serialnumber > info: Loading fact zones > info: Loading fact hardware_platform > info: Loading fact sshkeys > info: Loading fact sun_webserver > notice: Ignoring --listen on onetime run > info: Retrieving facts > err: /File[/var/puppet/facts]: Failed to generate additional resources > during transaction: Could not connect to puppet.cqu.edu.au on port > 8140 > err: /File[/var/puppet/facts]: Failed to retrieve current state of > resource: Could not connect to puppet.cqu.edu.au on port 8140 Could > not describe /facts: Could not connect to puppet.cqu.edu.au on port > 8140 > info: Loading fact serialnumber > info: Loading fact zones > info: Loading fact hardware_platform > info: Loading fact sshkeys > info: Loading fact sun_webserver > err: Could not retrieve catalog: Could not connect to > puppet.cqu.edu.au on port 8140 > warning: Not using cache on failed catalog > > > > > Any ideas? From what I can gather this should work. I can''t see anyone > else that says it isn''t working and I''ve found as many examples via > google as I can and they all have pretty much the same setup I do in > my puppet.conf file. The closest thing I came to was > http://reductivelabs.com/trac/puppet/ticket/1183 which seems to be the > opposite of my problem, configprint works, but running it normally > doesn''t. > > Regards > Simon > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Simon Coggins
2008-Dec-11 02:53 UTC
[Puppet Users] Re: Having issues getting environments working.
I read that as applying to the server which is fine for where it finds it''s modules and templates. I can see how only being able to change the module and template paths on the client us useful. Guess I will just do it manually via command line for the options I want in each enveonment. Shame the environment stuff showed promise. Thanks for your help! --- Simon Coggins Senior Systems Engineer System Services CQUniversity, Bruce HWY Rockhampton, QLD, 4701, Australia Phone: 07 49232778 Mobile: 0408115861 Fax: 07 49309254 On 11/12/2008, at 12:29, "Paul Lathrop" <paul@tertiusfamily.net> wrote:> > In the documentation > (http://reductivelabs.com/trac/puppet/wiki/UsingMultipleEnvironments) > you will see the following: > > "Only certain parameters make sense to be configured per-environment, > and all of those parameters revolve around specifying what files to > use to compile a client''s configuration. Those parameters are: > > * modulepath: Where to look for modules. It''s best to have a > standard module directory that all environments share and then a > per-environment directory where custom modules can be stored. > * templatedir: Where to look for templates. The modulepath should > be preferred to this setting, but it allows you to have different > versions of a given template in each environment. > * manifest: Which file to use as the main entry point for the > configuration. The Puppet parser looks for other files to compile in > the same directory as this manifest, so this parameter also determines > where other per-environment Puppet manifests should be stored. With a > separate module path, it should be easy to use the same simple > manifest in all environments." > > I believe that succinctly answers your question. > > --Paul > > On Wed, Dec 10, 2008 at 6:17 PM, Simon Coggins <scoggins@gmail.com> > wrote: >> >> Hi all, >> >> I''ve been trying to change over to using environments now that I have >> upgraded to 0.24.6. I have a puppet.conf file that looks like this: >> >> ------- >> [main] >> environment = production >> listen = true >> runinterval = 1800 >> server = puppet.cqu.edu.au >> report = true >> factsync = true >> >> [puppetd] >> environments = production, development >> >> [production] >> server = puppet.cqu.edu.au >> masterport = 8140 >> >> [development] >> server = jester.cqu.edu.au >> masterport = 18140 >> ------ >> >> This is what I get when I try to run it: >> >> [root@t1000dev]:~# /usr/local/bin/puppetd --test >> --environment=production --configprint environment >> production >> [root@t1000dev]:~# /usr/local/bin/puppetd --test >> --environment=production --configprint server >> puppet.cqu.edu.au >> [root@t1000dev]:~# /usr/local/bin/puppetd --test >> --environment=production --configprint masterport >> 8140 >> [root@t1000dev]:~# /usr/local/bin/puppetd --test >> --environment=development --configprint environment >> development >> [root@t1000dev]:~# /usr/local/bin/puppetd --test >> --environment=development --configprint server >> jester.cqu.edu.au >> [root@t1000dev]:~# /usr/local/bin/puppetd --test >> --environment=development --configprint masterport >> 18140 >> [root@t1000dev]:~# /usr/local/bin/puppetd --test -- >> environment=development >> info: Loading fact serialnumber >> info: Loading fact zones >> info: Loading fact hardware_platform >> info: Loading fact sshkeys >> info: Loading fact sun_webserver >> notice: Ignoring --listen on onetime run >> info: Retrieving facts >> err: /File[/var/puppet/facts]: Failed to generate additional >> resources >> during transaction: Could not connect to puppet.cqu.edu.au on port >> 8140 >> err: /File[/var/puppet/facts]: Failed to retrieve current state of >> resource: Could not connect to puppet.cqu.edu.au on port 8140 Could >> not describe /facts: Could not connect to puppet.cqu.edu.au on port >> 8140 >> info: Loading fact serialnumber >> info: Loading fact zones >> info: Loading fact hardware_platform >> info: Loading fact sshkeys >> info: Loading fact sun_webserver >> err: Could not retrieve catalog: Could not connect to >> puppet.cqu.edu.au on port 8140 >> warning: Not using cache on failed catalog >> >> >> >> >> Any ideas? From what I can gather this should work. I can''t see >> anyone >> else that says it isn''t working and I''ve found as many examples via >> google as I can and they all have pretty much the same setup I do in >> my puppet.conf file. The closest thing I came to was >> http://reductivelabs.com/trac/puppet/ticket/1183 which seems to be >> the >> opposite of my problem, configprint works, but running it normally >> doesn''t. >> >> Regards >> Simon >> >>> >> > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Paul Lathrop
2008-Dec-11 03:41 UTC
[Puppet Users] Re: Having issues getting environments working.
Simon, I''m not sure why you need to contact the server on a different port for each environment. The master serves up a different configuration (on the same port) just fine. What are you trying to accomplish? --Paul On Wed, Dec 10, 2008 at 6:53 PM, Simon Coggins <scoggins@gmail.com> wrote:> > I read that as applying to the server which is fine for where it finds > it''s modules and templates. I can see how only being able to change > the module and template paths on the client us useful. > > Guess I will just do it manually via command line for the options I > want in each enveonment. Shame the environment stuff showed promise. > > Thanks for your help! > > --- > Simon Coggins > Senior Systems Engineer > System Services > CQUniversity, Bruce HWY > Rockhampton, QLD, 4701, Australia > Phone: 07 49232778 > Mobile: 0408115861 > Fax: 07 49309254 > > On 11/12/2008, at 12:29, "Paul Lathrop" <paul@tertiusfamily.net> wrote: > >> >> In the documentation >> (http://reductivelabs.com/trac/puppet/wiki/UsingMultipleEnvironments) >> you will see the following: >> >> "Only certain parameters make sense to be configured per-environment, >> and all of those parameters revolve around specifying what files to >> use to compile a client''s configuration. Those parameters are: >> >> * modulepath: Where to look for modules. It''s best to have a >> standard module directory that all environments share and then a >> per-environment directory where custom modules can be stored. >> * templatedir: Where to look for templates. The modulepath should >> be preferred to this setting, but it allows you to have different >> versions of a given template in each environment. >> * manifest: Which file to use as the main entry point for the >> configuration. The Puppet parser looks for other files to compile in >> the same directory as this manifest, so this parameter also determines >> where other per-environment Puppet manifests should be stored. With a >> separate module path, it should be easy to use the same simple >> manifest in all environments." >> >> I believe that succinctly answers your question. >> >> --Paul >> >> On Wed, Dec 10, 2008 at 6:17 PM, Simon Coggins <scoggins@gmail.com> >> wrote: >>> >>> Hi all, >>> >>> I''ve been trying to change over to using environments now that I have >>> upgraded to 0.24.6. I have a puppet.conf file that looks like this: >>> >>> ------- >>> [main] >>> environment = production >>> listen = true >>> runinterval = 1800 >>> server = puppet.cqu.edu.au >>> report = true >>> factsync = true >>> >>> [puppetd] >>> environments = production, development >>> >>> [production] >>> server = puppet.cqu.edu.au >>> masterport = 8140 >>> >>> [development] >>> server = jester.cqu.edu.au >>> masterport = 18140 >>> ------ >>> >>> This is what I get when I try to run it: >>> >>> [root@t1000dev]:~# /usr/local/bin/puppetd --test >>> --environment=production --configprint environment >>> production >>> [root@t1000dev]:~# /usr/local/bin/puppetd --test >>> --environment=production --configprint server >>> puppet.cqu.edu.au >>> [root@t1000dev]:~# /usr/local/bin/puppetd --test >>> --environment=production --configprint masterport >>> 8140 >>> [root@t1000dev]:~# /usr/local/bin/puppetd --test >>> --environment=development --configprint environment >>> development >>> [root@t1000dev]:~# /usr/local/bin/puppetd --test >>> --environment=development --configprint server >>> jester.cqu.edu.au >>> [root@t1000dev]:~# /usr/local/bin/puppetd --test >>> --environment=development --configprint masterport >>> 18140 >>> [root@t1000dev]:~# /usr/local/bin/puppetd --test -- >>> environment=development >>> info: Loading fact serialnumber >>> info: Loading fact zones >>> info: Loading fact hardware_platform >>> info: Loading fact sshkeys >>> info: Loading fact sun_webserver >>> notice: Ignoring --listen on onetime run >>> info: Retrieving facts >>> err: /File[/var/puppet/facts]: Failed to generate additional >>> resources >>> during transaction: Could not connect to puppet.cqu.edu.au on port >>> 8140 >>> err: /File[/var/puppet/facts]: Failed to retrieve current state of >>> resource: Could not connect to puppet.cqu.edu.au on port 8140 Could >>> not describe /facts: Could not connect to puppet.cqu.edu.au on port >>> 8140 >>> info: Loading fact serialnumber >>> info: Loading fact zones >>> info: Loading fact hardware_platform >>> info: Loading fact sshkeys >>> info: Loading fact sun_webserver >>> err: Could not retrieve catalog: Could not connect to >>> puppet.cqu.edu.au on port 8140 >>> warning: Not using cache on failed catalog >>> >>> >>> >>> >>> Any ideas? From what I can gather this should work. I can''t see >>> anyone >>> else that says it isn''t working and I''ve found as many examples via >>> google as I can and they all have pretty much the same setup I do in >>> my puppet.conf file. The closest thing I came to was >>> http://reductivelabs.com/trac/puppet/ticket/1183 which seems to be >>> the >>> opposite of my problem, configprint works, but running it normally >>> doesn''t. >>> >>> Regards >>> Simon >>> >>>> >>> >> >> > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Andrew Shafer
2008-Dec-11 06:10 UTC
[Puppet Users] Re: Having issues getting environments working.
Simon, Environment, as they are currently implemented, allow you to have different definitions for the same classes per environment on the same puppetmaster. What it looks like you are trying to do is have different puppetmasters for each environment. You don''t need environments to do that, just set up a different puppetmaster for dev and prod. If we know the answer to Paul''s question, ''what are you really trying to accomplish?'', and then I''d also throw in the question, ''Why?'' we might be able to give you more specific suggestions. Andrew On Wed, Dec 10, 2008 at 8:41 PM, Paul Lathrop <paul@tertiusfamily.net>wrote:> > Simon, > > I''m not sure why you need to contact the server on a different port > for each environment. The master serves up a different configuration > (on the same port) just fine. What are you trying to accomplish? > > --Paul > > On Wed, Dec 10, 2008 at 6:53 PM, Simon Coggins <scoggins@gmail.com> wrote: > > > > I read that as applying to the server which is fine for where it finds > > it''s modules and templates. I can see how only being able to change > > the module and template paths on the client us useful. > > > > Guess I will just do it manually via command line for the options I > > want in each enveonment. Shame the environment stuff showed promise. > > > > Thanks for your help! > > > > --- > > Simon Coggins > > Senior Systems Engineer > > System Services > > CQUniversity, Bruce HWY > > Rockhampton, QLD, 4701, Australia > > Phone: 07 49232778 > > Mobile: 0408115861 > > Fax: 07 49309254 > > > > On 11/12/2008, at 12:29, "Paul Lathrop" <paul@tertiusfamily.net> wrote: > > > >> > >> In the documentation > >> (http://reductivelabs.com/trac/puppet/wiki/UsingMultipleEnvironments) > >> you will see the following: > >> > >> "Only certain parameters make sense to be configured per-environment, > >> and all of those parameters revolve around specifying what files to > >> use to compile a client''s configuration. Those parameters are: > >> > >> * modulepath: Where to look for modules. It''s best to have a > >> standard module directory that all environments share and then a > >> per-environment directory where custom modules can be stored. > >> * templatedir: Where to look for templates. The modulepath should > >> be preferred to this setting, but it allows you to have different > >> versions of a given template in each environment. > >> * manifest: Which file to use as the main entry point for the > >> configuration. The Puppet parser looks for other files to compile in > >> the same directory as this manifest, so this parameter also determines > >> where other per-environment Puppet manifests should be stored. With a > >> separate module path, it should be easy to use the same simple > >> manifest in all environments." > >> > >> I believe that succinctly answers your question. > >> > >> --Paul > >> > >> On Wed, Dec 10, 2008 at 6:17 PM, Simon Coggins <scoggins@gmail.com> > >> wrote: > >>> > >>> Hi all, > >>> > >>> I''ve been trying to change over to using environments now that I have > >>> upgraded to 0.24.6. I have a puppet.conf file that looks like this: > >>> > >>> ------- > >>> [main] > >>> environment = production > >>> listen = true > >>> runinterval = 1800 > >>> server = puppet.cqu.edu.au > >>> report = true > >>> factsync = true > >>> > >>> [puppetd] > >>> environments = production, development > >>> > >>> [production] > >>> server = puppet.cqu.edu.au > >>> masterport = 8140 > >>> > >>> [development] > >>> server = jester.cqu.edu.au > >>> masterport = 18140 > >>> ------ > >>> > >>> This is what I get when I try to run it: > >>> > >>> [root@t1000dev]:~# /usr/local/bin/puppetd --test > >>> --environment=production --configprint environment > >>> production > >>> [root@t1000dev]:~# /usr/local/bin/puppetd --test > >>> --environment=production --configprint server > >>> puppet.cqu.edu.au > >>> [root@t1000dev]:~# /usr/local/bin/puppetd --test > >>> --environment=production --configprint masterport > >>> 8140 > >>> [root@t1000dev]:~# /usr/local/bin/puppetd --test > >>> --environment=development --configprint environment > >>> development > >>> [root@t1000dev]:~# /usr/local/bin/puppetd --test > >>> --environment=development --configprint server > >>> jester.cqu.edu.au > >>> [root@t1000dev]:~# /usr/local/bin/puppetd --test > >>> --environment=development --configprint masterport > >>> 18140 > >>> [root@t1000dev]:~# /usr/local/bin/puppetd --test -- > >>> environment=development > >>> info: Loading fact serialnumber > >>> info: Loading fact zones > >>> info: Loading fact hardware_platform > >>> info: Loading fact sshkeys > >>> info: Loading fact sun_webserver > >>> notice: Ignoring --listen on onetime run > >>> info: Retrieving facts > >>> err: /File[/var/puppet/facts]: Failed to generate additional > >>> resources > >>> during transaction: Could not connect to puppet.cqu.edu.au on port > >>> 8140 > >>> err: /File[/var/puppet/facts]: Failed to retrieve current state of > >>> resource: Could not connect to puppet.cqu.edu.au on port 8140 Could > >>> not describe /facts: Could not connect to puppet.cqu.edu.au on port > >>> 8140 > >>> info: Loading fact serialnumber > >>> info: Loading fact zones > >>> info: Loading fact hardware_platform > >>> info: Loading fact sshkeys > >>> info: Loading fact sun_webserver > >>> err: Could not retrieve catalog: Could not connect to > >>> puppet.cqu.edu.au on port 8140 > >>> warning: Not using cache on failed catalog > >>> > >>> > >>> > >>> > >>> Any ideas? From what I can gather this should work. I can''t see > >>> anyone > >>> else that says it isn''t working and I''ve found as many examples via > >>> google as I can and they all have pretty much the same setup I do in > >>> my puppet.conf file. The closest thing I came to was > >>> http://reductivelabs.com/trac/puppet/ticket/1183 which seems to be > >>> the > >>> opposite of my problem, configprint works, but running it normally > >>> doesn''t. > >>> > >>> Regards > >>> Simon > >>> > >>>> > >>> > >> > >> > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---