From a993d87d80a916251bfbf8bd5c9479d5ae350b9d Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Mon, 27 Jan 2025 09:09:02 +0100 Subject: [PATCH 1/2] don't set legacy insights ca when local advisor engine is used --- lib/foreman_rh_cloud.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/foreman_rh_cloud.rb b/lib/foreman_rh_cloud.rb index a691fb80..1607e96b 100644 --- a/lib/foreman_rh_cloud.rb +++ b/lib/foreman_rh_cloud.rb @@ -124,7 +124,7 @@ def self.marked_foreman_host end def self.legacy_insights_ca - "#{ForemanRhCloud::Engine.root}/config/rh_cert-api_chain.pem" + "#{ForemanRhCloud::Engine.root}/config/rh_cert-api_chain.pem" unless ForemanRhCloud.with_local_advisor_engine? end def self.cloud_url_validator From 227d7c31ae92a61c107f89e42c945406f48be484 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Mon, 27 Jan 2025 09:09:38 +0100 Subject: [PATCH 2/2] update URL of local advisor engine as it is deployed by the installer --- lib/foreman_rh_cloud.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/foreman_rh_cloud.rb b/lib/foreman_rh_cloud.rb index 1607e96b..d89c4fb5 100644 --- a/lib/foreman_rh_cloud.rb +++ b/lib/foreman_rh_cloud.rb @@ -5,8 +5,8 @@ module ForemanRhCloud def self.on_premise_url return unless ForemanRhCloud.with_local_advisor_engine? - port = ENV['ADVISOR_ENGINE_PORT'] || "8000" - ENV['ADVISOR_ENGINE_URL'] || "http://#{ForemanRhCloud.foreman_host.fqdn || 'localhost'}:#{port}" + port = ENV['ADVISOR_ENGINE_PORT'] || "24443" + ENV['ADVISOR_ENGINE_URL'] || "https://localhost:#{port}" end def self.env_or_on_premise_url(env_var_name)