Skip to content

ref: Do not build OS image from kernel base#52

Merged
Callisto13 merged 1 commit intomainfrom
v2-base01
Jan 17, 2023
Merged

ref: Do not build OS image from kernel base#52
Callisto13 merged 1 commit intomainfrom
v2-base01

Conversation

@Callisto13
Copy link
Copy Markdown
Contributor

@Callisto13 Callisto13 commented Jan 6, 2023

The kernel base image brought the kernel modules into the operating system image. This resulted in quite a long image pipeline, as a change in any of the kernel layers would require updating the OS layers. Our new plan is to mount those modules in as a separate volume, thus separating the kernel image pipeline from the OS image pipeline.

This change updates the CAPI OS image so that it is built from a standard Ubuntu instead. It does not contain module files.

In order not to break things for people who may be using versions of CAPMVM and Flintlock which do not have the feature to add modules via an additional mountpoint, I have renamed the image. This will ensure that the existing tags will not be overwritten. I chose this as the less confusing and frustrating option for people. I am open to any other suggestions on how to do this. Another way could be suffixing the image tags with -v2 or something.

This change will be fairly short-lived as we want to switch to using kubernetes community images for this. But either way an image rename will be required as kernel modules will not be present in either.

Part of #49

@Callisto13 Callisto13 added the kind/refactor Only refactoring changes label Jan 6, 2023
@Callisto13 Callisto13 added the kind/feature New feature or request label Jan 6, 2023
@Callisto13 Callisto13 mentioned this pull request Jan 6, 2023
13 tasks
@Callisto13
Copy link
Copy Markdown
Contributor Author

Validated cluster works with:

rootVolume:
  id: root
  image: "docker.io/claudiaberesford/capmvm-k8s-os:1.23.5"
kernel:
  filename: "boot/vmlinux"
  image: "docker.io/claudiaberesford/kernel-bin:5.10.77"
volumes:
- id: modules
  image: "docker.io/claudiaberesford/kernel-modules:5.10.77"
  mountPoint: /lib/modules/5.10.77

yitsushi
yitsushi previously approved these changes Jan 12, 2023
richardcase
richardcase previously approved these changes Jan 12, 2023
Copy link
Copy Markdown
Member

@richardcase richardcase left a comment

Choose a reason for hiding this comment

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

Great 🎉

yitsushi
yitsushi previously approved these changes Jan 16, 2023
@@ -1,20 +1,36 @@
FROM ghcr.io/weaveworks-liquidmetal/flintlock-ubuntu-base:20.04

ARG OS_VERSION=20.04
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

(no changes required, only a note)

This can be UBUNTU_VERSION or something that tells it's ubuntu, OS_VERSION would require me to open the Dockerfile and see "what os, heh?". Maybe we could just use

ARG BASE_OS="ubuntu:20.04"
FROM ${BASE_OS}

but then, all apt commands would fail if it's not a debian based base image :/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In the meantime, would you settle from some very good documentation (in another pr)?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

That can work too :)

The kernel base image brought the kernel modules into the operating
system image. This resulted in quite a long image pipeline, as a change
in any of the kernel layers would require updating the OS layers.
Our new plan is to mount those modules in as a separate volume, thus
separating the kernel image pipeline from the OS image pipeline.

This change updates the CAPI OS image so that it is built from a
standard Ubuntu instead. It does not contain module files.

In order not to break things for people who may be using versions of
CAPMVM and Flintlock which do not have the feature to add modules via an
additional mountpoint, I have renamed the image. This will ensure that
the existing tags will not be overwritten. I chose this as the less
confusing and frustrating option for people. I am open to any other
suggestions on how to do this. Another way could be suffixing the image
tags with `-v2` or something.
@Callisto13
Copy link
Copy Markdown
Contributor Author

sorry @yitsushi had to resolve a merge conflict

@Callisto13 Callisto13 merged commit 64e5cf5 into main Jan 17, 2023
@Callisto13 Callisto13 deleted the v2-base01 branch January 17, 2023 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature New feature or request kind/refactor Only refactoring changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants