-
Notifications
You must be signed in to change notification settings - Fork 35
Refactor Pulp repo definitions and add more Pulp documentation #760
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
Changes from 19 commits
134b627
86f93ed
a9e6959
15579c3
5c39a06
57784b7
2e3c4fd
4aa9fee
dd52e90
4854903
c8635bb
8f438b1
d463fed
530ecf7
7a0eab3
305a057
1b4c867
767addd
8ad6869
b5b3b39
244a9ee
32278e7
a63fa1f
4580c2e
4d412ec
1405f3d
dff68b4
7253ad0
f5f2c0b
ab2cfdf
edb4e12
412baed
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,46 @@ | ||
dnf_repos | ||
========= | ||
|
||
Modifies repo definitions for repofiles in `/etc/yum.repos.d` to point to snapshots in StackHPC's Ark Pulp server. | ||
wtripp180901 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
Requirements | ||
------------ | ||
|
||
Requires Ark credentials. | ||
wtripp180901 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
Role Variables | ||
-------------- | ||
|
||
Variables in this role are also required by `pulp_site` so set in | ||
`environments/common/inventory/groups_vars/all/dnf_repos.yml`. See that file for detailed default values. | ||
|
||
- `dnf_repos_all`: Dict of dicts containing information to construct URLs for timestamped repos from Ark for each Rocky version. For example: | ||
|
||
``` | ||
dnf_repos_all: | ||
appstream: # yum_repository:name | ||
wtripp180901 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
'8.10': # ansible_distribution_version or ansible_distribution_major_version | ||
repo_file: Rocky-AppStream # yum_repository: file | ||
# repo_name: # optional, override yum_repository:name | ||
pulp_path: rocky/8.10/AppStream/x86_64/os | ||
wtripp180901 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
pulp_timestamp: 20250614T013846 | ||
# pulp_content_url: # optional, dnf_repos_pulp_content_url | ||
'9.6': | ||
... | ||
``` | ||
- `dnf_repos_default`: Appliance default repos to use Ark snapshots for. Follows same format as | ||
`dnf_repos_all`, but includes top level keys to allow repos to be conditionally included in | ||
`dnf_repos_all`. See `environments/common/inventory/group_vars/all/dnf_repos.yml` and | ||
`environments/common/inventory/group_vars/all/timestamps.yml` for full templating logic. | ||
- `dnf_repos_extra`: Additional repos to use Ark snapshots for. Follows same format as | ||
`dnf_repos_all`. Defaults to `{}` | ||
- `dnf_repos_no_epel`: Dict of all repos included in `dnf_repos_all` excluding | ||
`epel`, used to prevent conflicts with repofile installed by `epel-release` | ||
- `dnf_repos_default_epel`: Dict of repos objects following same format as `dnf_repos_all` but only | ||
including `epel` repo. | ||
- `dnf_repos_pulp_content_url`: Optional str. Content URL of Pulp server to use Ark snapshots from. | ||
Should be overriden if using local Pulp server instead of upstream Ark Pulp (See | ||
wtripp180901 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
`ansible/roles/pulp_site`). Defaults to `{{ appliances_pulp_url }}/pulp/content` | ||
wtripp180901 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
- `dnf_repos_username`: Optional str. Username for Ark. Should be set if using upstream StackHPC Ark | ||
Pulp server, but omitted if using local Pulp server (see `ansible/roles/pulp_site`) | ||
- `dnf_repos_password`: Optional str. Password for Ark. Should be set if using upstream StackHPC Ark | ||
Pulp server, but omitted if using local Pulp server (see `ansible/roles/pulp_site`) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,8 @@ | ||
dnf_repos_default: {} # see environments/common/inventory/group_vars/all/timestamps.yml | ||
dnf_repos_extra: {} | ||
dnf_repos_no_epel: {} | ||
dnf_repos_all: {} | ||
dnf_repos_default_epel: {} | ||
dnf_repos_pulp_content_url: "{{ appliances_pulp_url }}/pulp/content" | ||
dnf_repos_username: "{{ omit }}" | ||
dnf_repos_password: "{{ omit }}" | ||
|
||
dnf_repos_filenames: | ||
'8': | ||
baseos: 'Rocky-BaseOS' | ||
appstream: 'Rocky-AppStream' | ||
crb: 'Rocky-PowerTools' | ||
extras: 'Rocky-Extras' | ||
grafana: 'grafana' | ||
'9': | ||
baseos: 'rocky' | ||
appstream: 'rocky' | ||
crb: 'rocky' | ||
extras: 'rocky-extras' | ||
grafana: 'grafana' | ||
|
||
dnf_repos_version_filenames: "{{ dnf_repos_filenames[ansible_distribution_major_version] }}" | ||
|
||
# epel installed separately | ||
dnf_repos_default_repolist: | ||
- file: "{{ dnf_repos_version_filenames.baseos }}" | ||
name: baseos | ||
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.baseos[ansible_distribution_version] | appliances_repo_to_subpath }}" | ||
- file: "{{ dnf_repos_version_filenames.appstream }}" | ||
name: appstream | ||
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.appstream[ansible_distribution_version] | appliances_repo_to_subpath }}" | ||
- file: "{{ dnf_repos_version_filenames.crb }}" | ||
name: "{{ 'powertools' if ansible_distribution_major_version == '8' else 'crb' }}" | ||
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.crb[ansible_distribution_version] | appliances_repo_to_subpath }}" | ||
- file: "{{ dnf_repos_version_filenames.extras }}" | ||
name: extras | ||
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.extras[ansible_distribution_version] | appliances_repo_to_subpath }}" | ||
- file: ceph | ||
name: Ceph | ||
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.ceph[ansible_distribution_major_version] | appliances_repo_to_subpath }}" | ||
- file: "{{ dnf_repos_version_filenames.grafana }}" | ||
name: grafana | ||
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.grafana[ansible_distribution_major_version] | appliances_repo_to_subpath }}" | ||
|
||
dnf_repos_openhpc_repolist: | ||
- name: OpenHPC | ||
file: OpenHPC | ||
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.openhpc_base[ansible_distribution_major_version] | appliances_repo_to_subpath }}" | ||
- name: OpenHPC-updates | ||
file: OpenHPC | ||
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.openhpc_updates[ansible_distribution_major_version] | appliances_repo_to_subpath }}" | ||
|
||
dnf_repos_extra_repolist: [] | ||
dnf_repos_repolist: "{{ dnf_repos_default_repolist + (dnf_repos_openhpc_repolist if (openhpc_install_type | default('ohpc')) == 'ohpc' else []) + dnf_repos_extra_repolist }}" | ||
|
||
dnf_repos_epel_baseurl: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.epel[ansible_distribution_major_version] | appliances_repo_to_subpath }}" | ||
dnf_repos_epel_description: "epel" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
pulp_site | ||
========= | ||
|
||
Contains playbooks to deploy a Pulp server and sync its content with repo snapshots in | ||
StackHPC's Ark Pulp server | ||
|
||
Requirements | ||
------------ | ||
|
||
Requires Ark credentials. The VM you are deploying Pulp on must allow ingress on `pulp_site_port` | ||
wtripp180901 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
and not be externally accessible (as the Pulp server's content is unauthenticated). | ||
|
||
Role Variables | ||
-------------- | ||
|
||
- `pulp_site_url`: Required str. The base url from which Pulp content will be hosted. Defaults to `{{ appliances_pulp_url }}`. | ||
Value to set for ``appliances_pulp_url` will be generated and output by the deploy.yml playbook. | ||
- `pulp_site_port`: Optional str. Port to serve Pulp server on. Defaults to `8080`. | ||
- `pulp_site_username`: Optional str. Admin username for the Pulp server. Defaults to `admin`. | ||
- `pulp_site_password`: Required str. Admin password for the Pulp server. Defaults to `{{ vault_pulp_admin_password }}`. | ||
- `pulp_site_upstream_username`: Required str. Username for accessing content from the upstream Ark Pulp server. | ||
- `pulp_site_upstream_password`: Required str. Password for upstream Ark Pulp server. | ||
- `pulp_site_upstream_content_url`: Optional str. Content URL of upstream Ark Pulp. Defaults to `https://ark.stackhpc.com/pulp/content`. | ||
- `pulp_site_install_dir`: Optional str. Directory on Pulp host to install config and persistent state to be mounted into Pulp container. Defaults to `/home/rocky/pulp`. | ||
- `pulp_site_target_facts`: Optional str. The `ansible_facts` of a host which will be pulling from your Pulp server, allowing the role to auto-discover the necessary repos to pull. | ||
defaults to `{{ hostvars[groups['pulp'][0]]['ansible_facts'] }}`. | ||
- `pulp_site_target_distribution_version`: Optional str. The Rocky Linux minor release to sync repos from Ark for. Defaults to `{{ pulp_site_target_facts['distribution_version'] }}`. | ||
- `pulp_site_rpm_repo_defaults`: Optional dict. Contains key value pairs for fields which are common to all repo definition in `pulp_site_rpm_repos`. Includes values for `remote_username`, | ||
`remote_password` and `policy` by default. | ||
- `pulp_site_rpm_repos`: Optional list of dicts. List of repo definitions in format required by the `stackhpc.pulp.pulp_repository`. Defaults to modified versions of repos defined in | ||
`dnf_repos_all`. | ||
- `pulp_site_rpm_publications`: Optional list of dicts. List of repo definitions in format required by the `stackhpc.pulp.pulp_publication`. Defaults to list of publications for repos defined in | ||
`dnf_repos_all`. | ||
- `pulp_site_rpm_distributions`: Optional list of dicts. List of repo definitions in format required by the `stackhpc.pulp.pulp_distribution`. Defaults to list of distributions for repos defined in | ||
`dnf_repos_all`. |
Uh oh!
There was an error while loading. Please reload this page.