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

Expose flatcar-install OEM parameter #1302

Merged
merged 1 commit into from
Apr 1, 2023
Merged

Expose flatcar-install OEM parameter #1302

merged 1 commit into from
Apr 1, 2023

Conversation

MLNW
Copy link

@MLNW MLNW commented Feb 27, 2023

By exposing this parameter it is possible to install OEM specific software during the flatcar-install invocation.

Testing

I installed a Kubernetes cluster on vSphere VMs and used the newly exposed flag to install the vmware OEM files. Now vSphere no longer complains that the vSphere tools are not installed and it is possible to see the assigned hostname and IPs in the vSphere UI. This also enables the vSphere Terraform provider to wait for IP assignment.

When using cached_install = true Matchbox also needs to serve these files otherwise the installer.service fails:

https://${channel}.release.flatcar-linux.net/amd64-usr/${version}/flatcar_production_${oem_type}_image.bin.bz2
https://${channel}.release.flatcar-linux.net/amd64-usr/${version}/flatcar_production_${oem_type}_image.bin.bz2.sig

@MLNW
Copy link
Author

MLNW commented Feb 27, 2023

@dghubble the last part of above description complicates the merge of this PR. I would propose adding an option to the matchbox/get-flatcar script that downloads all provided oem_type files. Then users may deploy Matchbox with a supported set of oem_types which may be used in conjunction with the newly exposed flag when deploying a baremetal cluster with Typhoon. If you agree I will create a PR for that as well.

@MLNW MLNW marked this pull request as ready for review February 27, 2023 13:09
Copy link
Member

@dghubble dghubble left a comment

Choose a reason for hiding this comment

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

Setting the flatcar-linux OEM flag is ok. I don't use VMWare or the others so I won't validate them, but this change can just be oriented around allowing the parameter to be set. Its up to Flatcar Linux what that does, since I don't want OEM specific features creeping into the distro itself.

Can you also dig up more info from the Flatcar Linux folks about the OEMs they support / will support?

variable "oem_type" {
type = string
default = ""
description = "An OEM type to install with flatcar-install."
Copy link
Member

Choose a reason for hiding this comment

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

Can you include the list of valid Flatcar OEMs in the description, like (e.g. a, b, c) and link to Flatcar Linux docs

Copy link
Author

Choose a reason for hiding this comment

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

I wrote some more documentation here. PTAL and let me know if its okay.

@dghubble
Copy link
Member

dghubble commented Mar 1, 2023

I don't think the Matchbox script needs an update. Folks wanting OEM specific stuff can download it.

@MLNW
Copy link
Author

MLNW commented Mar 2, 2023

I don't think the Matchbox script needs an update. Folks wanting OEM specific stuff can download it.

We use a systemd unit like this:

    - name: "download-flatcar.service"
      enabled: true
      contents: |
        [Unit]
        Description=Download Flatcar image
        Wants=systemd-resolved.service
        After=clone-matchbox.service
        Before=matchbox.service

        [Service]
        Type=oneshot
        RemainAfterExit=true

        ExecStart=/usr/bin/bash -c '/usr/bin/test -d /opt/matchbox.opt/matchbox/assets || /opt/matchbox/scripts/get-flatcar ${flatcar_channel} ${flatcar_version} /opt/matchbox.opt/matchbox/assets'

        # WORKAROUND: Needed to support installing VMWare tools
        ExecStartPost=/usr/bin/curl \
          --output-dir /opt/matchbox.opt/matchbox/assets/flatcar/${flatcar_version} \
          -O https://${flatcar_channel}.release.flatcar-linux.net/amd64-usr/${flatcar_version}/flatcar_production_vmware_raw_image.bin.bz2
        ExecStartPost=/usr/bin/curl \
          --output-dir /opt/matchbox.opt/matchbox/assets/flatcar/${flatcar_version} \
          -O https://${flatcar_channel}.release.flatcar-linux.net/amd64-usr/${flatcar_version}/flatcar_production_vmware_raw_image.bin.bz2.sig

        [Install]
        WantedBy=matchbox.service

@MLNW MLNW requested a review from dghubble March 6, 2023 09:27
By exposing this parameter it is possible to install OEM specific software
during the `flatcar-install` invocation.
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