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

[WIP] [PoC] Replace Embedded Ansible with ansible-runner based solution #18657

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def manageiq_plugin(plugin_name)
end
end

manageiq_plugin "manageiq-providers-ansible_tower" # can't move this down yet, because we can't autoload ManageIQ::Providers::AnsibleTower::Shared
manageiq_plugin "manageiq-schema"

# Unmodified gems
Expand Down Expand Up @@ -73,6 +72,7 @@ gem "rubyzip", "~>1.2.2", :require => false
gem "rugged", "~>0.27.0", :require => false
gem "snmp", "~>1.2.0", :require => false
gem "sqlite3", "~>1.3.0", :require => false
gem "terminal", :require => false

# Modified gems (forked on Github)
gem "ruport", "=1.7.0", :git => "https://github.com/ManageIQ/ruport.git", :tag => "v1.7.0-3"
Expand All @@ -92,6 +92,10 @@ group :amazon, :manageiq_default do
gem "amazon_ssa_support", :require => false, :git => "https://github.com/ManageIQ/amazon_ssa_support.git", :branch => "master" # Temporary dependency to be moved to manageiq-providers-amazon when officially release
end

group :ansible_tower, :manageiq_default do
manageiq_plugin "manageiq-providers-ansible_tower"
end

group :azure, :manageiq_default do
manageiq_plugin "manageiq-providers-azure"
end
Expand Down
6 changes: 0 additions & 6 deletions Procfile.example
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@
# vmware_event_<id>: ruby lib/workers/bin/run_single_worker.rb --ems-id <id> ManageIQ::Providers::Vmware::InfraManager::EventCatcher
# vmware_refresh_core_<id>: ruby lib/workers/bin/run_single_worker.rb --ems-id <id> MiqEmsRefreshCoreWorker

# Embedded Ansible workers

# ansible: ruby lib/workers/bin/run_single_worker.rb EmbeddedAnsibleWorker
# embedded_ansible_refresh: ruby lib/workers/bin/run_single_worker.rb --ems-id <id> ManageIQ::Providers::EmbeddedAnsible::AutomationManager::RefreshWorker
# embedded_ansible_event: ruby lib/workers/bin/run_single_worker.rb --ems-id <id> ManageIQ::Providers::EmbeddedAnsible::AutomationManager::EventCatcher

# Logs
#
# If you also want to see the log output in the same terminal session that you see the foreman output, uncomment these lines
Expand Down
72 changes: 0 additions & 72 deletions app/models/embedded_ansible_worker.rb

This file was deleted.

107 changes: 0 additions & 107 deletions app/models/embedded_ansible_worker/object_management.rb

This file was deleted.

125 changes: 0 additions & 125 deletions app/models/embedded_ansible_worker/runner.rb

This file was deleted.

3 changes: 3 additions & 0 deletions app/models/manageiq/providers/embedded_ansible.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module ManageIQ::Providers::EmbeddedAnsible
include_concern :Seeding
end
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
class ManageIQ::Providers::EmbeddedAnsible::AutomationManager < ManageIQ::Providers::EmbeddedAutomationManager
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager

require_nested :Credential
require_nested :AmazonCredential
require_nested :AzureCredential
require_nested :CloudCredential
require_nested :GoogleCredential
require_nested :MachineCredential
require_nested :VaultCredential
require_nested :NetworkCredential
require_nested :OpenstackCredential
require_nested :RhvCredential
require_nested :ScmCredential
require_nested :VaultCredential
require_nested :VmwareCredential
require_nested :RhvCredential

require_nested :ConfigurationScript
require_nested :ConfigurationScriptSource
require_nested :ConfigurationWorkflow
require_nested :ConfiguredSystem
require_nested :EventCatcher
require_nested :EventParser
require_nested :Inventory
require_nested :Job
require_nested :Playbook
require_nested :Refresher
require_nested :RefreshWorker

def self.ems_type
@ems_type ||= "embedded_ansible_automation".freeze
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::AmazonCredential < ManageIQ::Providers::EmbeddedAnsible::AutomationManager::CloudCredential
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::AmazonCredential

def self.display_name(number = 1)
n_('Credential (Amazon)', 'Credentials (Amazon)', number)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# This corresponds to Ansible Tower's Azure Resource Manager (azure_rm) type credential
class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::AzureCredential < ManageIQ::Providers::EmbeddedAnsible::AutomationManager::CloudCredential
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::AzureCredential

def self.display_name(number = 1)
n_('Credential (Microsoft Azure)', 'Credentials (Microsoft Azure)', number)
end
Expand Down
Loading