Skip to content

Extend boot-aws to allow passing repo files and VPC - #2721

Merged
ondrejbudai merged 5 commits into
osbuild:mainfrom
larskarlitski:boot-aws
Sep 29, 2026
Merged

ondrejbudai merged 5 commits into
osbuild:mainfrom
larskarlitski:boot-aws

Conversation

@larskarlitski

Copy link
Copy Markdown
Contributor

Add --repo-file, --vpc-id, and --subnet-id. Remove unnecessary argument from boot-aws teardown.

I honestly wonder if --repo-file is too specific and something like --user-data would be preferable?

@larskarlitski

Copy link
Copy Markdown
Contributor Author

I honestly wonder if --repo-file is too specific and something like --user-data would be preferable?

Indeed, as is so often the case, now that I proposed this patch I am realizing that I would need another one that allows injecting an additional certificate file, because the repository I'm trying to use this with uses a self-signed one (Red Hat internal).

@supakeen

Copy link
Copy Markdown
Member

@larskarlitski Can you expand very slightly on the use case? I think I have an idea based on what files you want to include, but I think it'd be useful to spell it out (re-using this executable in other contexts, I assume).

@larskarlitski

Copy link
Copy Markdown
Contributor Author

@larskarlitski Can you expand very slightly on the use case? I think I have an idea based on what files you want to include, but I think it'd be useful to spell it out (re-using this executable in other contexts, I assume).

I can! Red Hat has an extensive test suite for cloud images, which is distributed over multiple test frameworks, orchestrators, and repositories. For AWS, most tests are in os-tests. I am working on consolidating those and would love to use Image Builder's tooling (thanks @achilleas-k to pointing me to it), in part to share some code, but also thinking about the possibility that we could run some of that test suite upstream on Image Builder at some point.

One of the things we require is to run these tests on pre-released RHEL content. The AWS account we're running them in has a VPC connected to Red Hat's internal network, where these repositories are hosted. Thus the change for vpc-id and subnet-id.

Again, I'm really uncertain about --repo-id and think I'd prefer something like --user-data. Happy to discuss and will convert this PR to draft in the meantime.

@larskarlitski
larskarlitski marked this pull request as draft September 26, 2026 13:17
@achilleas-k

Copy link
Copy Markdown
Member

I honestly wonder if --repo-file is too specific and something like --user-data would be preferable?

After reading through the patch I think I agree. Exposing a couple of options and building a cloud-init file from them was fine when all we needed was a couple of options. If we're going to start expanding what we want to support for cloud-init, let's write the file separately and pass it as an option, instead of starting down the path of accidentally implementing a fully-featured cloud-init user-data file generator CLI as a sideproject.

@larskarlitski

Copy link
Copy Markdown
Contributor Author

Yeah, convinced that this is the right way. I've updated this branch to remove the --repo-id commit, add a --user-data, and remove the --username and --ssh-pubkey convenience options.

The rhel-10 builds fail, because they cannot remove anything under image-builder-84.0.0/_build/pkg/mod/golang.org/[email protected]/ (Permission denied). No idea what makes that package special?

@larskarlitski
larskarlitski marked this pull request as ready for review September 28, 2026 14:48
@achilleas-k

Copy link
Copy Markdown
Member

The rhel-10 builds fail, because they cannot remove anything under image-builder-84.0.0/_build/pkg/mod/golang.org/[email protected]/ (Permission denied). No idea what makes that package special?

Widespread issue with Go and FIPS in RHEL. Haven't followed the details closely, but I see people discussing it.

achilleas-k
achilleas-k previously approved these changes Sep 28, 2026
@achilleas-k

Copy link
Copy Markdown
Member

One issue here is that this change wont be tested by our image build, upload, and boot tests because no images changed. We could update the rng seed in the Schutzfile which will rebuild everything.

@achilleas-k

Copy link
Copy Markdown
Member

We could update the rng seed in the Schutzfile which will rebuild everything.

Better than not testing it at all. Did the bump myself.

@larskarlitski

Copy link
Copy Markdown
Contributor Author

Better than not testing it at all. Did the bump myself.

Thanks!

larskarlitski and others added 5 commits September 28, 2026 11:16
It doesn't need user name and ssh keys. Store region in the resources file.
Allow choosing the subnet and vpc to place the instance in.
Remove the convenience option --ssh-pubkey. Let users pass --user-data instead,
which gives them full flexibility to customize. Remove --username for `setup`
as well, but keep it for `run`.
Change the test RNG seed to rebuild all images and test the changes to
the upload command and scripts.

@brlane-rht brlane-rht left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

@supakeen
supakeen added this pull request to the merge queue Sep 29, 2026
@schuellerf

Copy link
Copy Markdown
Contributor

@larskarlitski the pipelines might get fixed by adding something like this

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 29, 2026
@larskarlitski

Copy link
Copy Markdown
Contributor Author

The aarch64 unit test job failed with:

There has been a runner system failure, please try again

@ondrejbudai
ondrejbudai added this pull request to the merge queue Sep 29, 2026
Merged via the queue into osbuild:main with commit aa77990 Sep 29, 2026
52 of 54 checks passed
@larskarlitski
larskarlitski deleted the boot-aws branch September 30, 2026 16:17
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.

6 participants