puppetexplorer icon indicating copy to clipboard operation
puppetexplorer copied to clipboard

Multiple PuppetDB support

Open ocsi01 opened this issue 8 years ago • 1 comments

Hi, I'm having issues with multiple puppetDB support on version 1.5:

puppetdb_servers =>[ ['prod', '/api'], ['nonprod', '/apinonprod'], ] proxy_pass => [ { 'path' => '/api/', 'url' => "http://${puppetdb_prod}:8080/" }, { 'path' => '/apinonprod/', 'url' => "http://${puppetdb_dev}:8080/" }, ]

Based on my understanding, the the first array maps the environments with the puppetDB servers which I wish to use, while the second array maps every local path to the real puppetDB server.

However I can't see any link/background calls calling the non-default endpoint. All the calls are going to /api. (If I'm changing the order of the objects in puppetdb_servers, nonprod is the default, every call goes to /apinonprod)

Is it a bug or a feature? What am I doing wrong? (puppetdb version: 2.3, puppetExplorer version: 1.5)

ocsi01 avatar Mar 23 '16 19:03 ocsi01

I got this working using this settings:

/usr/share/puppetexplorer/config.js:

PUPPETDB_SERVERS = [ ['production', '/api'], ['test', '/api2'] ];

/etc/httpd/conf.d/25-puppetexplorer.lan.conf:

ProxyPass /api2 http://puppet2.lan:8080 ProxyPassReverse /api2 http://puppet2.lan:8080 ProxyPass /api2/pdb/query http://puppet2.lan:8080/pdb/query ProxyPassReverse /api2/pdb/query http://puppet2.lan:8080/pdb/query ProxyPass /api2/pdb/meta http://puppet2.lan:8080/pdb/meta ProxyPassReverse /api2/pdb/meta http://puppet2.lan:8080/pdb/meta ProxyPass /api2/metrics http://puppet2.lan:8080/metrics ProxyPassReverse /api2/metrics http://puppet2.lan:8080/metrics

Nold360 avatar May 18 '16 08:05 Nold360