This message was deleted.
# elemental
a
This message was deleted.
b
Rancher side stuff gets invalidated and removed from the yaml right away
I'm just not sure how to set this up as expected.
c
The toolkit is used to generate the oci-images that rancher "finalizes" with a registration config. Your config-snippet belongs to said toolkit. https://rancher.github.io/elemental-toolkit/docs/customizing/general_configuration/ provides more details.
b
Right, Elemental (Rancher) is using the toolkit, but doesn't give you a way to customize it.
It passes some, but not all, of the config to the toolkit.
c
If I'm not mistaken: • Docker builds an image with your customized OS • Toolkit is used to create a bootable iso-image or raw disk image • Rancher customizes these image with endpoint information The config.yaml either has to be included in the docker image or in the second step. But I might be wrong here.
Your settings disappear from rancher because they are not part of the custom Resource Definition and therefore fail the validation
b
I don't think Rancher uses docker, but just sticks in the registration yaml into the ISO.
c
The first two steps are not happening in rancher.
b
So they're happening with Suse?
c
if you use the official images, yes
you can build your own though
that's what the toolkit is for
as well as the makefile in the repo-root
My memories about this are pretty much one year old. I'll get new hardware in about 2 weeks. There's a good chance I'll have to build custom images as well. I'd be happy to share the refreshed knowledge with you when I got there.
b
So do they get thrown into Rancher as a seed-image or are we suppose to set up a stream for it?
Sorry not a stream, a Version Channel
c
You're supposed to setup a OS version channel. Which is just a json file containing a list of your available images, wrapped in an oci image. Easy to build, and it allows rancher to periodically update the list of images.
b
I'm deeply annoyed to the amount of hoops that are required to basically add config files to an iso.
c
If you're building your own images, you can skip all these hooks 😉
b
That's true, but we essentially purchased rancher for elemental and running it on bare metal.
c
We'll do the same. But we deployed rancher with a cloud provider, managed kubernetes. Didn't want to maintain two deployment methods for bare-metal, managed k8s was the smallest possible dependency.
The hooks actually serve a purpose. They basically allow you customizing your images using different vectors. You can simply bake them in, download them after installation and store them on disk, or get them from rancher with an upgrade. Pros and Cons on every solution, always depends on how far you're willing to go. Defining them in rancher has the least amount of dependencies, but it also hurts the most. Until you're done.
b
yeah the problem is there's a chicken and the egg issue when it comes to network configs.
c
Yup
Been there, done that 😄
b
I have it somewhat solved, but the fact that there's no way to dump a config with the generated ISO, but you want to use official images for support...
It's problematic.
c
what kind of network are you looking at?
b
Just bonded 802.3ad
c
With active lacp-fallback on the switches?
b
Pretty sure
c
I didn't try it yet, waiting for hardware, but we plan the same. Good chance you don't have to build custom images. The provided ones should be fine, they should be able to boot, setup network with a single link, talk to rancher and get the networkmanager config for bond from there. Reboot should then set them up with bonding active.
I mean, if those hooks work as expected 🙄
b
I opened a bug for the post install
I just don't think it's actually fixed
c
On the other hand, taking the original images and adding a small change like the network manager config isn't that complicated either. Might be worth the hassle.
b
The system hard hard reboots after installing and doesn't process any post install hooks
c
ouh... race condition
b
like it doesn't
systemctl reboot
it's just suddenly at BIOS.
c
do you provide the hooks via machineregistration config?
because... > Note installation hooks are not applied as part of the MachineRegistration.config.cloud-config. In order to provide installation hooks they can be included as part of the SeedImage.cloud-config, as they need to be present in the installation media.
b
So I'm pretty sure what happens with you create an ISO from the webUI?
c
If I follow the instructions, I end up writing my config into the machine Registration. Creating the ISO from the web-UI places the URL to that registration in the image+certs if required. But at no point I touch any seedImage-config. Or I missed that part somewhere. At least from k8s view, there's a seedImage resource everytime I create a new iso image from the ui, so I guess if you create that resource manually with the proper hooks you'll get an image that contains your stuff.
I'll dig deep into that in two weeks
(it's also possible that the operator builds new seedImages everytime a seedImage-Resource is modified. In that case you could use the rancher UI to test yourself closer to what you need)
b
So turns out that if you have a cloud config section in the registration endpoint, it doesn't push that the seed image (though the elemental registration section does)
You have to make a new seed image and copy pasta it over, then it'll dump it into
/COS_LIVE/iso_config/cloud-config.yaml
Which is referenced by a kernel parameter...
cos.setup=<>/test.yaml
so if you're netbooting... something like
cos.setup=<http://192.168.1.1/elemental/my-cluster.yaml>
or whatever you end up calling the file.
c
so, it needs to be part of the seed image config, not the registration endpoint?
b
Potentially both. They mentioned that the elemental hooks were fixed in the most recent versions for MachineRegistration. But it should be breaking the cloudInit portion out into the seed image portion and the registration gets broken out into it's own yaml file
c
that's getting interesting 😄 We're slowly getting there. One more week for the hardware access.
b
I'm still struggl'n to get the network manager config files in place.
c
Did you ever try https://elemental.docs.rancher.com/next/networking ? (No idea if that's a good solution or not, just curious)
b
I didn't as we need bonds and vlans and tit didn't look like it was supported
c
mhm... to me it looks like it supports everything networkmanager supports. Might be worth a try.