Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compare branches #37

Open
vchepkov opened this issue Jan 17, 2016 · 4 comments
Open

compare branches #37

vchepkov opened this issue Jan 17, 2016 · 4 comments

Comments

@vchepkov
Copy link

Would it be possible to utilize this module to compare results of compiling catalogs on the same master, but different branches of the code. This would be very helpful to determine if a refactored code would affect the resulting catalog on the same puppet master.

Thanks,
Vadym

@raphink
Copy link

raphink commented Jan 18, 2016

@vchepkov this is already possible, using /:

puppet catalog diff master/env1 master/env2

@vchepkov
Copy link
Author

I will try. Is it possible to test changed code for custom facts as well? Come to think of it, new version of puppet also can change facts for the node.

@vchepkov
Copy link
Author

vchepkov commented Apr 9, 2016

I mist be doing something wrong, could you point me to the proper direction, please?
These are all the steps I performed (t410.chepkov.lan is my master, I ran command on the master):

  • vi /etc/puppetlabs/puppet/auth.conf
path ~ ^/puppet/v3/catalog/([^/]+)$
method find
auth yes
allow $1
allow t410.chepkov.lan
path /puppet/v3/facts
method find, search
auth any
allow pe-internal-dashboard
allow t410.chepkov.lan
  • restarted puppetserver
# service pe-puppetserver restart
  • updated example script
#!/bin/bash -x
export RUBYLIB=/etc/puppetlabs/code/modules/catalog_diff/lib
export YAMLDIR=/opt/puppetlabs/puppet/cache/yaml
export SSLDIR=/etc/puppetlabs/puppet/ssl
export PUSER='pe-puppet'
[ $USER == $PUSER ] || exit 1

/opt/puppetlabs/bin/puppet catalog diff t410.chepkov.lan/development t410.chepkov.lan/production \
--show_resource_diff \
--content_diff \
--yamldir $YAMLDIR \
--ssldir $SSLDIR \
--changed_depth 1000 \
--render-as json \
--debug \
--output_report "/tmp/lastrun-$$.json" \
--threads 50
  • get an error
Debug: Runtime environment: puppet_version=4.4.1, ruby_version=2.1.8, run_mode=user, default_encoding=UTF-8
Error: Add --debug for realtime output, add --render-as {json,yaml} for parsed output
...
Error: Received invalid data from facts endpoint: source '<html>
<head>
<meta ' not in PSON!
Error: Try 'puppet help catalog diff' for usage

I tried the same steps on different PE versions - 3.3, 3.8 and the one above on PE2016 (adjusted for the auth.conf paths) - result is exactly the same.

Did I miss something?
Thanks.
Vadym

@vchepkov
Copy link
Author

vchepkov commented Apr 9, 2016

for the reference, this is what I get on PE3.3:

+ export RUBYLIB=/etc/puppetlabs/puppet/modules/catalog_diff/lib
+ RUBYLIB=/etc/puppetlabs/puppet/modules/catalog_diff/lib
+ export YAMLDIR=/var/opt/lib/pe-puppet/yaml
+ YAMLDIR=/var/opt/lib/pe-puppet/yaml
+ export SSLDIR=/etc/puppetlabs/puppet/ssl
+ SSLDIR=/etc/puppetlabs/puppet/ssl
+ export PUSER=pe-puppet
+ PUSER=pe-puppet
+ '[' pe-puppet == pe-puppet ']'
...
Error: Received invalid data from facts endpoint: source 'Not Found: Could not' not in PSON!
Error: Try 'puppet help catalog diff' for usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants