-
Notifications
You must be signed in to change notification settings - Fork 99
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
enki should be able to convert an image to Kairos #1721
Comments
We had a discussion and this is what the process should look like:
To make this happen, we need to have one single framework image for all flavors/models/etc. and blindly copy |
Created a story for the work on the overlay files: #1726 |
Will happen as part of this: kairos-io/kairos#1721 Signed-off-by: Dimitris Karakasilis <[email protected]>
* Add fields to the CRDs Signed-off-by: Dimitris Karakasilis <[email protected]> * WIP Create test Signed-off-by: Dimitris Karakasilis <[email protected]> * Refactor code to split in testable functions Signed-off-by: Dimitris Karakasilis <[email protected]> * WIP Signed-off-by: Dimitris Karakasilis <[email protected]> * Do something actually useful in tests - Create a random namespace - Create an artifact - Check that CreateConfigmap doesn't error Signed-off-by: Dimitris Karakasilis <[email protected]> * WIP Signed-off-by: Dimitris Karakasilis <[email protected]> * Refactor before each so that we can change the artifact object per test Signed-off-by: Dimitris Karakasilis <[email protected]> * WIP Signed-off-by: Dimitris Karakasilis <[email protected]> * WIP Signed-off-by: Dimitris Karakasilis <[email protected]> * Run kaniko to build the Dockerfile Signed-off-by: Dimitris Karakasilis <[email protected]> * Build the image from Dockerfile with kaniko Currently can build an image. For example apply these: ``` kind: Secret apiVersion: v1 metadata: name: mydockerfile stringData: Dockerfile: | FROM ubuntu RUN touch myfile --- kind: OSArtifact apiVersion: build.kairos.io/v1alpha2 metadata: name: hello-kairos spec: imageName: "quay.io/kairos/core-opensuse-leap:latest" baseImageDockerfile: name: "mydockerfile" key: "Dockerfile" iso: true ``` Signed-off-by: Dimitris Karakasilis <[email protected]> * Clarify that convert-to-kairos is not yet implemented Signed-off-by: Dimitris Karakasilis <[email protected]> * Remove implemented TODO Signed-off-by: Dimitris Karakasilis <[email protected]> * WIP Signed-off-by: Dimitris Karakasilis <[email protected]> * Bump linting action Signed-off-by: Dimitris Karakasilis <[email protected]> * Fix linting errors Signed-off-by: Dimitris Karakasilis <[email protected]> * Bump it again Signed-off-by: Dimitris Karakasilis <[email protected]> * Unexport function and run controller tests in CI Signed-off-by: Dimitris Karakasilis <[email protected]> * Unexport the other one too Signed-off-by: Dimitris Karakasilis <[email protected]> * Extract case to a function Signed-off-by: Dimitris Karakasilis <[email protected]> * Split controller tests in a separate job so that they run on a fresh cluster and they run in parallel Signed-off-by: Dimitris Karakasilis <[email protected]> * Remove non-implemented functionality Will happen as part of this: kairos-io/kairos#1721 Signed-off-by: Dimitris Karakasilis <[email protected]> * go mod tidy Signed-off-by: Dimitris Karakasilis <[email protected]> * Try to use a random (free) port in tests because sometimes we collide Signed-off-by: Dimitris Karakasilis <[email protected]> --------- Signed-off-by: Dimitris Karakasilis <[email protected]>
WIP here: kairos-io/osbuilder#96 |
We discussed this with Mauro and Ettore. This is what we decided to do instead of enki. Our current Dockerfiles already implement a way to build certain flavors. The problem is that a flavor assumes a certain base image (flavor and base image go together). We will differentiate the base image from the "strategy" (which is what we call a "flavor"). A "strategy" is a number of steps we take to configure the given base image. For example:
What this allows us to do, is to let the user build on top of any base image, using any strategy. E.g.
but also more "dangerous" things like:
This requires minimum changes to our dockerfiles. e.g.
We then only have to implement some logic to select the right Dockerfile for the "strategy" the user wants (e.g. nvidia strategy is on a different dockerfile right now). We also need to move the rest of the logic from Earthly |
Closing in favor of: #1898 |
Also this follow up: #1897 after #1897 , one should only need docker/kaniko in order and our Dockerfiles in order to build a Kairos container image. The rest of the story is described here: #1633 (comment) |
Part of: #1546
When the user specified a Dockefile or a base (non-Kairos) image, the image has to be converted to Kairos the same way we do using Earthly in our release pipelines.
This conversion from vanilla OS to Kairos has a well defined logic but it's currently implemented in Earthly. We will implement it in
enki
instead so that we can use Auroraboot to convert vanilla images to Kairos.Eventually, we should be able to replace the Earthly targets in our pipelines with calls to auroraboot.
The text was updated successfully, but these errors were encountered: