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

update hdp gpg key location per docs #352

Merged
merged 2 commits into from
Oct 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions recipes/repo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,13 @@
'centos6'
end

yum_repo_url = node['hadoop']['yum_repo_url'] ? node['hadoop']['yum_repo_url'] : "#{yum_base_url}/#{os}/2.x/GA/#{hdp_version}"
yum_repo_key_url = node['hadoop']['yum_repo_key_url'] ? node['hadoop']['yum_repo_key_url'] : "#{yum_base_url}/#{os}/#{key}/#{key}-Jenkins"

if hdp_update_version.nil?
# We are on one of the GA versions; configure the GA repo
# rubocop:disable Metrics/BlockNesting
yum_repo_url = node['hadoop']['yum_repo_url'] ? node['hadoop']['yum_repo_url'] : "#{yum_base_url}/#{os}/2.x/GA/#{hdp_version}"
yum_repo_key_url = node['hadoop']['yum_repo_key_url'] ? node['hadoop']['yum_repo_key_url'] : "#{yum_repo_url}/#{key}/#{key}-Jenkins"
# rubocop:enable Metrics/BlockNesting

yum_repository 'hdp' do
name 'HDP-2.x'
description 'Hortonworks Data Platform Version - HDP-2.x'
Expand All @@ -107,10 +109,15 @@
end
else
# We are on an update version; configure the update repo only
# rubocop:disable Metrics/BlockNesting
yum_repo_url = node['hadoop']['yum_repo_url'] ? node['hadoop']['yum_repo_url'] : "#{yum_base_url}/#{os}/2.x/updates/#{hdp_update_version}"
yum_repo_key_url = node['hadoop']['yum_repo_key_url'] ? node['hadoop']['yum_repo_key_url'] : "#{yum_repo_url}/#{key}/#{key}-Jenkins"
# rubocop:enable Metrics/BlockNesting

yum_repository 'hdp-updates' do
name 'Updates-HDP-2.x'
description 'Updates for Hortonworks Data Platform Version - HDP-2.x'
url "#{yum_base_url}/#{os}/2.x/updates/#{hdp_update_version}"
url yum_repo_url
gpgkey yum_repo_key_url
action :add
end
Expand Down