Galaxy: Make platforms more like tags

Created on 13 Oct 2017  路  5Comments  路  Source: ansible/galaxy

_From @chouseknecht on October 21, 2016 5:43_

Problem

The platform list continues to grow. Requests to add additional operating systems and versions are never-ending, and we perpetually fail to complete them in a timely fashion.

The current incarnation of platform does not really fit network operating systems. In many cases there either is no version or there are many, many versions, and in both cases we have adopted using _any_ for the version.

It also fails to fit container roles. For example, Container App roles don't have a single operating system or platform. If a platform maps to a container's base image, Container Apps consist of many containers, so there may be multiple base images involved. This doesn't fit, and it's confusing.

Another issue is the list of platforms we manifest in the meta/main.yml template when the ansible-galaxy init command executes. The resulting list is unmanageable.

And finally, creating the meta/main.yml template requires a Galaxy API request. This is undesirable if the user does not have internet access or the Galaxy server happens to be down.

Proposal

Make _platforms_ behave more like _tags_ by doing the following:

  • Allow users to provide a list of platform values they think are appropriate
  • Modify the import process to accept a format of Platform_Name:Version, and allow :Version to be optional. This is in keeping with the Docker image format.
  • Completely remove the list of platform values from the meta/main.yml template, replacing it with "platforms: []" and appropriating commenting with examples. This naturally removes the API call.
  • Modify the Galaxy data model to no longer validate platform names and versions, and allow version to be optional.

_Copied from original issue: ansible/galaxy-issues#206_

typenhancement

Most helpful comment

Resolving this issue would also resolve the current lack of support for recent Amazon Linux platforms, thus I won't create separate issues for these:

For this planned solution to work well, consistent naming is essential. This could be encouraged through examples or a brief guide how to find existing platforms.

All 5 comments

@gregdek thoughts or concerns?

I'm hoping to prevent us from going here: https://github.com/ansible/ansible/issues/18109 I think we can make the _platforms experience_ a much better one.

_From @gregdek on October 21, 2016 15:16_

I'm inclined to agree. Seems clear that by mandating certain platforms, we've become a bottleneck.

What we lose is the ability to enforce uniformity -- but you can't have everything. Means that our fuzzy search may have to be a bit better, and also means that role owners will have incentive to make sure the platforms they choose are easily discoverable.

@gregdek cool. i'll get started on this, since I have my Galaxy hat on this week.

Resolving this issue would also resolve the current lack of support for recent Amazon Linux platforms, thus I won't create separate issues for these:

For this planned solution to work well, consistent naming is essential. This could be encouraged through examples or a brief guide how to find existing platforms.

Since I basically have to file a bug on basically every import I do: Are there any plans to improve this situation?

Was this page helpful?
0 / 5 - 0 ratings