Repository navigation
add support for boot-oci cmd (HMS-11559) - #2756
Conversation
|
Really nice, thank you! Sorry this hasn't gotten any attention yet. I need to read it more carefully before I can approve. We should actually use this in our CI now. We have OCI boot tests in osbuild-composer, so I can bring over the secrets and configuration from that to use in this repo. Can you have a look at the boot tests and see if you can add OCI there? Start at the can_boot_test() function in If you don't have the time to look into this please let me know so we can take care of it. |
8838e6a to
2a14159
Compare
|
Had a call with @src-up and we tried to figure out all the variables and credentials needed here. I copied all the OCI-related variables from osbuild-composer's CI to image-builder's. Now we need to pass the private key down through to the upload command. image-builder/test/scripts/imgtestlib/boot.py Lines 73 to 80 in 2a14159 The private key is added as a file in CI, so the env var image-builder/test/scripts/imgtestlib/boot.py Lines 545 to 551 in 2a14159 The fingerprint option is also required in |
7a6826a to
53924fa
Compare
achilleas-k
left a comment
There was a problem hiding this comment.
Generally LGTM, but I have one request below about adding json output to the upload command.
Also, maybe this is better for a follow-up but we should also add upload support for OCI to the main command (image-builder upload --to=oci ...).
looks like we're making progress https://gitlab.com/redhat/services/products/image-builder/ci/images/-/jobs/17511474216 |
4f1d87b to
6639b24
Compare
Right. had to make couple more changes to make schutzbot pass.
|
1009396 to
67ff850
Compare
achilleas-k
left a comment
There was a problem hiding this comment.
This is really nice. Thank you!
Small comment inline, seems to be some stray line-removals in the patch, but otherwise good to merge.
|
Follow-up ticket for another time: https://redhat.atlassian.net/browse/HMS-11557 |
Add a boot-oci command with setup, teardown, and run subcommands for boot testing custom images in OCI. Store created resources so callers can tear them down, select a compatible availability domain and default shape, and connect over SSH to run tests. Teach osbuild-upload-oci to emit image IDs as JSON so boot-oci can consume upload results reliably.
Exercise boot-oci during image tests by fetching the uploaded OCI image ID, passing the configured credentials and launch details, and invoking the image test executable on the resulting instance. Keep cloud credentials available to the test helper so setup can pass the required authentication and SSH options to boot-oci.
Set opc as the cloud-init default user for RHEL 8 OCI images so they can be accessed consistently after boot. Reuse the existing qcow2 image configuration for the OCI image type to retain its current target and kernel options.
add boot-oci command that allows users to launch and terminate OCI VMs.
successfully tested running
go run ./cmd/boot-oci runandgo run ./cmd/boot-oci setup.