Skip to content

Conversation

@dustymabe
Copy link
Member

Mostly draining of cmd-buildextend-metal. Also some cleanup here and there. See individual commit messages.

We never officially supported this and when we switched to OSBuild
in d37958a and dropped create_disk.sh this became dead code.
No longer used since we dropped create_disk.sh in d37958a.
This will enable us to generate the input config for runvm-osbuild
once and re-use it for all platforms. In other words, the input JSON
to runvm-osbuild shouldn't change between invocations.
- Add getconfig() helper functions to reduce boilerplate
- Rename variable for config passed to runvm-osbuild to make it more clear
- Create less files
    - Use variables and pipes instead of creating multiple files
- Limit the config for runvm-osbuild
    - Only pass in the variables that are used there and not the entire image.json
This means we now generate the parameters for runvm-osbuild once
and then use them for all subsequent calls. It removes some of the
logic from cmd-buildextend-metal so that other buildextend* commands
can start to call runvm-osbuild (or some variant) too.
In this case we'll just copy out the entire exported tree for
a given pipeline (which we specify as --export=platform). For
individual artifacts we'll just name the file the same name as
the platform and then copy them into the right place in the
calling script.

The benefits of this can be seen immediately because now we don't
have to know about or copy around qemu-secex bootfs_hash and
rootfs_hash inside the supermin VM.
Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

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

One concern, but overall LGTM to me. Nice work!

# not the last partition on the disk so we need to explicitly size it
rootfs-size: "${rootfs_size_mb}"
EOF
/usr/lib/coreos-assembler/finalize-artifact "tmp/${runvm_osbuild_config_json}" "${runvm_osbuild_config_json}"
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, though should it be in the build dir? E.g. this will end up in S3. I guess there might be value in archiving it, though I would just leave it in tmp/ to start.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok reworking this to acommodate I just went to the next step (i was heading towards anyway) and opened #3930

@dustymabe
Copy link
Member Author

closing in favor of #3930

@dustymabe dustymabe closed this Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants