Skip to content

Commit

Permalink
use pulp2 for deb content on katello upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
jlsherrill authored and ekohl committed Nov 24, 2020
1 parent d215e07 commit c214354
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 3 deletions.
2 changes: 2 additions & 0 deletions config/katello-answers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ foreman_proxy::plugin::remote_execution::ssh: false
foreman_proxy::plugin::salt: false
foreman_proxy_content:
proxy_pulp_yum_to_pulpcore: true
proxy_pulp_deb_to_pulpcore: true
katello:
use_pulp_2_for_yum: false
use_pulp_2_for_deb: false
puppet:
server: true
server_environments_owner: apache
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
KATELLO = 'katello'.freeze
USE_PULP_2_FOR_DEB = 'use_pulp_2_for_deb'.freeze
ENABLE_DEB = 'enable_deb'.freeze

if answers[KATELLO].is_a?(Hash) && answers[KATELLO][USE_PULP_2_FOR_DEB].nil? && answers[KATELLO][ENABLE_DEB]
answers[KATELLO][USE_PULP_2_FOR_DEB] = true
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FPC = 'foreman_proxy_content'.freeze
PROXY_DEB = 'proxy_pulp_deb_to_pulpcore'.freeze

if answers[FPC].is_a?(Hash) && answers[FPC][PROXY_DEB].nil?
answers[FPC][PROXY_DEB] = false
end
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@ foreman_proxy::plugin::pulp:
pulpcore_enabled: true
foreman_proxy::plugin::salt: false
foreman_proxy_content:
proxy_pulp_deb_to_pulpcore: false
proxy_pulp_isos_to_pulpcore: false
proxy_pulp_yum_to_pulpcore: false
puppet: false
katello:
enable_deb: true
use_pulp_2_for_deb: true
use_pulp_2_for_docker: true
use_pulp_2_for_file: true
use_pulp_2_for_yum: true
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ foreman_proxy_content:
proxy_pulp_isos_to_pulpcore: false
puppet: false
katello:
enable_deb: true
use_pulp_2_for_docker: true
use_pulp_2_for_file: true
use_pulp_2_for_yum: true
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ foreman_proxy::plugin::salt: false
foreman_proxy_content:
proxy_pulp_isos_to_pulpcore: false
proxy_pulp_yum_to_pulpcore: false
proxy_pulp_deb_to_pulpcore: false
puppet: false
katello:
use_pulp_2_for_deb: true
use_pulp_2_for_docker: true
use_pulp_2_for_file: true
use_pulp_2_for_yum: true
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ foreman_proxy::plugin::pulp:
foreman_proxy::plugin::salt: false
foreman_proxy_content:
proxy_pulp_isos_to_pulpcore: false
proxy_pulp_deb_to_pulpcore: false
katello:
use_pulp_2_for_deb: true
use_pulp_2_for_docker: true
use_pulp_2_for_file: true
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ foreman_proxy::plugin::salt: false
foreman_proxy_content:
proxy_pulp_isos_to_pulpcore: false
proxy_pulp_yum_to_pulpcore: false
proxy_pulp_deb_to_pulpcore: false
katello:
use_pulp_2_for_docker: true
use_pulp_2_for_file: true
Expand Down
6 changes: 3 additions & 3 deletions spec/migration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@
end
end

context "pulpcore migration dont proxy yum" do
let(:answers_after) { load_fixture_yaml('pulpcore-migration-dont-proxy-yum', "#{scenario_name}-answers-after.yaml") }
context "pulpcore migration dont use content plugins on upgrades" do
let(:answers_after) { load_fixture_yaml('pulpcore-migration-dont-use-content-plugins-on-upgrades', "#{scenario_name}-answers-after.yaml") }
let(:scenario) do
{
:answers => load_fixture_yaml('pulpcore-migration-dont-proxy-yum', "#{scenario_name}-answers-before.yaml"),
:answers => load_fixture_yaml('pulpcore-migration-dont-use-content-plugins-on-upgrades', "#{scenario_name}-answers-before.yaml"),
:config => load_config_yaml("#{scenario_name}.yaml"),
:migrations => config_path("#{scenario_name}.migrations"),
}
Expand Down

0 comments on commit c214354

Please sign in to comment.