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

Add metadata support for architectures #30

Open
yakatz opened this issue Jun 4, 2024 · 2 comments
Open

Add metadata support for architectures #30

yakatz opened this issue Jun 4, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@yakatz
Copy link

yakatz commented Jun 4, 2024

Use Case

Non-x86-based architectures are becoming more popular, ARM64 chief among them. It was possible to infer architecture information from OS version for some operating systems, but it is becoming increasingly common to run the same operating systems on multiple architectures (supported by most Linux distributions and Windows). Some architectures may not have all packages available or may require other parameters or tuning, so it makes sense to flag architecture support. Puppet modules already include metadata support information for operating system version and it would make sense to extend this to include architectures.

Describe the Solution You Would Like

The module metadata schema can be extended to support architecture information in a number of different backwards-compatible ways (this needs to be per-OS version)

Example: Supports all architectures for Debian 11, but only x64 for Debian 10

  "operatingsystem_support": [
    {
      "operatingsystem": "Debian",
      "operatingsystemrelease": [
        {"10": "x86_64"},
        "11"
      ]
    }
  ],

Example: Supports all architectures for Debian 11, but only x64 for Debian 10

  "operatingsystem_support": [
    {
      "operatingsystem": "Debian",
      "architecture": "x86_64",
      "operatingsystemrelease": [
        "10",
        "11"
      ]
    },
    {
      "operatingsystem": "Debian",
      "architecture": "arm64",
      "operatingsystemrelease": [
        "11"
      ]
    }
  ],

Example: Global - supports only ARM64 for all OSes

  "architecture_support": [
    "arm64"
  ],
  "operatingsystem_support": [
    {
      "operatingsystem": "Debian",
      "operatingsystemrelease": [
        "10",
        "11"
      ]
    }
  ],

There could be support for a negative qualifier, but that seems less likely to be used:

  "operatingsystem_support": [
    {
      "operatingsystem": "Debian",
      "operatingsystemrelease": [
        {"10": "!arm64"},
        "11"
      ]
    }
  ],

Describe Alternatives You've Considered

Modules including internal fail() calls for unsupported architectures - this results in a suboptimal user experience

@yakatz yakatz added the enhancement New feature or request label Jun 4, 2024
@skarwaperforce
Copy link

@yakatz a naive question I have around this is, what percentage (rough guess) are modules which are dependent on the underlying architecture of the platform? Would Forge users want this information?

@yakatz
Copy link
Author

yakatz commented Jun 21, 2024

If I have some time over the weekend, I might try to estimate for some of the top modules. I am also working on adding factsets to facterdb for ARM64 on supported OSes so they can run spec tests. (I don't have any RISC-V hardware to test.)

The issue for most modules would be whether a package is available for the architecture. Many applications are still only built for x86_64, but ARM64 and RISC-V are getting more popular, so I think it would be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants