redhat-cop / infra.leapp

Collection of Ansible roles for automating RHEL in-place upgrades using Leapp.
MIT License
44 stars 34 forks source link

DRAFT: Support base os instances on AWS, Azure, and GCP #144

Closed Rezney closed 6 months ago

Rezney commented 8 months ago

Support base os PAYG instances on AWS, Azure, and GCP by adding:

leapp_rhui_map:
  rhui-aws: leapp-rhui-aws
  rhui-azure: leapp-rhui-azure
  rhui-gcp: leapp-rhui-google

Technically, we could use e.g. "ec2_metadata_facts" but we would have to add new dependencies.

Rezney commented 8 months ago

@swapdisk @heatmiser Please let me know if the approach is ok.

Couple of questions:

swapdisk commented 8 months ago

Please let me know if the approach is ok...

Yes, I like this approach.

analysis_repos_el7 from "playbooks/analysis.yml" is set to copr:copr.fedorainfracloud.org:group_oamg:leapp to enable the repo but there is nothing enabling the Fedora Copr. Do we want to introduce it or there are other plans?

Right, I don't know what's going on with that. This is just an example playbook, but it still should make sense. Anybody?

  • leapp_preupg_opts from "playbooks/analysis.yml" seems to be overriding leapp_upgrade_opts from the defaults. What about introducing a list and extending it?

Sounds good if we can do it in a forward compatible way, i.e., not breaking existing playbooks folks may have that are already overriding leapp_upgrade_opts?

djdanielsson commented 8 months ago

I believe the copr fedora stuff was an example but I am not positive @jeffmcutter do you remember?

jeffmcutter commented 8 months ago

That was added after my time:

https://github.com/redhat-cop/infra.leapp/commit/7a647c8e2b13a9db8288a50e5d399e4b97bb4c4b

@ingmarfjolla Can you help shed some light on the question?

ingmarfjolla commented 8 months ago

If I remember correctly at the time I was adding those examples, we were pointing to copr:copr.fedorainfracloud.org:group_oamg:leapp for 2 reasons. 1 was to just show the usage of the analysis_repos_el7 variable in general, and 2 we were testing an upstream fix for an issue we had with leapp at the time (I don't work at RH anymore but in the leapp gchat there should still be a a thread about it). Heres the original issue where I made the suggestion (and makes mention of the issue we ran into and tested)

Rezney commented 8 months ago

Thanks all for chiming in. I wanted to make sure I am not stepping on anyone's toes with enabling it. I believe it is really valuable for testing the upstream bits as @ingmarfjolla mentioned.

djdanielsson commented 8 months ago

Oh I remember it was because the bug fix for xfs wasn't downstream yet

heatmiser commented 8 months ago

@Rezney it is my opinion that we move away from requiring the end user to manually set leapp_upgrade_type and then rely on logic that stems from that setting. Instead, I feel that we should be programmatically introspecting each system and then setting the requisite repos that need to be enabled. I began this type of effort in the leapp-project we use for workshops, here. We should be able to determine where/how a particular node/instance is running, review either current subscription mode or currently enabled repos to then set the appropriate repos needed for leapp execution. In this manner, we could have 5 different RHEL nodes in a particular inventory for an ansible leapp playbook, with some running on bare-metal, some on VMware, some on various clouds, subscribed viu Satellite or RH CDN or via RHUI...each node/instance could be handled correctly.

Rezney commented 8 months ago

@heatmiser Nice! I was not aware we have "Amazon EC2" info for free and I counted with the natural reserve against bringing in more dependencies to get e.g. "ec2_metadata_facts". Do you happen to know we have similar info for Azure and GCP (lazy ask - I can check) ? I definitely agree with the diverse inventory reasoning. Ok, let's go this way.

djdanielsson commented 6 months ago

how is this coming along or are you still waiting for some answers?

Rezney commented 6 months ago

I plan to resume working on this next week. We have been snowed under because of a new release. Sorry for the delay.

heatmiser commented 6 months ago

how is this coming along or are you still waiting for some answers?

I have been working on this intermittently over the past month. I am planning to submit a PR over the weekend.

Rezney commented 6 months ago

how is this coming along or are you still waiting for some answers?

I have been working on this intermittently over the past month. I am planning to submit a PR over the weekend.

Sounds good to me. Closing this PR then.