-
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 all 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,32 @@ | ||
| Pulp Role | ||
| ========= | ||
|
|
||
| Deploys and manages [Pulp](https://pulpproject.org/) as Podman quadlets. | ||
|
|
||
| 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_import_paths`: Paths Pulp can use for content imports (default: `[/var/lib/pulp/sync_imports, /var/lib/pulp/imports]`) | ||
| - `pulp_export_paths`: Paths Pulp can use for content exports (default: `[/var/lib/pulp/exports]`) | ||
| - `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_import_paths`: `--content-import-path` (may be specified multiple times) | ||
| - `pulp_export_paths`: `--content-export-path` (may be specified multiple times) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,8 +10,12 @@ pulp_worker_count: "{{ [8, ansible_facts['processor_nproc']] | min }}" | |
| pulp_content_service_worker_count: "{{ (2 * ([8, ansible_facts['processor_nproc']] | min)) + 1 }}" | ||
| pulp_api_service_worker_count: "{{ ([4, ansible_facts['processor_nproc']] | min) + 1 }}" | ||
|
|
||
| pulp_volumes: | ||
| - /var/lib/pulp:/var/lib/pulp | ||
| pulp_volumes: >- | ||
| {{ | ||
| ['/var/lib/pulp:/var/lib/pulp'] + | ||
| (pulp_import_paths | map('regex_replace', '^(.+)$', '\1:\1') | list) + | ||
|
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. What are these regexs doing?
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. lets take one item from So after |
||
| (pulp_export_paths | map('regex_replace', '^(.+)$', '\1:\1') | list) | ||
| }} | ||
|
|
||
| pulp_api_container_name: pulp-api | ||
| pulp_content_container_name: pulp-content | ||
|
|
@@ -22,6 +26,10 @@ pulp_pulp_url: "http://{{ ansible_facts['fqdn'] }}:24817" | |
|
|
||
| pulp_enable_analytics: false | ||
|
|
||
| # pulp import/export paths | ||
|
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 is redundant. |
||
| pulp_import_paths: ["/var/lib/pulp/sync_imports", "/var/lib/pulp/imports"] | ||
| pulp_export_paths: ["/var/lib/pulp/exports"] | ||
|
ehelms marked this conversation as resolved.
|
||
|
|
||
| pulp_default_plugins: | ||
| - pulp_certguard | ||
| - pulp_file | ||
|
|
@@ -66,6 +74,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_import_paths }} | ||
| PULP_ALLOWED_EXPORT_PATHS: >- | ||
| {{ pulp_export_paths }} | ||
|
|
||
| pulp_settings_env: "{{ pulp_settings_database_env | ansible.builtin.combine(pulp_settings_other_env) }}" | ||
|
|
||
|
|
||
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.
You could define these in a file like https://github.com/theforeman/foremanctl/blob/master/src/playbooks/_database_connection/metadata.obsah.yaml and then include that file in both deploy and deploy-dev.