-
Notifications
You must be signed in to change notification settings - Fork 29
Pulp import export support #455
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
base: master
Are you sure you want to change the base?
Changes from 3 commits
8c7ddb7
090e0ad
52092e3
27c6311
a1733c5
59a42fb
4ffabc2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,34 @@ | ||||||
| Pulp Role | ||||||
| ========= | ||||||
|
|
||||||
| Deploys and manages [Pulp](https://pulpproject.org/) as Podman containers. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| Variables | ||||||
| --------- | ||||||
| - `pulp_container_image`: Container image to use for Pulp (default: `quay.io/foreman/pulp`) | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am wary of storing defaults in the documentation here. The code can show those and reduce our overhead.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was hoping someone would comment on the docs. I tried to follow similar patterns from the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like the having of a README. I can see now that this is following roughly the outline from the hammer role. I think as long as we are consistent in the structure then keep it.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And we should define that roughly in https://github.com/theforeman/foremanctl/blob/master/docs/developer/playbooks-and-roles.md#shared-metadata-fragments You do not have to do that here in this PR. I am noting this as a reminder. |
||||||
| - `pulp_container_tag`: Container image tag (default: `"3.73"`) | ||||||
| - `pulp_registry_auth_file`: Path to the registry authentication file (default: `/etc/foreman/registry-auth.json`) | ||||||
| - `pulp_worker_count`: Number of Pulp workers (default: min of 8 or CPU count) | ||||||
| - `pulp_content_origin`: URL for the Pulp content service (default: `http://{{ fqdn }}:24816`) | ||||||
| - `pulp_pulp_url`: URL for the Pulp API service (default: `http://{{ fqdn }}:24817`) | ||||||
| - `pulp_volumes`: Volume mounts for Pulp containers (default: `/var/lib/pulp:/var/lib/pulp`) | ||||||
| - `pulp_enable_analytics`: Enable Pulp analytics (default: `false`) | ||||||
| - `pulp_default_import_path`: Default paths Pulp can use for content imports (default: `[/var/lib/pulp/imports]`) | ||||||
| - `pulp_default_export_path`: Default paths Pulp can use for content exports (default: `[/var/lib/pulp/exports]`) | ||||||
| - `pulp_extra_import_paths`: Additional paths Pulp can use for content imports (default: `[]`) | ||||||
| - `pulp_extra_export_paths`: Additional paths Pulp can use for content exports (default: `[]`) | ||||||
| - `pulp_plugins`: Additional Pulp plugins to enable (default: `[pulp_container, pulp_rpm]`) | ||||||
| - `pulp_database_name`: Name of the Pulp database (default: `pulp`) | ||||||
| - `pulp_database_user`: Database user (default: `pulp`) | ||||||
| - `pulp_database_host`: Database host (default: `localhost`) | ||||||
| - `pulp_database_port`: Database port (default: `5432`) | ||||||
| - `pulp_database_password`: Database password (required, no default) | ||||||
| - `pulp_database_ssl_mode`: Database SSL mode (default: `disabled`) | ||||||
| - `pulp_database_ssl_ca`: Path to the database SSL CA certificate on the control node (default: empty) | ||||||
|
|
||||||
| Usage Inside foremanctl | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure this detail makes sense at this level. I'd rather see a section in the deployment document around content or add a content document. |
||||||
| ----------------------- | ||||||
| When used as part of `foremanctl`, the variables are setup as the following | ||||||
| - `pulp_worker_count`: `--pulp-worker-count` | ||||||
| - `pulp_extra_import_paths`: `--pulp-extra-import-path` (may be used specified multiple times) | ||||||
| - `pulp_extra_export_paths`: `--pulp-extra-export-path` (may be used specified multiple times) | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,13 @@ pulp_pulp_url: "http://{{ ansible_facts['fqdn'] }}:24817" | |
|
|
||
| pulp_enable_analytics: false | ||
|
|
||
| pulp_default_import_path: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This says
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is a good idea. So instead of 4 variables (2 default, 2 lists to hold user passed values). We could just have 2 lists both by default containing the default path and just append user passed values to these lists. Am I understanding this correctly? |
||
| - /var/lib/pulp/imports | ||
| pulp_default_export_path: | ||
| - /var/lib/pulp/exports | ||
| pulp_extra_import_paths: [] | ||
| pulp_extra_export_paths: [] | ||
|
|
||
| pulp_default_plugins: | ||
| - pulp_certguard | ||
| - pulp_file | ||
|
|
@@ -66,6 +73,10 @@ pulp_settings_other_env: | |
| PULP_CONTENT_WORKERS: "{{ pulp_content_service_worker_count }}" | ||
| PULP_TOKEN_AUTH_DISABLED: "true" | ||
| PULP_FLATPAK_INDEX: "true" | ||
| PULP_ALLOWED_IMPORT_PATHS: >- | ||
| {{ pulp_default_import_path + pulp_extra_import_paths }} | ||
| PULP_ALLOWED_EXPORT_PATHS: >- | ||
| {{ pulp_default_export_path + pulp_extra_export_paths }} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Locally I have this: These would be the default paths.. |
||
|
|
||
| pulp_settings_env: "{{ pulp_settings_database_env | ansible.builtin.combine(pulp_settings_other_env) }}" | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,22 @@ | |
| - tmp | ||
| - assets | ||
| - media | ||
| - imports | ||
| - exports | ||
|
|
||
| - name: Create extra import directories | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume these would have to be mounted into the container?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I didn't think about that, I will add this |
||
| ansible.builtin.file: | ||
| path: "{{ item }}" | ||
| state: directory | ||
| mode: "0755" | ||
| loop: "{{ pulp_extra_import_paths }}" | ||
|
|
||
| - name: Create extra export directories | ||
| ansible.builtin.file: | ||
| path: "{{ item }}" | ||
| state: directory | ||
| mode: "0755" | ||
| loop: "{{ pulp_extra_export_paths }}" | ||
|
|
||
| - name: Create DB password secret | ||
| containers.podman.podman_secret: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user doesn't care that it's Pulp right? How about:
What makes them "extra" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I used extra because users can add extra or additional import/export paths. Would you prefer something other than extra?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to remember, I think the installer uses this "extra" terminology.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, it uses
additional. So there are the "you can use these out of the box paths" and then there are "user has some setup, they want to use these paths and accept the requirements to make this work".