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

Move REX ssh key management into separate class #727

Merged
merged 1 commit into from
Mar 18, 2022

Conversation

wbclark
Copy link
Contributor

@wbclark wbclark commented Feb 11, 2022

No description provided.

@wbclark wbclark force-pushed the ssh_key_setup_extraction branch from c9a8ce9 to 24204f8 Compare February 11, 2022 10:33
@wbclark wbclark force-pushed the ssh_key_setup_extraction branch 3 times, most recently from 318a21a to 59ffd5c Compare February 11, 2022 13:54
@wbclark wbclark changed the title Move REX ssh generation into separate class Move REX ssh key management into separate class Feb 11, 2022
@wbclark wbclark force-pushed the ssh_key_setup_extraction branch from 59ffd5c to fcfae64 Compare February 11, 2022 15:26
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks ok to me. You can add a spec test:

require 'spec_helper'

describe 'foreman_proxy::plugin::remote_execution::ssh::keys' do
  it { is_expected.to compile.with_all_deps }
end

Since it doesn't use facts in anyway, I'd say that's good enough for testing.

It does make me wonder: should the name be tied to REX? Just thinking about the future case where Ansible might also need SSH keys but REX is configured to use MQTT.

@wbclark wbclark force-pushed the ssh_key_setup_extraction branch from fcfae64 to 96ae112 Compare March 15, 2022 19:27
@wbclark
Copy link
Contributor Author

wbclark commented Mar 15, 2022

It does make me wonder: should the name be tied to REX? Just thinking about the future case where Ansible might also need SSH keys but REX is configured to use MQTT.

It's concerning to me too. After staring at it for a bit I don't see a clean way to fix this without breaking some interfaces.

@ehelms
Copy link
Member

ehelms commented Mar 16, 2022

It does make me wonder: should the name be tied to REX? Just thinking about the future case where Ansible might also need SSH keys but REX is configured to use MQTT.

Ansible is REX in our ecosystem. And by that I mean, REX is the umbrella and it has sub-functionality underneath that falls into transports and providers. SSH, http and mqtt being transports, and Scripts and Ansible being providers (or languages) that can be used. It all rolls up to REX though.

@wbclark
Copy link
Contributor Author

wbclark commented Mar 17, 2022

It does make me wonder: should the name be tied to REX? Just thinking about the future case where Ansible might also need SSH keys but REX is configured to use MQTT.

Ansible is REX in our ecosystem. And by that I mean, REX is the umbrella and it has sub-functionality underneath that falls into transports and providers. SSH, http and mqtt being transports, and Scripts and Ansible being providers (or languages) that can be used. It all rolls up to REX though.

This commit cleared things up for me theforeman/smart_proxy_ansible@3f408b6

Therefore, I think this PR is in a mergeable state unless @ekohl has other feedback?

Copy link
Member

@ehelms ehelms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ekohl could you take a final look as well

@ekohl ekohl merged commit bed270b into theforeman:master Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants