puppet dashboard inventory

509 views
Skip to first unread message

vioilly

unread,
Dec 12, 2012, 5:23:52 PM12/12/12
to puppet...@googlegroups.com
I have a puppet master install which uses puppetdb. I also have puppet dashboard installed with the inventory service running. I want multiple puppet masters using a single puppetDB server. Puppetdb is installed on separate vm.

How can I get the dashboard inventory to use the puppetdb server to get the inventory records? Where do I configure the dashboard inventory so it uses puppetdb?

I have configured vi /usr/share/puppet-dashboard/
config/settings.yml

with

# The "inventory service" allows you to connect to a puppet master to retrieve and node facts
enable_inventory_service: true

# Hostname of the inventory server.
inventory_server: 'puppet-server1.domain.net'

# Port for the inventory server.
inventory_port: 8081

However, inventory is not picking up any information

Inventory

Could not retrieve facts from inventory service: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A

Can anyone help ?

Cheers,
Oli

vioilly

unread,
Dec 13, 2012, 4:09:59 PM12/13/12
to puppet...@googlegroups.com
Just trying to get help here.

My puppetdb server is called puppet-server3. My dashboard server is puppet-server2. I can run inventory commands against my puppetdb and get results.

For example - i have a puppet-client2.test.net machine running the puppet agent

[root@puppet-server3 ~]# curl -H "Accept: application/json" 'http://localhost:8080/status/nodes/puppet-client2.test.net'
{
  "name" : "puppet-client2.test.net",
  "deactivated" : null,
  "catalog_timestamp" : "2012-12-13T17:55:28.704Z",
  "facts_timestamp" : "2012-12-13T17:55:28.534Z"

So that tells me the puppetdb is holding facts about my puppet agent

For the dashboard, what inventory server do I specify in settings.yml? It is the puppetdb server (puppet-server3.test.net)


# Hostname of the inventory server.
inventory_server: 'puppet-server3.test.net'


# Port for the inventory server.
inventory_port: 8081

Do I need to set up SSL certs between the dashboard server and the puppetdb server?

Any help would be appreciated

Cheers,
Oli

Peter Bukowinski

unread,
Dec 13, 2012, 4:26:28 PM12/13/12
to puppet...@googlegroups.com
You do not need to make any changes to your dashboard server. Instead, you need to modify two files and add one file to your puppet master. See step 2 on this page for the details: http://docs.puppetlabs.com/puppetdb/1/connect_puppet_master.html#step-2-edit-config-files

--
Peter
Message has been deleted

vioilly

unread,
Dec 13, 2012, 4:57:07 PM12/13/12
to puppet...@googlegroups.com
Correction to the above post


Also puppetdb.conf

[master]
  storeconfigs = true
  storeconfigs_backend = puppetdb


should be

[main]

server = puppet-server3.test.net
port = 8081



Peter Bukowinski

unread,
Dec 14, 2012, 9:25:15 AM12/14/12
to puppet...@googlegroups.com
On Dec 13, 2012, at 4:55 PM, vioilly wrote:

Hi,

I believe I have done that.

So on my puppet master (puppet-server1) I have modified the puppet.conf file and added the following:


[master]
   
    storeconfigs = true
    storeconfigs_backend = puppetdb

Also puppetdb.conf

[master]
  storeconfigs = true
  storeconfigs_backend = puppetdb


and added the route.yaml file

I did also edit the auth.conf file - do I need to do on the puppetmaster ?

On the dashboard server I have turned on the inventory service and added the puppetdb server as the invenory_server - wher else would it know how to connect to the puppetdb ?

I have also made sure all the certs have been signed by the puppet CA server and are valid

Thanks,
Oli

The puppetdb plugins you installed on your puppetmaster handle the communication with puppetdb. Instead of storying inventory data in a local database, your puppetmaster will send them to puppetdb. So inventory_server in dashboard's settings.yml should be pointing at your puppetmaster, not the puppetdb server.

Once you have all the settings correct, just make sure auth.conf on your puppetmaster is configured to allow access to facts. Mine inventory-related entry looks like this:

  path /facts
  auth yes 
  method find, search
  allow dashboard, puppet

--
Peter

Oliver Leach

unread,
Dec 14, 2012, 9:54:21 AM12/14/12
to puppet...@googlegroups.com
Great - that makes sense.

How would I use multiple puppet-masters?

Thanks,
Oli

Oliver Leach

unread,
Dec 14, 2012, 11:44:28 AM12/14/12
to puppet...@googlegroups.com
Hi,

I have tried this config. One thing I have noticed is that my puppet master is not listening on port 8081. When I put the puppet master, in my case puppet-server1, in to /usr/share/puppet-dashboard/config/settings.yml on the dashboard server as follows:



# Hostname of the inventory server.
inventory_server: 'puppet-server1.tcl-oob.net'


# Port for the inventory server.
inventory_port: 8081


I have also tried port 80 and 8140. But this is not working for me.

Could not retrieve facts from inventory service: 403 "Forbidden"

Any ideas?

Oli

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

vioilly

unread,
Dec 17, 2012, 5:09:50 PM12/17/12
to puppet...@googlegroups.com
I was doing this all wrong as Peter pointed out.

I had to make sure of the following:

1 - auth.conf

any auth config for facts and inventory on the puppet master had to go above this entry

# this one is not stricly necessary, but it has the merit
# of showing the default policy, which is deny everything else
path /
auth any


2 - the puppet inventory server was the puppet-master not the puppetdb

3 - the inventory port on the puppet master was 8140

Got it working with this config

Cheers,
Oli
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages