forked from osbuild/osbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add example deploying from an encapsulated ostree commit #5
Open
lukewarmtemp
wants to merge
17
commits into
dustymabe:dusty-fedora-coreos
Choose a base branch
from
lukewarmtemp:add-local-container-deployment
base: dusty-fedora-coreos
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add example deploying from an encapsulated ostree commit #5
lukewarmtemp
wants to merge
17
commits into
dustymabe:dusty-fedora-coreos
from
lukewarmtemp:add-local-container-deployment
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Similar to the cleanups in 4e99e80, let's start using the library code for the calls to ostree here.
Similar to the cleanups in 4e99e80, let's start using the library code for the calls to ostree here.
This moves the setup_remote function from the ostree source into util/ostree. This is prep for sharing this function with an mpp helper in the future.
This will make it easier to resolve OSTree refs into commits similar to how mpp-resolve-images works for container image references to SHA256 digests.
This adds a Fedora CoreOS manifest that uses the recently added mpp-resolve-ostree-commits osbuild-mpp functionality.
With these changes you can now run: ``` osbuild-mpp /path/to/fedora-ostree-image.mpp.yaml /tmp/output.json sudo osbuild /tmp/output.json --store store/ --output-directory out/ --export qcow2 ``` Then the disk will be in `out/qcow2/disk.qcow2`. Right now we need to delete the `root=LABEL=root` kernel argument since FCOS doesn't work well on first boot with that argument: ``` virt-edit -a disk.qcow2 -m /dev/sda3 /loader.1/entries/ostree-1-fedora-coreos.conf -e 's/root=LABEL=root//' ``` Now you can feed this disk into `cosa` using `--qemu-image`: ``` cosa run -c --qemu-image=disk.qcow2 cosa kola run --parallel=5 --qemu-image=disk.qcow2 ```
My original calculations were wrong. Also let's set a size for the root partition for now otherwise it will fill the disk which isn't what we want.
These aren't set in FCOS images today.
For FCOS for now we use COSA as our build environment. There's really no reason for us to build a "builder" and worry about controlling those inputs when we already have everything we need in COSA and controls for the inputs there.
It's no longer required by the ostree.deploy stage and it's not what we want for FCOS anyway because we rely on the root= kernel argument not being there on first boot of FCOS.
There are a bunch of failures when these commands run and it's annoying. I started a thread in the ImageBuilder matrix channel to try to understand why we can't override the runner for a non 'build' pipeline. For now let's just delete the calls because AFAICT we don't need them.
This reverts commit 7f76e53.
skopeo needs to access /etc/containers/policy.json
The ostree.deploy stage now accepts either a ostree input: ``` ``` or a containers input: ``` - type: org.osbuild.ostree.deploy options: osname: fedora-coreos mounts: - /boot - /boot/efi kernel_opts: - rw - console=tty0 - console=ttyS0 - ignition.platform.id=qemu - '$ignition_firstboot' inputs: images: type: org.osbuild.containers origin: org.osbuild.source mpp-resolve-images: images: - source: quay.io/fedora/fedora-coreos tag: stable name: quay.io/fedora/fedora-coreos:stable ``` In the containers input case we will run `ostree container image deploy` wheras for ostree commits input we will continue to execute `ostree admin deploy`. Co-authored-by: Dusty Mabe <[email protected]>
Instead of calling from a remote repository, this example uses an ostree commit constructed in a previous stage of the pipeline and encapuslates it into an oci-archive. This oci-archive is then used to deploy the OS. By doing this, we work around the problem of relying on remote repositories in a testing context.
dustymabe
force-pushed
the
dusty-fedora-coreos
branch
5 times, most recently
from
October 24, 2023 20:22
27a23df
to
4608b1c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instead of calling from a remote repository, this example uses an ostree commit constructed in a previous stage of the pipeline and encapuslates it into an oci-archive. This oci-archive is then used to deploy the OS. By doing this, we work around the problem of relying on remote repositories in a testing context.