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

feat: add build config configurator #1026

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cdrage
Copy link
Contributor

@cdrage cdrage commented Nov 18, 2024

feat: add build config configurator

What does this PR do?

  • Adds automated way to create a build config json file
  • Added to build page

Screenshot / video of UI

Screenshot 2024-11-18 at 3 44 47 PM

Screen.Recording.2024-11-18.at.3.44.07.PM.mov

What issues does this PR fix or reference?

Closes #827

How to test this PR?

Use build config and configure / create your own custom build config
with users, filesystem, etc.

@cdrage cdrage requested a review from a team as a code owner November 18, 2024 20:46
@cdrage cdrage requested review from benoitf, dgolovin and axel7083 and removed request for a team November 18, 2024 20:46
@cdrage cdrage force-pushed the interactive-installer-config branch 2 times, most recently from 56ffd07 to c8f64ec Compare November 18, 2024 20:47
@cdrage
Copy link
Contributor Author

cdrage commented Nov 18, 2024

Discussed with @mrguitar on Slack, follow up issues after this PR:

#1027 and #1028

@cdrage cdrage requested a review from deboer-tim December 2, 2024 13:15
Copy link
Contributor

@deboer-tim deboer-tim left a comment

Choose a reason for hiding this comment

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

Very nice improvement 👍🏼, worked well in testing but just had some usability suggestions.

Supplying the following fields will create a build config file that contains the build options for the
disk image. Customizations include user, password, SSH keys and kickstart files. More information can
be found in the <Link
externalRef="https://github.com/osbuild/bootc-image-builder?tab=readme-ov-file#-build-config"
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to escape the # sign? It should open:
https://github.com/osbuild/bootc-image-builder?tab=readme-ov-file#-build-config
but it is currently opening:
https://github.com/osbuild/bootc-image-builder?tab=readme-ov-file##-build-config
(goes to the top instead of the correct section).

{#if showBuildConfig}
<p class="text-sm text-[var(--pd-content-text)] mb-2">
Supplying the following fields will create a build config file that contains the build options for the
disk image. Customizations include user, password, SSH keys and kickstart files. More information can
Copy link
Contributor

Choose a reason for hiding this comment

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

The middle sentence ('Customizations ... files') is sort of redundant when you look at the options, I would just remove it to simplify.

<Input
bind:value={filesystem.minsize}
id="buildConfigFilesystemMinimumSize.${index}"
placeholder="Minimum size (ex. 30 GiB)" />
Copy link
Contributor

Choose a reason for hiding this comment

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

It wasn't clear to me if the units had to be specified or not, then I used Gb without thinking and it failed, so I looked in the docs and couldn't find what's supported either. Maybe if we put the '30 GiB' in quotes it'll be more obvious that's a direct example?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I had that same issue too :( in the build config it's explicitly GiB, i'll put it in quotes!

externalRef="https://github.com/osbuild/bootc-image-builder?tab=readme-ov-file#-build-config"
>bootc-image-builder documentation</Link
>.
This will override any above user-specific input and use the supplied file only.
Copy link
Contributor

Choose a reason for hiding this comment

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

The text at the top only talks about filling in the fields, then at the bottom of the form you find out you can also provide a file. Feels like maybe there should be two radio buttons like 'Create new build config' and 'Supply existing build config file' so that it's clear you have either option from the start?

{#if showAdvanced}
{#if showBuildConfig}
<p class="text-sm text-[var(--pd-content-text)] mb-2">
Supplying the following fields will create a build config file that contains the build options for the
Copy link
Contributor

Choose a reason for hiding this comment

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

It never says where the build config will be generated. I think this would help (e.g. say we put it in the folder above), so that I could use this once to create it, then maybe edit it outside of Podman Desktop, then supply the same file next time I build.

@slemeur slemeur added this to the 1.6 milestone Dec 16, 2024
### What does this PR do?

* Adds automated way to create a build config json file
* Added to build page

### Screenshot / video of UI

<!-- If this PR is changing UI, please include
screenshots or screencasts showing the difference -->

### What issues does this PR fix or reference?

<!-- Include any related issues from Podman Desktop
repository (or from another issue tracker). -->

Closes podman-desktop#827

### How to test this PR?

<!-- Please explain steps to reproduce -->

Use build config and configure / create your own custom build config
   with users, filesystem, etc.

Signed-off-by: Charlie Drage <[email protected]>
@cdrage cdrage force-pushed the interactive-installer-config branch from adcfdea to 9c6d2a2 Compare December 16, 2024 16:29
@cdrage
Copy link
Contributor Author

cdrage commented Dec 16, 2024

@deboer-tim @axel7083

I've updated the PR with the following:

  • Config.json is not created in the same directory as the output folder, so you can further edit it, etc.
  • Updated the UI a bit so file and interactive mode are in different sections (we can improve it post-this-PR @deboer-tim for radio mode after I sync up with @MariaLeonova / UI/UX team)

Screenshot 2024-12-16 at 11 23 12 AM

Signed-off-by: Charlie Drage <[email protected]>
@cdrage cdrage force-pushed the interactive-installer-config branch from 9c6d2a2 to f86033d Compare December 16, 2024 16:32
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.

RFE: Add "Unattended Baremetal Installer" option
3 participants