Skip to content
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

README.md: Document how to create a new CI image #6182

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jelly
Copy link
Member

@jelly jelly commented Apr 5, 2024

  • document how to build a package for a new image.

@jelly jelly added the no-test label Apr 5, 2024
Copy link
Member

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

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

Thanks for starting this! This needs some grammar/interpunction polish too, but let's first collect all the info which we want to add here.

@@ -43,6 +43,29 @@ For running and debugging the images:
overlay in test/images/ instead.
- `vm-reset`: Remove all overlays from test/images/

### Creating a new image

Creating a new image from scratch requires a bootstrap and a setup script,
Copy link
Member

Choose a reason for hiding this comment

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

Technically the setup script is optional

called `tux` and we run `./image-create -v tux` to create this image we
expect two scripts:

- `tux.bootstrap`: The bootstrap script downloads the latest available cloud image (qcow2)
Copy link
Member

Choose a reason for hiding this comment

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

While most of our images start with a cloud image, some don't (cirros, bootc, rhel-7.9, rhel4edge). Perhaps

The bootstrap script has to produce a bootable qcow2 image file, e.g. by downloading a cloud image or invoking some image build service.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah! TIL

Cockpit team member to create a copy of the PR and follow this workflow.

For the initial PR it is recommended to add the new image to the `_manual`
testmap of `starter-kit` to proof the created image is functional.
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be expanded to explain how to boot-test the image, with ./vm-run, trying to log in via SSH as root and admin, testing sudo on the latter. And then trying starter-kit against it locally to ensure it has a functioning package build environment.

Copy link
Member Author

Choose a reason for hiding this comment

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

Trying starter-kit requires a script to build packages right? We should also document that ideally and then vm-customize.

Copy link
Member

Choose a reason for hiding this comment

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

Hm, right, if it's not rpm. We don't even support .deb there yet. cockpit-ostree has an alternative approach which directly copies dist/ into the VM's /usr/local/share/ -- that is also a good start for a new distro that avoid blocking on packaging as the first step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants