Ask Your Question

puppet dashboard multiple directory environments?

asked 2015-05-19 12:51:37 -0500

janos gravatar image


I have puppet-dashboard (news RHEL6 release) as ENC running combined with puppet 3.7.x and PuppetDB. All as passenger modules (httpd). It works like a charm with one "production" environment. The mysql-database for the other environments is set up too.

However, adding a key parameter "environment" with value "development" in Puppet Dashboard seems to have no effect to the way, puppet-dashboard-workers store the data in the database. They always use the puppet-dashboard-production database, independent of the configured environment at the ENC. Even changing the environment in the puppet agent (puppet.conf, [agent] section) itself does not affect the database puppet-dashboard uses to store the node and report itself.

Unfortunately the old documentation of puppet-dashboard vanished.

The Database connection between puppet-server/dashboard/mysql-server works flawless, both for the production and development database.

So far I tried to change the workers process, so that the delayedjobs run with RUBYENV=development instead of production (/etc/init.d/puppet-dashboard-workers) but this only leads to pending jobs and seems to have no effect...

I can serve you guys some logs tomorrow back at work, but anyways would be glad if anyone who has a similiar setup could tell me where to dig in.

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted

answered 2015-05-30 12:59:04 -0500

janos gravatar image

So everyone. I have updated puppet-dashboard to the newest version out of github and installed it as gem instead of rpm. Took me some nerves as the machine has no direct internet access, but the end of the day it worked out. And see - there is an environment parameter for the nodes :-)

So, this worked out, we can close this thread.

edit flag offensive delete link more

answered 2015-05-20 15:13:46 -0500

souldonut gravatar image

I had a bunch of issues playing with the Node Manager in 3.7 where it would keep things in production as well. I never got it resolved, but when I upgraded it to 3.8 there was a new agent-specified node group that I added all of my nodes to and now everything works beautifully. Not to say 'go upgrade' is the answer, but if you aren't really tied to 3.7...maybe worth a shot?

edit flag offensive delete link more

answered 2015-05-20 03:05:41 -0500

janos gravatar image

updated 2015-05-20 03:06:50 -0500

Now thats enlightning. Thanks a lot. Im aware of the directory environments concept of puppet but thought I would need different databases for puppet-dashboard in order to have it running.

However, my problem then is actually that the parameter "environment" does not have any effect to the agent. Example: I set the parameter "environment:development" in the puppet-dashboard to a specific host. image description Querying the dashboard, gives me the following output:

-   classes:
   - motd
   - facter
     environment: development

Now, for my understanding the rb3zih04 should be in the directory environment:development. My environments are located under /etc/puppet/environments/development|production|test I put a line in the motd class to identify if the host got the class out of the development or production environment.

Unfortunately the host still retrieves the class out of the production environment: ATTENTION: THIS IS A PUPPET IN PRODUCTION ENVIRONMENT

If I change the environment on the agent (puppet.conf), it works directly - so I guess my environments are set up correctly.

      classfile = $vardir/classes.txt
      localconfig = $vardir/localconfig
      reports = true


   So - any idea ?
edit flag offensive delete link more


Taking a sharper look to the ENC output, its all clear - right? The environment:development is set as parameter and delivered as such. So how can I tell puppet-dashboard different environments if not via parameters? We would need an output like that:

janos gravatar imagejanos ( 2015-05-20 04:19:49 -0500 )edit

It looks like environment support in puppet-dashboard is fairly recent - Dec 2014 - so I wonder if you have a version that supports it. Can you check if the app/models/node.rb looks like this?

GregLarkin gravatar imageGregLarkin ( 2015-05-20 11:55:22 -0500 )edit

Hey Greg, could you please re-check your link, im getting a 404. Thanks in advance and again thanks for the answer :-) My version is 1.2.23. It seems this is the latest RHEL rpm I can find, they jumped to 2.0 when dashboard moved to community. I will try an update tomorrow.

janos gravatar imagejanos ( 2015-05-20 16:28:18 -0500 )edit

Looks like the link above has "

" appended when it opens in the browser. Just delete that from the end of the URL in the address bar, and you should be all set. Yeah, 1.2.23 may not have the support needed for environments. At some point, I need to install open-source so I can test this stuff.

GregLarkin gravatar imageGregLarkin ( 2015-05-20 17:52:09 -0500 )edit

Well, that didn't render properly. The URL has <p> appended to it. That's what I tried to type in the previous comment.

GregLarkin gravatar imageGregLarkin ( 2015-05-20 17:52:46 -0500 )edit

answered 2015-05-19 22:53:10 -0500

GregLarkin gravatar image

I think you are conflating the RAILS_ENV environment with the idea of Puppet environments. Unfortunately, due to the way they are named, that's very understandable!

The RAILS_ENV setting of "production", "development", etc. only affects settings like which database to connect to and possibly others. I'm no Rails expert, BTW. :) See:

Puppet environments are a different concept that are used with node groups to determine what code should be compiled into a catalog for what node. See:

I hope that helps and let me know if I'm way off!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2015-05-19 12:51:37 -0500

Seen: 643 times

Last updated: May 30 '15