coreos / layering-examples

Apache License 2.0
111 stars 24 forks source link

Adding the loading-kernel-module example. #64

Closed ybettan closed 1 year ago

ybettan commented 1 year ago

This example will demo how a pre-compiled kernel-module can be loaded into the worker nodes of a cluster using the CoreOS Layering functionality.


As requested https://github.com/ybettan/coreos-layering-driver-toolkit/pull/4#issuecomment-1572518239. This is indeed a good idea to have it here as well.

/cc @cgwalters

jmarrero commented 1 year ago

was this intended for: https://github.com/openshift/rhcos-image-layering-examples ?

ybettan commented 1 year ago

was this intended for: https://github.com/openshift/rhcos-image-layering-examples ?

Seems like this was Colin's intention to begging with. What is the difference between the 2 repos? Is this repo only for creating derivative of Fedora and https://github.com/openshift/rhcos-image-layering-examples for RHCOS? is the later the d/s version of the former?

This PR does in fact use RHCOS and the driver-toolkit (which is OCP specific). I guess I should probably move this PR to https://github.com/openshift/rhcos-image-layering-examples?

@jmarrero @cgwalters WDYT?

cgwalters commented 1 year ago

On Tue, Jun 27, 2023, at 8:53 AM, Yoni Bettan wrote:

This PR does in fact use RHCOS and DTK (which is OCP specific). I guess I should probably move this PR to https://github.com/openshift/rhcos-image-layering-examples?

Yes.

There is a longer term question about making some of this flow actually not OCP specific…since clearly some of the techniques can be used outside of that context too. But for now the OCP repository is the right place.

jmarrero commented 1 year ago

@ybettan yeah please open the PR on https://github.com/openshift/rhcos-image-layering-examples Like Colin suggested we could use part of the example for Fedora. Is there an public DTK variant/upstream? If not maybe just building the module in a fedora app container might work to build the simple module.

jmarrero commented 1 year ago

I had used the simple kmod before for this example https://github.com/midu16/rhcos-layering/blob/main/kernel-4.18.0-372.40.1.el8_6.iavf.bz2149746.bz2152493.marvell.x86_64/Containerfile#L26 but it was also RHCOS/OCP related.

ybettan commented 1 year ago

@ybettan yeah please open the PR on https://github.com/openshift/rhcos-image-layering-examples Like Colin suggested we could use part of the example for Fedora. Is there an public DTK variant/upstream? If not maybe just building the module in a fedora app container might work to build the simple module.

Will do. There is no DTK like for fedora but we have a working example on how to create the container in kmm-ci based on ubuntu and I believe it shouldn't be hard to make the adjustments for fedora.

Let me know if this is something you are interested in and if the answer is yes I can create a fedora example for this repo as well.

ybettan commented 1 year ago

This PR will be closed in favor of https://github.com/openshift/rhcos-image-layering-examples/pull/17. Waiting for a response on https://github.com/coreos/layering-examples/pull/64#issuecomment-1609579424 before closing:

Let me know if this is something you are interested in and if the answer is yes I can create a fedora example for this repo as well.

jmarrero commented 1 year ago

Will do. There is no DTK like for fedora but we have a working example on how to create the container in kmm-ci based on ubuntu and I believe it shouldn't be hard to make the adjustments for fedora.

Let me know if this is something you are interested in and if the answer is yes I can create a fedora example for this repo as well.

I think that would be great to have in this repo!

ybettan commented 1 year ago

I think that would be great to have in this repo!

Ack, then, instead of closing this PR, I will make the adjustments for not being RHCOS specific.

jmarrero commented 1 year ago

first time seeing https://asciinema.org pretty cool :)

ybettan commented 1 year ago

first time seeing https://asciinema.org pretty cool :)

I discovered it not long ago thanks to @qbarrand. For terminal based recording it's great.

ybettan commented 1 year ago

@jmarrero PR was updated to remove OCP/RHCOS specifics. PTAL.

jmarrero commented 1 year ago

This looks great, I can merge and add ci for it myself or if you wanted to do it. Here is an example: https://github.com/coreos/layering-examples/blob/main/.github/workflows/replace-kernel.yml

ybettan commented 1 year ago

This looks great, I can merge and add ci for it myself or if you wanted to do it. Here is an example: https://github.com/coreos/layering-examples/blob/main/.github/workflows/replace-kernel.yml

Feel free to add the CI once it is merged :)