-
Notifications
You must be signed in to change notification settings - Fork 56
Update to use puppetcore puppet and facter #563
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
Draft
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verify bundle install WITHOUT PUPPET_AUTH_TOKEN set
This proves that the bundle install on the peadm should work as-before (apart from the upgrade to ruby 3) without pulling in any puppetcore gems:
# clear all existing ruby configuration ➜ puppetlabs-peadm git:(gavin_puppetcore_update) ✗ rgc + rm -f Gemfile.lock + rm -rf .bundle .direnv vendor/bundle vendor/bin vendor/gems + set +x # setup local bundler configuration bundle config --local gemfile Gemfile bundle config --local path vendor/bundle bundle config --local bin vendor/bin # set local ruby to be 3.x because the new puppet requires ruby 3 ➜ puppetlabs-peadm git:(gavin_puppetcore_update) ✗ rbenv local 3.2.5 # bundle install ➜ puppetlabs-peadm git:(gavin_puppetcore_update) ✗ bundle install Your Gemfile lists the gem puppetlabs_spec_helper (~> 6.0) more than once. You should probably keep only one of them. Remove any duplicate entries and specify the gem only once. While it's not a problem now, it could cause errors if you change the version of one of them later. Fetching gem metadata from https://rubygems.org/......... Resolving dependencies... Fetching rake 13.2.1 Installing rake 13.2.1 ... ... ➜ puppetlabs-peadm git:(gavin_puppetcore_update) ✗ bundle exec rspec spec/support/gemfile_spec.rb # verify the source for puppet and facter are https://rubygems.org ➜ puppetlabs-peadm git:(gavin_puppetcore_update) ✗ cat Gemfile.lock | grep -E "(remote:|specs:| puppet | facter | hiera )" remote: https://rubygems.org/ specs: puppet (>= 6.18.0) facter (4.10.0) facter (< 5.0.0) puppet (8.10.0-universal-darwin) facter (>= 4.3.0, < 5) puppet (>= 6) puppet (>= 5) ➜ puppetlabs-peadm git:(gavin_puppetcore_update) ✗
Verify bundle install WITH PUPPET_AUTH_TOKEN set
In other words, PUPPET_AUTH_TOKEN is set on the environment and is a valid Forge token
# clear everything ruby config ➜ puppetlabs-peadm git:(gavin_puppetcore_update) ✗ rgc + rm -f Gemfile.lock + rm -rf .bundle .direnv vendor/bundle vendor/bin vendor/gems + set +x ➜ puppetlabs-peadm git:(gavin_puppetcore_update) ✗ # setup local bundler configuration bundle config --local gemfile Gemfile bundle config --local path vendor/bundle bundle config --local bin vendor/bin # set the PUPPET_AUTH_TOKEN export PUPPET_AUTH_TOKEN=<REDACTED_VALID_FORGE_TOKEN> # add bundle authentication bundle config --local https://rubygems-puppetcore.puppet.com "forge-key:${PUPPET_AUTH_TOKEN}" # bundle install ➜ puppetlabs-peadm git:(gavin_puppetcore_update) ✗ bundle install Your Gemfile lists the gem puppetlabs_spec_helper (~> 6.0) more than once. You should probably keep only one of them. Remove any duplicate entries and specify the gem only once. While it's not a problem now, it could cause errors if you change the version of one of them later. Fetching gem metadata from https://rubygems-puppetcore.puppet.com/.. Fetching gem metadata from https://rubygems.org/......... Resolving dependencies... Fetching rake 13.2.1 ... ... # verify the gem source for puppet and facter is https://rubygems-puppetcore.puppet.com/ ➜ puppetlabs-peadm git:(gavin_puppetcore_update) ✗ cat Gemfile.lock | grep -E "(remote:|specs:| puppet | facter | hiera )" remote: https://rubygems-puppetcore.puppet.com/ specs: facter (4.11.0) puppet (8.11.0-universal-darwin) facter (>= 4.3.0, < 5) remote: https://rubygems.org/ specs: puppet (>= 6.18.0) facter (< 5.0.0) puppet (>= 6) puppet (>= 5) facter (~> 4.0)! puppet (~> 8.11)! ➜ puppetlabs-peadm git:(gavin_puppetcore_update) ✗
@gavindidrichsen
gavindidrichsen
force-pushed
the
gavin_puppetcore_update
branch
3 times, most recently
from
March 11, 2025 16:16
8b542f5 to
84c0702
Compare
@gavindidrichsen
gavindidrichsen
force-pushed
the
gavin_puppetcore_update
branch
from
March 18, 2025 17:18
9686978 to
db16f01
Compare
@davidmalloncares
davidmalloncares
force-pushed
the
gavin_puppetcore_update
branch
from
March 24, 2025 15:26
6fc5760 to
d3c964f
Compare
@davidmalloncares
davidmalloncares
marked this pull request as ready for review
March 24, 2025 15:26
This change * Introduces a change to the Gemfile that enables a "switch" on PUPPET_AUTH_TOKEN environment variable. In other words, when not-set, then all gem dependencies will be resolved from https://rubygems.org. If set, then puppet and facter will be resolved from the https://rubygems-puppetcore.puppet.com This commit enables the peadm development team to test its functionality using the puppetcore puppet and facter gems. the Signed-off-by: Gavin Didrichsen <gavin.didrichsen@gmail.com>
@gavindidrichsen
gavindidrichsen
force-pushed
the
gavin_puppetcore_update
branch
from
April 15, 2025 11:25
d3c964f to
2f9597f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
This change
For instructions on how to setup authentication and consume the puppetcore gems, see https://github.com/puppetlabs/puppetcore-gems/blob/main/docs/how-to/how_to_consume_the_private_puppetcore_gems.md.
Unfortunately, I wasn't able to add the rspec test to verify the puppetcore modules. See #564 and fix.