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

OEM: Provide Proxmox images #1783

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

OEM: Provide Proxmox images #1783

wants to merge 1 commit into from

Conversation

pothos
Copy link
Member

@pothos pothos commented Mar 22, 2024

This uses coreos/afterburn#1023 and
coreos/ignition#1790 to provide
Proxmox images.

This pulls in flatcar/bootengine#91
and flatcar/init#115 to run afterburn for
hostname, network, SSH key, and metadata attribute setup. The afterburn
support for the SSH key and hostname parses the user-data when it's
cloud-init. The coreos-cloudinit support is not there but can be added
in addition: We need to add a new provider that varies from the existing
config drive support because the file is called user-data and not
user_data, and it needs to look for a filesystem label cidata and not
config-2.

How to use

Follow-up: fix coreos-cloudinit as mentioned above, and better don't make it work through the mount unit trigger but explicitly

For now it's limited to testing until the upstream PRs get merged.

Testing done

Jenkins

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

Copy link

github-actions bot commented Mar 22, 2024

@arcln
Copy link

arcln commented Apr 24, 2024

Hello, there is an existing Igntion PR that should work at coreos/ignition#1790. Could you include the Ignition PR into this one so we can do further testing?

@pothos
Copy link
Member Author

pothos commented Apr 24, 2024

Hello, there is an existing Igntion PR that should work at coreos/ignition#1790. Could you include the Ignition PR into this one so we can do further testing?

This needs to be reworked first and we have to drop the afterburn integration in Flatcar as the afterburn PR relies on cloud-init userdata and because Flatcar will run coreos-cloudinit anyway if it doesn't see Ignition user-data we would have it processed twice. For the network config that can be quite confusing because the afterburn network unit would only support a subset.

@pothos pothos force-pushed the kai/proxmox-support branch 2 times, most recently from 64b0e74 to 7c833ba Compare May 6, 2024 13:19
@pothos
Copy link
Member Author

pothos commented May 6, 2024

Triggered a new build with the Ignition PR included

@arcln
Copy link

arcln commented May 27, 2024

@pothos hey, it looks like the build never started, can you take a look please ? (cc @plgueugnon)

@tormath1
Copy link
Contributor

@pothos hey, it looks like the build never started, can you take a look please ? (cc @plgueugnon)

@arcln hey, pothos is AFK for now. I'll take over this PR. A CI build has been triggered :)

@tormath1
Copy link
Contributor

@arcln
Copy link

arcln commented May 29, 2024

Thank you, I tried the image and it didn't work because of a problem in the ignition PR (see coreos/ignition#1790 (comment)). Can you please run a new build when the PR is fixed ? Thanks

@tormath1
Copy link
Contributor

Thank you, I tried the image and it didn't work because of a problem in the ignition PR (see coreos/ignition#1790 (comment)). Can you please run a new build when the PR is fixed ? Thanks

@arcln ah I see, I already got this issue once. I started a new build with an updated patch: https://github.com/flatcar/scripts/pull/1783/files#diff-c65e2140094c80c4b4ce5c7c8494b6e4e72b78ef0692d236ffee1fb3932e11c5R157

@arcln
Copy link

arcln commented May 30, 2024

great. it seems that the build needs approval once again @tormath1

@tormath1
Copy link
Contributor

@arcln it builds directly on our Jenkins (github actions only build for qemu targets) - I'll let you know once it's done.

@tormath1
Copy link
Contributor

@arcln image is available here: http://bincache.flatcar-linux.net/images/amd64/9999.0.102+kai-proxmox-support/flatcar_production_proxmoxve_image.img.bz2

@arcln
Copy link

arcln commented May 30, 2024

after doing some testing it seems to work fine! hostname is set, ssh keys are written properly and the network config is applied. we will now focus on finishing the afterburn PR and we'll be waiting for the ignition PR to be upstreamed.

@tormath1
Copy link
Contributor

tormath1 commented May 30, 2024

after doing some testing it seems to work fine! hostname is set, ssh keys are written properly and the network config is applied. we will now focus on finishing the afterburn PR and we'll be waiting for the ignition PR to be upstreamed.

Awesome, thanks a lot for testing! Any chance to draft what you've done in the flatcar-website repo? To act as a beginning of documentation for users interested to try (in the same spirit as: flatcar/flatcar-website#333)

@abuisine
Copy link

abuisine commented Jun 5, 2024

Awesome, thanks a lot for testing! Any chance to draft what you've done in the flatcar-website repo? To act as a beginning of documentation for users interested to try (in the same spirit as: flatcar/flatcar-website#333)

Here is a proposition : flatcar/flatcar-website#337

@abuisine
Copy link

abuisine commented Jun 5, 2024

@arcln ah I see, I already got this issue once. I started a new build with an updated patch: https://github.com/flatcar/scripts/pull/1783/files#diff-c65e2140094c80c4b4ce5c7c8494b6e4e72b78ef0692d236ffee1fb3932e11c5R157

For the record the issue has been fixed 2 hours ago : coreos/ignition#1790
To be tested :)

This uses coreos/afterburn#1023 and
coreos/ignition#1790 to provide
Proxmox images.

This pulls in flatcar/bootengine#91
and flatcar/init#115 to run afterburn for
hostname, network, SSH key, and metadata attribute setup. The afterburn
support for the SSH key and hostname parses the user-data when it's
cloud-init. The coreos-cloudinit support is not there but can be added
in addition: We need to add a new provider that varies from the existing
config drive support because the file is called user-data and not
user_data, and it needs to look for a filesystem label cidata and not
config-2.
@tormath1
Copy link
Contributor

@arcln
Copy link

arcln commented Jun 11, 2024

So I tried the image, it is much easier to get running because I can just import it from proxmox gui instead of using command line etc.

The image boots fine, however afterburn does not seem to be invoked. Hostname and ssh keys are not set. By looking at the boot log, I can see Flatcar metadata agent was skipped because no trigger condition check were met

Is the OEM ID properly set on this image?

@tormath1 tormath1 added the main label Jun 11, 2024
@tormath1
Copy link
Contributor

tormath1 commented Jun 12, 2024

So I tried the image, it is much easier to get running because I can just import it from proxmox gui instead of using command line etc.

The image boots fine, however afterburn does not seem to be invoked. Hostname and ssh keys are not set. By looking at the boot log, I can see Flatcar metadata agent was skipped because no trigger condition check were met

Is the OEM ID properly set on this image?

@arcln yes, I checked the OEM ID is not passed when booting ISO images. Before going further, I'm wondering if it makes sense to provide ISO images for Proxmox? From what I read in your documentation, you create a VM using the image but using an ISO it means that one would need to install Flatcar to a disk provided via the UI.

Which gives two options:

  1. Boot with current Flatcar ISO and install Flatcar on disk with flatcar-install script (like we're doing for PXE booting)
  2. Ship the qcow image and import it via proxmox CLI

In both cases we need to provide a qcow2 image.

@abuisine
Copy link

@arcln yes, I checked the OEM ID is not passed when booting ISO images. Before going further, I'm wondering if it makes sense to provide ISO images for Proxmox? From what I read in your documentation, you create a VM using the image but using an ISO it means that one would need to install Flatcar to a disk provided via the UI.

Which gives two options:

  1. Boot with current Flatcar ISO and install Flatcar on disk with flatcar-install script (like we're doing for PXE booting)
  2. Ship the qcow image and import it via proxmox CLI

In both cases we need to provide a qcow2 image.

qcow makes far more sense from our point of view as it is compatible with either vm templates in ProxmoxVE or terraform on the fly upload.

@tormath1
Copy link
Contributor

@arcln yes, I checked the OEM ID is not passed when booting ISO images. Before going further, I'm wondering if it makes sense to provide ISO images for Proxmox? From what I read in your documentation, you create a VM using the image but using an ISO it means that one would need to install Flatcar to a disk provided via the UI.
Which gives two options:

  1. Boot with current Flatcar ISO and install Flatcar on disk with flatcar-install script (like we're doing for PXE booting)
  2. Ship the qcow image and import it via proxmox CLI

In both cases we need to provide a qcow2 image.

qcow makes far more sense from our point of view as it is compatible with either vm templates in ProxmoxVE or terraform on the fly upload.

Then we're good on this side, we now just need for upstream PRs to be reviewed / merged. In the documentation we will mention the various option to install Flatcar on Proxmox:

  1. As you mentioned, via Terraform
  2. Via the graphical UI using the Flatcar ISO image + flatcar-install
  3. Via the proxmox CLI to create the vm and attach an existing disk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ⚒️ In Progress
4 participants