Add ability to export yum repositories to disk
As a user, I would like Katello to export yum reposoties to disk. This includes both full and incremental date-based exports.
For this feature, the export will just be a dump to disk. Wrapping in tgz or ISO can be added later.
Deliverables for this feature are:
- /export API for kicking off exports of yum repos which includes an optional "since" field for the incremental. If no date is given, perform a full export.
- API wiring to kick off Pulp yum repo exports using the export distributor
- any needed migrations to create export distributors for existing yum repos
- a configurable on-disk export destination, set in the Katello tab under /settings.
The output of this task is to be able to hit the katello API and create an on-disk yum export.
Fixes #12446 - Enable exports of yum repo data
The pulp export distributor was previously not enabled by Katello. This patch
does the following:
- enable the export distributor when creating new yum repos
- creates a new export_products role for the export API call
- add a rake task to add the export distributor to existing yum repos
- create a new katello/api/v2/repositories/:repo_id/export API endpoint that
kicks off a pulp export task, with optional "since" paramerter.
- adds a few dynflow tasks related to exports and adding new distributors. The
dynflow task also allows for setting a suffix on the export, so multiple repos
can be exported to the same location.
This patch assumes you have a `/tmp/katello-repo-exports` dir. To set it up:
- `sudo mkdir /tmp/katello-repo-exports`
- `sudo chown apache.apache /tmp/katello-repo-exports`
- `sudo chcon -v --type=httpd_sys_rw_content_t /tmp/katello-repo-exports`
Note that the pulp repo creation call was altered to include the export
distributor, thus requiring VCR tests to be re-recorded.