-
Notifications
You must be signed in to change notification settings - Fork 144
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
feature request: support custom content inside upgrade initramfs #1247
Comments
hi, thanks for sharing. well, it's a little bit mystery what is exactly the content of however, adding additional custom files/dirs inside the initramfs is one of things that people can actually do without the need to modify our code, using custom actors. People can just create their custom actor to customize the initramfs content producing from leapp.actors import Actor
from leapp.models import (
CopyFile,
TargetUserSpaceUpgradeTasks,
UpgradeInitramfsTasks
)
from leapp.tags import FactsPhaseTag, IPUWorkflowTag
class CustomizeUpgradeInitramfs(Actor):
name = 'customize_upgrade_initramfs'
consumes = ()
produces = (TargetUserSpaceUpgradeTasks, UpgradeInitramfsTasks)
tags = (IPUWorkflowTag, FactsPhaseTag)
def process(self):
# ... any other code to conditionalize produce of msgs below ... then
self.produce(TargetUserSpaceUpgradeTasks(copy_files=[CopyFile(src="/root/overlay", dst="/custom-overlay")]))
self.produce(UpgradeInitramfsTasks(include_files=['/custom-overlay''])) OTOH, we expect to create/document templates for custom actors in future. Do you consider such type of template to be helpful? For now, this seems to me like an example we could use for the template. We hope to have restructuralized documentation during summer. When you are trying to do some customisations, I suggest you to check defined models that contain
these models are specially created to simplify or make possibly various actions (and customisations) during the upgrade. |
@verdverm ah, now I read your comment in #1239 (reply in thread) which is explaining little bit more how the directory helped you. Regarding that, I guess that would be helpful to have something like |
for some context, we are modifying the leapp files after installing the leapp packages
The idea for the overlay is that a user can specify an arbitrary directory to overlay. It provides flexibility to the situation and doesn't require developing and shipping a custom actor. The ENV var would be super simple from our pov |
If there is a way / tutorial on how to drop some files into an existing leapp install that would effectively do the same thing, that would be helpful and ideally better align with how to modify leapp appropriately |
Thanks for the feedback. Well I see here two things we can do:
I expect we can put it into the documentation this summer. We expect to implement support for configuration files in framework during this summer also, so I expect this case could be potentially covered till Feb. I am not in favor of another envar so much honestl, as I have the feel that number of envars possible to use in this project is becoming large and the usability would be limitted. So I prefer to stay just with options I mentioned. @abadger headsup ^ candidate for configuration |
A configuration file would be even better! I'd be happy to check out the template concept if you have some early docs / examples. I sort of have a thing for templates, generally speaking... https://github.com/hofstadter-io/hof :] |
In the process of our efforts to support luks on c7->r8, we found that adding a custom overlay to be very helpful and require minimal changes. For the actual implementation, I would expect that this would be enabled and included via an ENV var.
LEAPP_CUSTOM_INITRAMFS_OVERLAY=<path>
would turn this on and setsrc
to CopyFileThe text was updated successfully, but these errors were encountered: