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

Foreman HDM integration #132

Closed
tuxmea opened this issue Jan 26, 2023 · 8 comments
Closed

Foreman HDM integration #132

tuxmea opened this issue Jan 26, 2023 · 8 comments
Assignees

Comments

@tuxmea
Copy link
Member

tuxmea commented Jan 26, 2023

Check possibilities for a HDM-Foreman integration.
Design pattern insist that Foreman is talking to a Smart-Proxy only.

We might need:

  • HDM API
  • HDM Smart-Proxy
  • HDM Foreman Web UI

Foreman HDM WebUI queries information from HDM Smart-Proxy.
HDM Smart-Proxy queries information from HDM API.

Foreman HDM Web UI should display in the same way as we do it in HDM.
User authentication is done by Foreman.

@tuxmea
Copy link
Member Author

tuxmea commented Apr 20, 2023

Vagrant instance: https://github.com/betadots/foreman-training

@oneiros
Copy link
Collaborator

oneiros commented May 17, 2023

Short update: I successfully created a (small, incomplete) smart proxy plugin. This was relatively easy. I am now struggling with creating a foreman plugin which, sadly, is considerably more complex.

Among other things I started looking into how to integrate into the UI. I remember we talked about adding an "HDM"-Tab to the host's view. But I am not 100% sure where we said that tab should be placed. I think we talked about having it as a Sub-Tab on the "Puppet"-Tab (circled in red below). Is that correct? Or would it be OK to have it as a separate Tab next to "Puppet" (green arrow)?

Screenshot 2023-05-17 at 14-39-30 lucy-sharbono foreman localhost

(As you can see, I managed to add a sub-tab on the puppet view. However, for top-level tabs foreman has a defined API to integrate plugins. The foreman_puppet plugin has no such thing and my approach here might be a bit brittle.)

@tuxmea
Copy link
Member Author

tuxmea commented May 22, 2023

@ekohl can you provide a good starting point for implementing HDM in Foreman?

@oneiros
Copy link
Collaborator

oneiros commented May 22, 2023

@ekohl can you provide a good starting point for implementing HDM in Foreman?

No need. I am quite far along already. I think I (finally) got the basics. I can already query HDM from foreman via the smart proxy. I now need to figure out controller permissions and then build out a couple of react components to display the data.

@oneiros
Copy link
Collaborator

oneiros commented May 24, 2023

I just pushed an early prototype to the repo at https://github.com/betadots/foreman_hdm

Here is a screenshot:

image

There is still a lot of rough edges and I still do not know how to install this plugin into a running foreman production installation, but maybe someone would like to take this for a test drive.

I took a lot of inspiration from the forman_salt plugin, that solves similar problems. One of these is how to determine the correct smart proxy for a given host. I solved this similarly to foreman_salt and add a new attribute hdm_proxy to each host. So you need to configure your smart proxy once and then set it on each host that should use it. The HDM tab on the host detail page is only shown if an hdm_proxy has been configured for that host.

@ekohl
Copy link

ekohl commented May 25, 2023

@oneiros looks very nice! I'm about go on vacation so won't have time to review it soon, so just know I'm not intentionally ignoring you.

Just looking at the screenshot I would consider using a monospace font for the eyaml hierachy.

Considering the top level tab vs HDM: I think that's a good starting point. We can look expanding foreman_puppet later but making it a standalone plugin for now is a good start.

@tuxmea
Copy link
Member Author

tuxmea commented Jan 24, 2024

Already implemented and working. Closing.

@tuxmea tuxmea closed this as completed Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants