Skip to content

Commit

Permalink
Merge pull request #352 from caskdata/feature/hdp-gpg-key-url
Browse files Browse the repository at this point in the history
update hdp gpg key location per docs
  • Loading branch information
dereklwood authored Oct 6, 2017
2 parents 16278cc + d4d3849 commit a3fc49b
Showing 1 changed file with 11 additions and 4 deletions.
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

0 comments on commit a3fc49b

Please sign in to comment.