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

MTV-1590 Improved hooks description #586

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

@RichardHoch RichardHoch marked this pull request as draft November 17, 2024 16:15
@RichardHoch RichardHoch force-pushed the improved_hook_description branch 2 times, most recently from c0e8df2 to 931c4a2 Compare December 18, 2024 09:51
@RichardHoch RichardHoch changed the title WIP New hooks description MTV-1590 Improved hooks description Dec 18, 2024
@RichardHoch RichardHoch marked this pull request as ready for review December 18, 2024 17:29
@RichardHoch RichardHoch force-pushed the improved_hook_description branch 3 times, most recently from 76326e0 to 01b65ab Compare December 19, 2024 16:24
@RichardHoch
Copy link
Collaborator Author

@mnecas @fabiand Please review this PR. Thanks.

@matthewsecaur
Copy link

Hi, @RichardHoch ! I made some comments to you directly via Slack. Happy to continue the conversation here, if needed.

. For a pre-migration hook, perform the following steps:

.. In the *Pre migration hook* section, toggle the *Enable hook* switch to *Enable pre migration hook*.
.. Enter the *Hook runner image*. The default image is `quay.io/konveyor/hook-runner` and this value must be used if you are adding an Ansible playbook.
Copy link
Collaborator Author

@RichardHoch RichardHoch Dec 22, 2024

Choose a reason for hiding this comment

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

@mnecas @matthewsecaur comments:
The text says: "Enter the Hook runner image. The default image is quay.io/konveyor/hook-runner and this value must be used if you are adding an Ansible playbook."
Issue: I don't understand what we mean when we say "this value must be used if you are adding and Ansible playbook". Customers are free to use their own image, are they not? I suppose their custom image could be based on the default hook-runner image, by why do we say is MUST be used? Here is an example of a custom hook-runner image that can be used with a playbook: https://github.com/alezzandro/aap25-ee-vmware-rhel8/tree/main/hook-runner

Copy link
Member

Choose a reason for hiding this comment

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

Similar as previous comment, the users can provide any image, but if they specify the spec.playbook they need to provide us with image that has an ansible-runner. So they don't need to be based on the hook-runner but only need the ansible-runner.
Additionally we should change that image as we no longer manage the konveyor quay repository and the image is 2 years outdated.
We should not tell the customers to use some upstream image, we should distribute them the image on top of which they can build or let them to build their images and just mention what are the requirements. That is another issue on which we need to jump.

https://github.com/kubev2v/forklift/blob/0429598fe82ff331ab65e72ff391d1cbb3e1c3b4/pkg/controller/plan/hook.go#L225-L235

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@mnecas I removed the image we had. What should I write instead of it?

Copy link
Member

Choose a reason for hiding this comment

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

@RichardHoch
Copy link
Collaborator Author

@mnecas Matthew added some comments in Slack and I copy-pasted them here.

documentation/modules/about-hooks-for-migration-plans.adoc Outdated Show resolved Hide resolved
documentation/modules/adding-hook-using-cli.adoc Outdated Show resolved Hide resolved
. For a pre-migration hook, perform the following steps:

.. In the *Pre migration hook* section, toggle the *Enable hook* switch to *Enable pre migration hook*.
.. Enter the *Hook runner image*. The default image is `quay.io/konveyor/hook-runner` and this value must be used if you are adding an Ansible playbook.
Copy link
Member

Choose a reason for hiding this comment

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

Similar as previous comment, the users can provide any image, but if they specify the spec.playbook they need to provide us with image that has an ansible-runner. So they don't need to be based on the hook-runner but only need the ansible-runner.
Additionally we should change that image as we no longer manage the konveyor quay repository and the image is 2 years outdated.
We should not tell the customers to use some upstream image, we should distribute them the image on top of which they can build or let them to build their images and just mention what are the requirements. That is another issue on which we need to jump.

https://github.com/kubev2v/forklift/blob/0429598fe82ff331ab65e72ff391d1cbb3e1c3b4/pkg/controller/plan/hook.go#L225-L235

@RichardHoch RichardHoch force-pushed the improved_hook_description branch from 01b65ab to 84cb85f Compare February 2, 2025 10:05
@RichardHoch RichardHoch force-pushed the improved_hook_description branch from 11d49ca to 4262e66 Compare February 5, 2025 11:08
@RichardHoch
Copy link
Collaborator Author

@mnecas @matthewsecaur I made the changes you suggested -- please review this PR again. Thanks.

@matthewsecaur
Copy link

matthewsecaur commented Feb 6, 2025

Hi, @RichardHoch
Here are some notes:

  • In section 6.4.1.2, under the heading "Process:" bullet point 1a, there is this text:

the spec.playbook they need to provide us with image that has an ansible-runner. So they don't need to be based on the hook-runner but only need the ansible-runner.

I think that text is an error and should either be something else or should be removed.

  • In section 6.4.2, under the heading "Procedure" bullet points 3b and 4b seem like they should be the same, but they are not. I recommend leaving 3b alone and replacing 4b with same text as 3b.

  • Also in section 6.4.2 in the "Example migration hook" there is a typo (I may have inadvertently caused it... sorry!). In the "- add_host" portion of the Ansible playbook, this line:
    name: "{{ workload.vm.ipaddress }}" # ALT "{{ workload.vm.guestnetworks[2].ip }}"
    should be changed to this:
    name: "{{ vm.ipaddress }}" # ALT "{{ vm.guestnetworks[2].ip }}"
    The "workload." used to be there before we changed how to import the YAML files. When we made that change, the variable names also needed to be updated.

  • In section 6.4.3 in the first "Note" there appears to be a typo. This text seems like an errant copy/paste:
    "Each hook needs its own Hook needs its own CR" (i.e. the "hook needs its own" is repeated)

  • Section 6.4.3 contains the same typo as the "Example migration hook" in section 6.4.2. The "workload." text should be removed from each variable in the "- add_host:" play.

That's all I see for now. Thanks!

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

Successfully merging this pull request may close these issues.

5 participants