Puppet-dashboard not linking to filebucket or diffs

532 views
Skip to first unread message

treydock

unread,
May 4, 2011, 5:20:14 PM5/4/11
to Puppet Users
In my puppet-dashboard when a change is made to files and it shows the
MD5 sums I am never presented a link to view the file or any diffs of
those files. I assume that the text between '[' and ']' is supposed
to be the link but it's just plain text. This is when viewing
individual reports in Puppet-dashboard. I can expand the line under
"Events" where that change is recorded.

Here's an example...

notice content changed '{md5}7a8ec7feb2846a2cffd246b67d3d7842' to
'{md5}a6175c11d9055942d7970258422b7cdd' /Stage[main]/Sudo/File[/etc/
sudoers]/content /etc/puppet/modules/sudo/manifests/init.pp 12
2011-05-03 10:29 CDT

Nothing in the report is a linked field to allow me to few either
filebucket contents or a diff. I do not know where to begin in
troubleshooting this as I am seeing absolutely no errors in any log
files. I'm running puppet, and puppetmaster 2.6.8 and dashboard
1.1.0. The dashboard is hosted on an Apache server using Passenger.
If there are some debugging or troubleshooting steps that may help
narrow this down please let me know.

Thanks
- Trey

Nigel Kersten

unread,
Jun 9, 2011, 6:28:11 PM6/9/11
to puppet...@googlegroups.com
We *very* much need to improve the documentation here, but you need to:

copy config/settings.yml.example to config/settings.yml

* set up a certificate/key for Dashboard so it can communicate over the API to the filebucket. This is probably easiest done with "puppet cert generate ...." on your CA then copying the files across to your Dashboard (assuming they're on different machines)


* fill in all the SSL cert/key settings in settings.yml

* fill in the file_bucket_server address in settings.yml

* set use_file_bucket_diffs: true in settings.yml

On your puppet master, make sure you have a filebucket 'main' defined, and that it's applying to all File resources. The easiest way is to put something like this in site.pp

filebucket { "main": server => "debian5-1.localdomain", path => false }
 
File { backup => "main" }

This sets the server for filebucket to "debian..." (replace with your server) and sets a resource default so all File resources use this filebucket.

Then when you run on your nodes, they'll backup file changes to the filebucket, and when they send reports to the dashboard, the md5{} checksums will be links to the filebucket.

As soon as you've got this working you're going to get frustrated by:


where we don't actually show the diff, just the old and new files. This should be a relatively easy fix to implement, as we have the complete API for showing diffs as per:


and we know the md5 to diff with.

 

Thanks
- Trey

--
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.




--
Nigel Kersten
Product, Puppet Labs
@nigelkersten

Nigel Kersten

unread,
Jun 9, 2011, 6:29:04 PM6/9/11
to puppet...@googlegroups.com
That all being said... it's great to see someone looking at this feature, and I highly encourage you to file bug reports against the project until we've got things into a reasonable state.

jw2d...@gmail.com

unread,
Jun 17, 2011, 6:00:22 PM6/17/11
to Puppet Users
On Jun 9, 6:28 pm, Nigel Kersten <ni...@puppetlabs.com> wrote:

> On your puppet master, make sure you have a filebucket 'main' defined, and
> that it's applying to all File resources. The easiest way is to put
> something like this in site.pp
>
> filebucket { "main": server => "debian5-1.localdomain", path => false }
>
> File { backup => "main" }

Adding the filebucket stuff is what got this working for me, after
Google found this thread. Thanks for the tip.

> As soon as you've got this working you're going to get frustrated by:
>
> http://projects.puppetlabs.com/issues/7869
>
> where we don't actually show the diff, just the old and new files. This
> should be a relatively easy fix to implement, as we have the complete API
> for showing diffs as per:
>
> http://docs.puppetlabs.com/guides/rest_api.html#file-bucket
>
> and we know the md5 to diff with.

Yep, you're right. This is what I want now. +1

The diff_with option seems to work, just need it integrated into the
dashboard UI:

$ curl -k -H "Accept: s"
https://puppet:8140/production/file_bucket_file/md5/01d551248771071c449d30fec87be98f?diff_with=adce6e149a6ff677304aac194809b4d8
16c16
< test
---
> another test
Reply all
Reply to author
Forward
0 new messages