Story #6929
closedStory #6875: [Meta] Integrate with Bandersnatch
As a User, I can configure Pulp Python remotes using a Bandersnatch config file
100%
Description
The Bandersnatch tool for creating local mirrors of PyPI has a straightforwards config file format which is much more user friendly compared to creating a complex JSON configuration object as you need to do with Pulp. It would be ideal if Pulp was able to parse these config files as-is and create a PythonRemote from them.
https://bandersnatch.readthedocs.io/en/latest/filtering_configuration.html
Bandersnatch's existing configuration parsing code should be used to parse the config files (we should not do parsing ourselves), and the settings which are relevant to Pulp should be stored in some appropriate format on the PythonRemote object.
Not all fields able to be expressed in the Bandersnatch config file are applicable to Pulp - they should be ignored. Examples of this include (but not limited to):
- directory https://bandersnatch.readthedocs.io/en/latest/mirror_configuration.html#directory
- json https://bandersnatch.readthedocs.io/en/latest/mirror_configuration.html#json
- logging configurations https://bandersnatch.readthedocs.io/en/latest/mirror_configuration.html#log-config
Regex filtering support should also likely be ignored for the initial implementation.
In keeping with this change, we will likely want to make changes to the schema and database representation of PythonRemote to better match the Bandersnatch representation, such as moving from a list of dicts for "project specification" to a list of strings.
Related issues
Updated by dalley over 4 years ago
- Subject changed from Impleme to Implement support for Bandersnatch config file format for expressing sync settings
- Description updated (diff)
Updated by dalley over 4 years ago
- Related to Story #4690: Implement package locking / digest specification added
Updated by dalley over 4 years ago
- Tracker changed from Issue to Story
- Subject changed from Implement support for Bandersnatch config file format for expressing sync settings to As a User, I can configure Pulp Python remotes using a Bandersnatch config file
- % Done set to 0
Added by gerrod over 4 years ago
Updated by gerrod over 4 years ago
- Status changed from NEW to MODIFIED
- % Done changed from 0 to 100
Applied in changeset 6a7109b41c5fb144149629321d922e346c2d0831.
New endpoint /from_bandersnatch/ for /remotes/python/python/ that creates a Python remote through uploading a Bandersnatch config
fixes #6929 https://pulp.plan.io/issues/6929