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

blueprint: remove the sshkey customization #928

Merged
merged 2 commits into from
Sep 16, 2024

Conversation

achilleas-k
Copy link
Member

This is something I've mentioned a few times in the past but never got around to doing. With the upcoming changes to partitioning (#926), I think this is a good opportunity to start with a proof of concept and the canonical example for customization simplification in images. The general idea is that blueprints in osbuild-composer are the canonical, user-facing version of the structure. The images counterpart has no obligation to maintain backwards compatibility, or even have the same exact structure as the real blueprints.

Extra considerations:

  • We (well, @croissanne) recently (re)introduced the idea of moving blueprints out into its own project, and having a schema for the actual real blueprint format. I think this is a great idea and takes care of any issues of divergence between blueprint implementations.
  • bootc-image-builder uses the blueprints code from this repository directly. The particular change in this PR does not affect that project, since we never supported the sshkey customization there.
  • In the past we discussed renaming the package and objects in this repository to something other than blueprint, to avoid any confusion about what they are. In that case, any common structure would be considered incidental, and there would be much less implication about the structures here being a separate implementation of the same configs.

Both the sshkey and users customizations have been around since the beginning of time [1]. The users customization was always a superset of the sshkey, so we have code in blueprints to convert sshkeys into users.

The blueprint code in images is not exposed directly to users. The code responsible for deserializing blueprint toml files lives in osbuild-composer and is directly translated to the equivalent types in osbuild/images. We can simplify the code and types here to only contain the customizations that are strictly necessary and we don't need to maintain backwards compatibility.

The blueprint conversion code in osbuild-composer should convert all sshkeys to users before passing them down to osbuild/images functions.

[1] 967b0e8

Both the sshkey and users customizations have been around since the
beginning of time [1].  The users customization was always a superset of
the sshkey, so we have code in blueprints to convert sshkeys into users.

The blueprint code in images is not exposed directly to users.  The code
responsible for deserializing blueprint toml files lives in
osbuild-composer and is directly translated to the equivalent types in
osbuild/images.  We can simplify the code and types here to only contain
the customizations that are strictly necessary and we don't need to
maintain backwards compatibility.

The blueprint conversion code in osbuild-composer should convert all
sshkeys to users before passing them down to osbuild/images functions.

[1] 967b0e8
Move sshkey in test configs to users.

This has no effect on generated manifests.
Copy link
Member

@croissanne croissanne left a comment

Choose a reason for hiding this comment

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

ty!

@achilleas-k achilleas-k added this pull request to the merge queue Sep 16, 2024
Merged via the queue into osbuild:main with commit fa40f2d Sep 16, 2024
16 of 19 checks passed
@achilleas-k achilleas-k deleted the rm/customizations/sshkey branch September 16, 2024 15:45
achilleas-k added a commit to achilleas-k/osbuild-composer that referenced this pull request Sep 17, 2024
Update osbuild/images to include:
- blueprint: remove the sshkey customization
  (osbuild/images#928).
- [RHEL-9] Drop RHSM and RHUI-specific config from Azure and EC2 images
  (COMPOSER-2308) (osbuild/images#857).
thozza pushed a commit to osbuild/osbuild-composer that referenced this pull request Sep 17, 2024
Update osbuild/images to include:
- blueprint: remove the sshkey customization
  (osbuild/images#928).
- [RHEL-9] Drop RHSM and RHUI-specific config from Azure and EC2 images
  (COMPOSER-2308) (osbuild/images#857).
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