From acdd68be69fc319c8ba288a1233d61f775c69c89 Mon Sep 17 00:00:00 2001 From: Fabricio Aguiar Date: Mon, 19 Jul 2021 22:53:57 -0300 Subject: [PATCH 1/8] Update docs links [noissue] --- README.md | 2 +- docs/letsencrypt.md | 2 +- docs/quickstart.md | 3 ++- galaxy.yml | 2 +- mkdocs.yml | 2 +- roles/pulp_common/tasks/main.yml | 2 +- roles/pulp_database_config/tasks/main.yml | 2 +- roles/pulp_health_check/README.md | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 16627eb3f..a1a38668d 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Pulp 3 Ansible Installer A collection of roles to install or upgrade Pulp 3. Can also reconfigure or add plugins to an existing install. -See [https://pulp-installer.readthedocs.io](https://pulp-installer.readthedocs.io) for full documentation. +See [https://docs.pulpproject.org/pulp_installer](https://docs.pulpproject.org/pulp_installer/) for full documentation. How to File an Issue diff --git a/docs/letsencrypt.md b/docs/letsencrypt.md index 2a2d93d67..1f9beeab5 100644 --- a/docs/letsencrypt.md +++ b/docs/letsencrypt.md @@ -36,7 +36,7 @@ HTTP 01 verification. The 3rd-party role listed below, [lexa-uw.letsencrypt](https://galaxy.ansible.com/lexa-uw/letsencrypt), is an example. The variables listed below are meant for it, and can serve as a guide for other roles. -You can learn more about the variables on the [roles section](https://pulp-installer.readthedocs.io/en/latest/roles/pulp/#role-variables) +You can learn more about the variables on the [roles section](https://docs.pulpproject.org/pulp_installer/roles/pulp_common/#role-variables) 1 - Install the `pulp_installer` collection: ``` diff --git a/docs/quickstart.md b/docs/quickstart.md index 549d21a58..3f2dd99d6 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -31,7 +31,8 @@ they can be set in the playbook. See the Ansible docs for more flexible idiomati Example Playbook for Installing Plugins --------------------------------------- As an example, we are going to write a playbook for installing `pulp_container` and `pulp_rpm`. -You can learn more about the variables on the [roles section](https://pulp-installer.readthedocs.io/en/latest/roles/pulp/#role-variables) + +You can learn more about the variables on the [roles section](https://docs.pulpproject.org/pulp_installer/roles/pulp_common/#role-variables) 1 - Install the `pulp_installer` collection: ``` diff --git a/galaxy.yml b/galaxy.yml index a9cc2e6c8..edd0928bb 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -58,7 +58,7 @@ dependencies: {} repository: https://github.com/pulp/pulp_installer # The URL to any online docs -documentation: https://pulp-installer.readthedocs.io/ +documentation: https://docs.pulpproject.org/pulp_installer/ # The URL to the homepage of the collection/project homepage: https://pulpproject.org/ diff --git a/mkdocs.yml b/mkdocs.yml index aafc2bd6d..1bad839bd 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,7 +2,7 @@ site_name: Pulp Installer site_description: Pulp 3 Ansible Installer site_author: Pulp Team -site_url: https://pulp-installer.readthedocs.io/ +site_url: https://docs.pulpproject.org/pulp_installer/ repo_name: pulp/pulp_installer repo_url: https://github.com/pulp/pulp_installer theme: readthedocs diff --git a/roles/pulp_common/tasks/main.yml b/roles/pulp_common/tasks/main.yml index 24e04d137..558b0be61 100644 --- a/roles/pulp_common/tasks/main.yml +++ b/roles/pulp_common/tasks/main.yml @@ -23,7 +23,7 @@ set it in your variables (e.g. pulp_installer/playbooks/example-use/group_vars/all) and run pulp_installer again. - See https://pulp-installer.readthedocs.io/en/latest/ or + See https://docs.pulpproject.org/pulp_installer/ or pulp_installer/roles/pulp/README.md for more info. loop: - pulp_settings.content_origin diff --git a/roles/pulp_database_config/tasks/main.yml b/roles/pulp_database_config/tasks/main.yml index e127099e5..4e3fd5086 100644 --- a/roles/pulp_database_config/tasks/main.yml +++ b/roles/pulp_database_config/tasks/main.yml @@ -12,7 +12,7 @@ set it in your variables (e.g. pulp_installer/playbooks/example-use/group_vars/all) and run pulp_installer again. - See https://pulp-installer.readthedocs.io/en/latest/ or + See https://docs.pulpproject.org/pulp_installer/ or pulp_installer/roles/pulp/README.md for more info. loop: - pulp_default_admin_password diff --git a/roles/pulp_health_check/README.md b/roles/pulp_health_check/README.md index 84a5206b3..fe0cd516e 100644 --- a/roles/pulp_health_check/README.md +++ b/roles/pulp_health_check/README.md @@ -2,7 +2,7 @@ pulp_health_check ================= Verify if Pulp Services are up and listening. -Note: this role is meant to be run on the host that [pulp_api](https://pulp-installer.readthedocs.io/en/latest/roles/pulp_api/) is run against +Note: this role is meant to be run on the host that [pulp_api](https://docs.pulpproject.org/pulp_installer/roles/pulp_api/) is run against Shared Variables ---------------- From 25d5b7c50e2b1d8f0d118726ff90c88067fe7f95 Mon Sep 17 00:00:00 2001 From: Bruno Rocha Date: Tue, 1 Jun 2021 19:14:07 +0100 Subject: [PATCH 2/8] Add git repo/revision support to core and plugins. When defined `git_url` and `git_revision` will **force** the checkout to specified version before installation of pulpcore and plugins. backport of: #6547 [noissue] --- CHANGES/6547.feature | 1 + molecule/source-dynamic/group_vars/all | 6 +++++ molecule/source-static/group_vars/all | 6 +++++ molecule/source-static/host_vars/debian-10 | 1 + molecule/source-static/prepare.yml | 15 ------------- molecule/source-upgrade/group_vars/all | 6 +++++ molecule/source-upgrade/host_vars/debian-10 | 1 + roles/pulp_common/README.md | 13 +++++++++++ roles/pulp_common/tasks/install_pip.yml | 25 +++++++++++++++++++++ 9 files changed, 59 insertions(+), 15 deletions(-) create mode 100644 CHANGES/6547.feature diff --git a/CHANGES/6547.feature b/CHANGES/6547.feature new file mode 100644 index 000000000..96f63ef5b --- /dev/null +++ b/CHANGES/6547.feature @@ -0,0 +1 @@ +Add git repo and revision to pulcore and plugin installer. diff --git a/molecule/source-dynamic/group_vars/all b/molecule/source-dynamic/group_vars/all index 36340fd7e..ad2e353b5 100644 --- a/molecule/source-dynamic/group_vars/all +++ b/molecule/source-dynamic/group_vars/all @@ -1,6 +1,8 @@ --- pulp_default_admin_password: password pulp_source_dir: '/var/lib/pulp/devel/pulpcore' +pulp_git_url: "https://github.com/pulp/pulpcore" +pulp_git_revision: "master" pulp_install_plugins: # galaxy-ng: # source_dir: "/var/lib/pulp/devel/galaxy_ng" @@ -15,6 +17,8 @@ pulp_install_plugins: # pulp-deb: # source_dir: "/var/lib/pulp/devel/pulp_deb" pulp-file: + git_url: "https://github.com/pulp/pulp_file" + git_revision: "master" source_dir: "/var/lib/pulp/devel/pulp_file" # pulp-gem: # source_dir: "/var/lib/pulp/devel/pulp_gem" @@ -25,6 +29,8 @@ pulp_install_plugins: # pulp-python: # source_dir: "/var/lib/pulp/devel/pulp_python" pulp-rpm: + git_url: "https://github.com/pulp/pulp_rpm" + git_revision: "master" source_dir: "/var/lib/pulp/devel/pulp_rpm" developer_user_home: /var/lib/pulp developer_user: pulp diff --git a/molecule/source-static/group_vars/all b/molecule/source-static/group_vars/all index d9ec7190f..a52fa7966 100644 --- a/molecule/source-static/group_vars/all +++ b/molecule/source-static/group_vars/all @@ -1,6 +1,8 @@ --- pulp_default_admin_password: password pulp_source_dir: '/var/lib/pulp/devel/pulpcore' +pulp_git_url: "https://github.com/pulp/pulpcore" +pulp_git_revision: "master" pulp_api_bind: "unix:/var/run/pulpcore-api/pulpcore-api.sock" pulp_content_bind: "unix:/var/run/pulpcore-content/pulpcore-content.sock" pulp_install_plugins: @@ -17,6 +19,8 @@ pulp_install_plugins: # pulp-deb: # source_dir: "/var/lib/pulp/devel/pulp_deb" pulp-file: + git_url: "https://github.com/pulp/pulp_file" + git_revision: "master" source_dir: "/var/lib/pulp/devel/pulp_file" # pulp-gem: # source_dir: "/var/lib/pulp/devel/pulp_gem" @@ -27,6 +31,8 @@ pulp_install_plugins: # pulp-python: # source_dir: "/var/lib/pulp/devel/pulp_python" pulp-rpm: + git_url: "https://github.com/pulp/pulp_rpm" + git_revision: "master" source_dir: "/var/lib/pulp/devel/pulp_rpm" developer_user_home: /var/lib/pulp developer_user: pulp diff --git a/molecule/source-static/host_vars/debian-10 b/molecule/source-static/host_vars/debian-10 index ea7a55259..4519b34eb 100644 --- a/molecule/source-static/host_vars/debian-10 +++ b/molecule/source-static/host_vars/debian-10 @@ -13,6 +13,7 @@ pulp_install_plugins: # pulp-deb: # source_dir: "/var/lib/pulp/devel/pulp_deb" pulp-file: + git_url: "https://github.com/pulp/pulp_file" source_dir: "/var/lib/pulp/devel/pulp_file" # pulp-gem: # source_dir: "/var/lib/pulp/devel/pulp_gem" diff --git a/molecule/source-static/prepare.yml b/molecule/source-static/prepare.yml index f534bff53..c8ee31c5c 100644 --- a/molecule/source-static/prepare.yml +++ b/molecule/source-static/prepare.yml @@ -14,21 +14,6 @@ home: '{{ developer_user_home }}' when: developer_user is defined - - name: Clone pulp repository - git: - repo: 'https://github.com/pulp/pulpcore.git' - dest: '{{ pulp_source_dir }}' - version: master - update: yes - - - name: Clone pulp plugin repositories - git: - repo: '{{ item.value.git_repo | default( "https://github.com/pulp/" + item.key | replace("-", "_") ) }}' - dest: '{{ item.value.source_dir }}' - version: master - update: yes - with_dict: '{{ pulp_install_plugins }}' - - name: Make devel directory world-writable file: path: /var/lib/pulp/ diff --git a/molecule/source-upgrade/group_vars/all b/molecule/source-upgrade/group_vars/all index cc3413042..c95dd4502 100644 --- a/molecule/source-upgrade/group_vars/all +++ b/molecule/source-upgrade/group_vars/all @@ -2,15 +2,21 @@ __pulp_database_config_run_once: false pulp_default_admin_password: password pulp_source_dir: '/var/lib/pulp/devel/pulpcore' +pulp_git_url: "https://github.com/pulp/pulpcore" +pulp_git_revision: "master" pulp_upgrade: true # Needed to determine whether or not pulpcore was actually upgraded, to # trigger the handler. pulp_pip_editable: false pulp_install_plugins: pulp-file: + git_url: "https://github.com/pulp/pulp_file" + git_revision: "master" upgrade: true source_dir: "/var/lib/pulp/devel/pulp_file" pulp-rpm: + git_url: "https://github.com/pulp/pulp_rpm" + git_revision: "master" upgrade: true source_dir: "/var/lib/pulp/devel/pulp_rpm" developer_user_home: /var/lib/pulp diff --git a/molecule/source-upgrade/host_vars/debian-10 b/molecule/source-upgrade/host_vars/debian-10 index b679985f8..bd9b1da41 100644 --- a/molecule/source-upgrade/host_vars/debian-10 +++ b/molecule/source-upgrade/host_vars/debian-10 @@ -2,6 +2,7 @@ ansible_python_interpreter: /usr/bin/python3 pulp_install_plugins: pulp-file: upgrade: true + git_url: "https://github.com/pulp/pulp_file" source_dir: "/var/lib/pulp/devel/pulp_file" # pulp-rpm: # upgrade: true diff --git a/roles/pulp_common/README.md b/roles/pulp_common/README.md index 6ee378cd0..cca0a0365 100644 --- a/roles/pulp_common/README.md +++ b/roles/pulp_common/README.md @@ -45,6 +45,10 @@ Role Variables source_dir: "/var/lib/pulp/pulp_three" # path to the plugin source code pulp-four: prereq_role: "pulp.pulp_four_role" # role to run immediately before the venv is created + pulp-five: + source_dir: "/path/to/source/code/" + git_url: "https://github..." # Optional. URL to the git repo from where plugin will be pulled. + git_revision: "v3.1.1" # Optional. The specific git branch/tag/commit to be cheked out. ``` * `pulp_cache_dir`: Location of Pulp cache. Defaults to "/var/lib/pulp/tmp". * `pulp_config_dir`: Directory which will contain Pulp configuration files. @@ -55,6 +59,15 @@ Role Variables * `pulp_source_dir`: Optional. Absolute path to pulpcore source code. If present, pulpcore will be installed from source in editable mode. Also accepts a pip VCS URL, to (for example) install the master branch. +* `pulp_git_url`: Optional. URL to the git repository from where pulpcore will be checked out if + doesn't exists already on `source_dir`. + > **WARNING** when `pulp_git_url` is defined this role will clone the repo if doesn't already + > exist in the `pulp_source_dir` location and also checkout/update to specified `pulp_git_revision` if + > provided. In the case of existing local repo with unstaged changes the update will NOT be forced. + > For development purposes the recommendation is to NOT provide `pulp_git_url` and manage local + > branches manually. +* `pulp_git_revision`: Optional. The specific git branch/tag/commit to be cheked out + if git_url is provided. * `pulp_user`: User that owns and runs Pulp. Defaults to "pulp". * `pulp_user_id`: Integer value of uid for the `pulp_user`. Defaults to nothing and uid is assigned by the system. diff --git a/roles/pulp_common/tasks/install_pip.yml b/roles/pulp_common/tasks/install_pip.yml index d1f235bdf..426979d73 100644 --- a/roles/pulp_common/tasks/install_pip.yml +++ b/roles/pulp_common/tasks/install_pip.yml @@ -156,6 +156,18 @@ - Collect static content - Restart all Pulp services + - name: Clone or Checkout pulpcore source git repo + git: + repo: '{{ pulp_git_url }}' + dest: '{{ pulp_source_dir }}' + clone: yes + force: no + version: '{{ pulp_git_revision | default("master") }}' + update: yes + when: pulp_git_url is defined and pulp_source_dir is defined + tags: + - molecule-idempotence-notest + - name: Install pulpcore package from source pip: name: '{{ pulp_source_dir }}' @@ -220,6 +232,19 @@ - Collect static content - Restart all Pulp services + - name: Clone or Checkout pulp plugins source git repos + git: + repo: '{{ item.value.git_url }}' + dest: '{{ item.value.source_dir }}' + clone: yes + force: no + version: '{{ item.value.git_revision | default("master") }}' + update: yes + with_dict: '{{ pulp_install_plugins_normalized }}' + when: item.value.git_url is defined and item.value.source_dir is defined + tags: + - molecule-idempotence-notest + - name: Install Pulp plugins from source pip: name: '{{ item.value.source_dir }}' From dbbbb554f1b32714e6b2a86df6abe35b769b0141 Mon Sep 17 00:00:00 2001 From: Mike DePaulo Date: Fri, 18 Jun 2021 15:27:46 -0400 Subject: [PATCH 3/8] Problem: 3.7 CI is failing Solution: Specify 3.7 compatible plugin branches/releases [noissue] --- molecule/packages-dynamic/group_vars/all | 2 +- molecule/packages-static/group_vars/all | 2 +- molecule/packages-upgrade/group_vars/all | 2 +- molecule/release-dynamic/group_vars/all | 3 ++- molecule/release-static/group_vars/all | 3 ++- molecule/release-upgrade/group_vars/all | 2 +- molecule/source-dynamic/group_vars/all | 6 +++--- molecule/source-static/group_vars/all | 6 +++--- molecule/source-static/host_vars/debian-10 | 1 + molecule/source-upgrade/group_vars/all | 6 +++--- molecule/source-upgrade/host_vars/debian-10 | 1 + 11 files changed, 19 insertions(+), 15 deletions(-) diff --git a/molecule/packages-dynamic/group_vars/all b/molecule/packages-dynamic/group_vars/all index 35ad023b2..baa2deadf 100644 --- a/molecule/packages-dynamic/group_vars/all +++ b/molecule/packages-dynamic/group_vars/all @@ -8,4 +8,4 @@ pulp_install_plugins: pulp_settings: secret_key: secret content_origin: "https://{{ ansible_fqdn }}" -pulp_pkg_repo: "https://yum.theforeman.org/pulpcore/3.6/el{{ ansible_distribution_major_version }}/$basearch/" +pulp_pkg_repo: "https://yum.theforeman.org/pulpcore/3.7/el{{ ansible_distribution_major_version }}/$basearch/" diff --git a/molecule/packages-static/group_vars/all b/molecule/packages-static/group_vars/all index 115155a47..3b8bf714c 100644 --- a/molecule/packages-static/group_vars/all +++ b/molecule/packages-static/group_vars/all @@ -10,4 +10,4 @@ pulp_install_plugins: pulp_settings: secret_key: secret content_origin: "https://{{ ansible_fqdn }}" -pulp_pkg_repo: "https://yum.theforeman.org/pulpcore/3.6/el{{ ansible_distribution_major_version }}/$basearch/" +pulp_pkg_repo: "https://yum.theforeman.org/pulpcore/3.7/el{{ ansible_distribution_major_version }}/$basearch/" diff --git a/molecule/packages-upgrade/group_vars/all b/molecule/packages-upgrade/group_vars/all index 7bc0d16f6..fbd3f8645 100644 --- a/molecule/packages-upgrade/group_vars/all +++ b/molecule/packages-upgrade/group_vars/all @@ -8,5 +8,5 @@ pulp_install_plugins: pulp_settings: secret_key: secret content_origin: "https://{{ ansible_fqdn }}" -pulp_pkg_repo: "https://yum.theforeman.org/pulpcore/3.6/el{{ ansible_distribution_major_version }}/$basearch/" +pulp_pkg_repo: "https://yum.theforeman.org/pulpcore/3.7/el{{ ansible_distribution_major_version }}/$basearch/" pulp_pkg_upgrade_all: true diff --git a/molecule/release-dynamic/group_vars/all b/molecule/release-dynamic/group_vars/all index e3f72bba4..a1d0ecebb 100644 --- a/molecule/release-dynamic/group_vars/all +++ b/molecule/release-dynamic/group_vars/all @@ -13,7 +13,8 @@ pulp_install_plugins: # pulp-maven: {} # pulp-npm: {} # pulp-python: {} - pulp-rpm: {} + pulp-rpm: + version: 3.11.1 pulp_settings: secret_key: secret content_origin: "https://{{ ansible_fqdn }}" diff --git a/molecule/release-static/group_vars/all b/molecule/release-static/group_vars/all index 86bc1716c..6c63e6139 100644 --- a/molecule/release-static/group_vars/all +++ b/molecule/release-static/group_vars/all @@ -15,7 +15,8 @@ pulp_install_plugins: # pulp-maven: {} # pulp-npm: {} # pulp-python: {} - pulp-rpm: {} + pulp-rpm: + version: 3.11.1 pulp_settings: secret_key: secret content_origin: "https://{{ ansible_fqdn }}" diff --git a/molecule/release-upgrade/group_vars/all b/molecule/release-upgrade/group_vars/all index ca5c06af2..f8b37f388 100644 --- a/molecule/release-upgrade/group_vars/all +++ b/molecule/release-upgrade/group_vars/all @@ -6,7 +6,7 @@ pulp_install_plugins: pulp-file: version: 1.6.1 pulp-rpm: - upgrade: true + version: 3.11.1 pulp_settings: secret_key: secret content_origin: "https://{{ ansible_fqdn }}" diff --git a/molecule/source-dynamic/group_vars/all b/molecule/source-dynamic/group_vars/all index ad2e353b5..cff9d4c87 100644 --- a/molecule/source-dynamic/group_vars/all +++ b/molecule/source-dynamic/group_vars/all @@ -2,7 +2,7 @@ pulp_default_admin_password: password pulp_source_dir: '/var/lib/pulp/devel/pulpcore' pulp_git_url: "https://github.com/pulp/pulpcore" -pulp_git_revision: "master" +pulp_git_revision: "3.7" pulp_install_plugins: # galaxy-ng: # source_dir: "/var/lib/pulp/devel/galaxy_ng" @@ -18,7 +18,7 @@ pulp_install_plugins: # source_dir: "/var/lib/pulp/devel/pulp_deb" pulp-file: git_url: "https://github.com/pulp/pulp_file" - git_revision: "master" + git_revision: "1.6" source_dir: "/var/lib/pulp/devel/pulp_file" # pulp-gem: # source_dir: "/var/lib/pulp/devel/pulp_gem" @@ -30,7 +30,7 @@ pulp_install_plugins: # source_dir: "/var/lib/pulp/devel/pulp_python" pulp-rpm: git_url: "https://github.com/pulp/pulp_rpm" - git_revision: "master" + git_revision: "3.11" source_dir: "/var/lib/pulp/devel/pulp_rpm" developer_user_home: /var/lib/pulp developer_user: pulp diff --git a/molecule/source-static/group_vars/all b/molecule/source-static/group_vars/all index a52fa7966..8f57aa7e7 100644 --- a/molecule/source-static/group_vars/all +++ b/molecule/source-static/group_vars/all @@ -2,7 +2,7 @@ pulp_default_admin_password: password pulp_source_dir: '/var/lib/pulp/devel/pulpcore' pulp_git_url: "https://github.com/pulp/pulpcore" -pulp_git_revision: "master" +pulp_git_revision: "3.7" pulp_api_bind: "unix:/var/run/pulpcore-api/pulpcore-api.sock" pulp_content_bind: "unix:/var/run/pulpcore-content/pulpcore-content.sock" pulp_install_plugins: @@ -20,7 +20,7 @@ pulp_install_plugins: # source_dir: "/var/lib/pulp/devel/pulp_deb" pulp-file: git_url: "https://github.com/pulp/pulp_file" - git_revision: "master" + git_revision: "1.6" source_dir: "/var/lib/pulp/devel/pulp_file" # pulp-gem: # source_dir: "/var/lib/pulp/devel/pulp_gem" @@ -32,7 +32,7 @@ pulp_install_plugins: # source_dir: "/var/lib/pulp/devel/pulp_python" pulp-rpm: git_url: "https://github.com/pulp/pulp_rpm" - git_revision: "master" + git_revision: "3.11" source_dir: "/var/lib/pulp/devel/pulp_rpm" developer_user_home: /var/lib/pulp developer_user: pulp diff --git a/molecule/source-static/host_vars/debian-10 b/molecule/source-static/host_vars/debian-10 index 4519b34eb..b847f604d 100644 --- a/molecule/source-static/host_vars/debian-10 +++ b/molecule/source-static/host_vars/debian-10 @@ -15,6 +15,7 @@ pulp_install_plugins: pulp-file: git_url: "https://github.com/pulp/pulp_file" source_dir: "/var/lib/pulp/devel/pulp_file" + git_revision: "1.6" # pulp-gem: # source_dir: "/var/lib/pulp/devel/pulp_gem" # pulp-maven: diff --git a/molecule/source-upgrade/group_vars/all b/molecule/source-upgrade/group_vars/all index c95dd4502..bf74faad5 100644 --- a/molecule/source-upgrade/group_vars/all +++ b/molecule/source-upgrade/group_vars/all @@ -3,7 +3,7 @@ __pulp_database_config_run_once: false pulp_default_admin_password: password pulp_source_dir: '/var/lib/pulp/devel/pulpcore' pulp_git_url: "https://github.com/pulp/pulpcore" -pulp_git_revision: "master" +pulp_git_revision: "3.7" pulp_upgrade: true # Needed to determine whether or not pulpcore was actually upgraded, to # trigger the handler. @@ -11,12 +11,12 @@ pulp_pip_editable: false pulp_install_plugins: pulp-file: git_url: "https://github.com/pulp/pulp_file" - git_revision: "master" + git_revision: "1.6" upgrade: true source_dir: "/var/lib/pulp/devel/pulp_file" pulp-rpm: git_url: "https://github.com/pulp/pulp_rpm" - git_revision: "master" + git_revision: "3.11" upgrade: true source_dir: "/var/lib/pulp/devel/pulp_rpm" developer_user_home: /var/lib/pulp diff --git a/molecule/source-upgrade/host_vars/debian-10 b/molecule/source-upgrade/host_vars/debian-10 index bd9b1da41..d72a68b05 100644 --- a/molecule/source-upgrade/host_vars/debian-10 +++ b/molecule/source-upgrade/host_vars/debian-10 @@ -3,6 +3,7 @@ pulp_install_plugins: pulp-file: upgrade: true git_url: "https://github.com/pulp/pulp_file" + git_revision: "1.6" source_dir: "/var/lib/pulp/devel/pulp_file" # pulp-rpm: # upgrade: true From 6e1d88213d03e2233ec1ac4cebb218863e8d8463 Mon Sep 17 00:00:00 2001 From: Mike DePaulo Date: Thu, 29 Jul 2021 12:35:11 -0400 Subject: [PATCH 4/8] Update systemd to fix the geerlingguy.postgresql role's service mgmt Do it within release-upgrade (the only tests that is failing)'s prepare.yml [noissue] --- molecule/release-static/prepare.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/molecule/release-static/prepare.yml b/molecule/release-static/prepare.yml index a53be4b3f..bfa7fb950 100644 --- a/molecule/release-static/prepare.yml +++ b/molecule/release-static/prepare.yml @@ -19,3 +19,25 @@ when: - ansible_os_family == "RedHat" - ansible_distribution_major_version|int == 7 + + # Needed for the 1st time we run a package or apt task + - name: Update apt package index + apt: + update_cache: yes + when: ansible_facts.distribution == 'Debian' and ansible_facts.distribution_major_version == '10' + # We aren't really changing the system, so let's minimize the reporting of CHANGED tasks. + changed_when: False + + # Probably needed due to a mismatch of systemd versions/capabilities between the Ubuntu GHA + # host and the container + - name: Update systemd to fix the Ansible systemd module + package: + name: systemd + state: latest # noqa 403 + when: (ansible_facts.distribution == 'Debian' and ansible_facts.distribution_major_version == '10') or + (ansible_facts.distribution == 'Fedora' and ansible_facts.distribution_major_version == '31') + + # Possibly not necessary + - name: Make the systemd update take effect + systemd: + daemon_reexec: true From 7d12c6cb2ce5723bc9df142a119d5581aaa87cfb Mon Sep 17 00:00:00 2001 From: Mike DePaulo Date: Fri, 30 Jul 2021 11:12:30 -0400 Subject: [PATCH 5/8] Fix EL8 inspec tests by updating systemd [noissue] --- molecule/release-static/prepare.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/molecule/release-static/prepare.yml b/molecule/release-static/prepare.yml index bfa7fb950..297754811 100644 --- a/molecule/release-static/prepare.yml +++ b/molecule/release-static/prepare.yml @@ -30,12 +30,14 @@ # Probably needed due to a mismatch of systemd versions/capabilities between the Ubuntu GHA # host and the container - - name: Update systemd to fix the Ansible systemd module + - name: Update systemd to fix the Ansible systemd module, and inspec (verify phase) package: name: systemd state: latest # noqa 403 + # Fixes ansible systemd module on Debian & Fedora, fixes inspec on EL8 when: (ansible_facts.distribution == 'Debian' and ansible_facts.distribution_major_version == '10') or - (ansible_facts.distribution == 'Fedora' and ansible_facts.distribution_major_version == '31') + (ansible_facts.distribution == 'Fedora' and ansible_facts.distribution_major_version == '31') or + (ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '8') # Possibly not necessary - name: Make the systemd update take effect From eea40f6e2ec2f3c41fe6601b2a81ecd35ede416f Mon Sep 17 00:00:00 2001 From: Mike DePaulo Date: Thu, 29 Jul 2021 16:19:17 -0400 Subject: [PATCH 6/8] Problem: pulp-installer CI cannot run EL8 dnf tasks in prepare.yml Solution: Copy the repo logic from #8586 to prepare.yml related to: #8586 [noissue] --- molecule/release-static/prepare.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/molecule/release-static/prepare.yml b/molecule/release-static/prepare.yml index 297754811..370d98a94 100644 --- a/molecule/release-static/prepare.yml +++ b/molecule/release-static/prepare.yml @@ -7,6 +7,20 @@ dest: /etc/systemd/system/redis-server.service when: ansible_distribution == "Debian" + # These 2 tasks exist in playbooks/example-use/playbook.yml , but we need + # them here so that yum/dnf commands can succeed. + - name: Check if pulpcore repo exists + stat: + path: /etc/yum.repos.d/pulpcore.repo + register: pulpcorerepo + + - name: Remove pulpcore fedorapeople + lineinfile: + path: /etc/yum.repos.d/pulpcore.repo + regexp: 'fedorapeople' + line: "baseurl = {{ pulp_pkg_repo }}" + when: pulpcorerepo.stat.exists + - name: Ensure dnf is not installed, which would conflict with ansible-pulp-rpm yum: name: From 1d374e3d2de5695ca0273bad669afdbd56d69a91 Mon Sep 17 00:00:00 2001 From: Mike DePaulo Date: Thu, 29 Jul 2021 16:36:43 -0400 Subject: [PATCH 7/8] Problem: pulp_installer 3.7 is failing to upgrade the dynaconf RPM with the external repo Workaround: python3-dynaconf to the undeclared dependencies list. This makes `pulp_pkg_upgrade_all: true` upgrade it, users can workaround it that way. We are doing this workarond because it is a bug in the RPM packaging that is fixed on newer pulpcore repos than 3.7. Actually fixes: #9181 (But this is part of a larger PR, so we will have to manually close the bug) [noissue] --- CHANGES/9181.bugfix | 1 + roles/pulp_common/defaults/main.yml | 1 + 2 files changed, 2 insertions(+) create mode 100644 CHANGES/9181.bugfix diff --git a/CHANGES/9181.bugfix b/CHANGES/9181.bugfix new file mode 100644 index 000000000..dd1cab0e9 --- /dev/null +++ b/CHANGES/9181.bugfix @@ -0,0 +1 @@ +If you upgrade from older pulpcore to pulpcore 3.7 from RPMs, `pulp_common: Collect static content` may fail due to dynaconf being too old (3.0.0rc1 is older than 3.0.0 final). If this happens, you can now workaround it by setting `pulp_pkg_upgrade_all: true` (or upgrading the RPM "python3-dynaconf"). diff --git a/roles/pulp_common/defaults/main.yml b/roles/pulp_common/defaults/main.yml index de764f7fc..ac11a06b5 100644 --- a/roles/pulp_common/defaults/main.yml +++ b/roles/pulp_common/defaults/main.yml @@ -51,6 +51,7 @@ pulp_pkg_undeclared_deps: - python3-djangorestframework - python3-djangorestframework-queryfields - python3-markuppy # Because of https://bugzilla.redhat.com/show_bug.cgi?id=1986965 + - python3-dynaconf # Because the 3.0.0 rc1 RPM is not new enough for pulpcore 3.7 which depends on it, but rpm thinks it is. pulp_pkg_upgrade_all: false pulp_upgraded_manually: false From 2c1af5be570a630d88166981df00900fb8d69255 Mon Sep 17 00:00:00 2001 From: Mike DePaulo Date: Wed, 28 Jul 2021 16:14:13 -0400 Subject: [PATCH 8/8] Release 3.7.7 [noissue] --- CHANGES/6547.feature | 1 - CHANGES/9166.bugfix | 4 ---- CHANGES/9181.bugfix | 1 - docs/CHANGES.md | 26 ++++++++++++++++++++++++++ docs/index.md | 20 ++++++++++---------- galaxy.yml | 2 +- roles/pulp_common/defaults/main.yml | 2 +- 7 files changed, 38 insertions(+), 18 deletions(-) delete mode 100644 CHANGES/6547.feature delete mode 100644 CHANGES/9166.bugfix delete mode 100644 CHANGES/9181.bugfix diff --git a/CHANGES/6547.feature b/CHANGES/6547.feature deleted file mode 100644 index 96f63ef5b..000000000 --- a/CHANGES/6547.feature +++ /dev/null @@ -1 +0,0 @@ -Add git repo and revision to pulcore and plugin installer. diff --git a/CHANGES/9166.bugfix b/CHANGES/9166.bugfix deleted file mode 100644 index 8510f4efd..000000000 --- a/CHANGES/9166.bugfix +++ /dev/null @@ -1,4 +0,0 @@ -Fix the "markuppy" `pkg_resources.DistributionNotFound` error on the task -`pulp_common : Collect static content`. -This occurs when installing from RPM packages on EL8 (ever since EPEL8 released -python-tablib-3.0.0-1.el8 on approximately 2021-07-23). diff --git a/CHANGES/9181.bugfix b/CHANGES/9181.bugfix deleted file mode 100644 index dd1cab0e9..000000000 --- a/CHANGES/9181.bugfix +++ /dev/null @@ -1 +0,0 @@ -If you upgrade from older pulpcore to pulpcore 3.7 from RPMs, `pulp_common: Collect static content` may fail due to dynaconf being too old (3.0.0rc1 is older than 3.0.0 final). If this happens, you can now workaround it by setting `pulp_pkg_upgrade_all: true` (or upgrading the RPM "python3-dynaconf"). diff --git a/docs/CHANGES.md b/docs/CHANGES.md index 934aac22f..625e77c6a 100644 --- a/docs/CHANGES.md +++ b/docs/CHANGES.md @@ -13,6 +13,32 @@ Changelog +3.7.7 (2021-07-28) +================== + + +Features +-------- + +- Add git repo and revision to pulcore and plugin installer. + [#6547](https://pulp.plan.io/issues/6547) + + +Bugfixes +-------- + +- Fix the "markuppy" `pkg_resources.DistributionNotFound` error on the task + `pulp_common : Collect static content`. + This occurs when installing from RPM packages on EL8 (ever since EPEL8 released + python-tablib-3.0.0-1.el8 on approximately 2021-07-23). + [#9166](https://pulp.plan.io/issues/9166) +- If you upgrade from older pulpcore to pulpcore 3.7 from RPMs, `pulp_common: Collect static content` may fail due to dynaconf being too old (3.0.0rc1 is older than 3.0.0 final). If this happens, you can now workaround it by setting `pulp_pkg_upgrade_all: true` (or upgrading the RPM "python3-dynaconf"). + [#9181](https://pulp.plan.io/issues/9181) + + +---- + + 3.7.6 (2021-04-29) ================== diff --git a/docs/index.md b/docs/index.md index 954b80536..7d9ab80c5 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,9 +5,9 @@ The Pulp 3 Ansible installer is a collection of Ansible roles that you can use t Each Ansible role installs and configures a component of Pulp. -This version of the installer, 3.7.6, installs Pulp 3.7.6 specifically. +This version of the installer, 3.7.7, installs Pulp 3.7.7 specifically. -If run against an older version of Pulp 3, it will upgrade it to 3.7.6. +If run against an older version of Pulp 3, it will upgrade it to 3.7.7. System Requirements ------------------- @@ -93,18 +93,18 @@ Recommended Workflows for Pulpcore & Plugin Versioning Initial installation: 1. Make sure you are running the latest version of the installer, which installs the latest version - of pulpcore (3.7.6). + of pulpcore (3.7.7). 1. Confirm that all the latest stable releases of your desired plugins are compatible with pulpcore - 3.7.6, such as by reading the release announcement email thread for pulpcore 3.7.6, reading the + 3.7.7, such as by reading the release announcement email thread for pulpcore 3.7.7, reading the plugins README, or as a last resort, reading their `setup.py`. 1. Run `pulp_installer`. Upgrading your installation: 1. Observe what is the latest version of `pulp_installer`, and what version of pulpcore it installed - (3.7.6). + (3.7.7). 1. Confirm that all the latest stable releases of **currently installed** plugins are compatible - with pulpcore 3.7.6, such as by reading the release announcement email thread for pulpcore 3.7.6, + with pulpcore 3.7.7, such as by reading the release announcement email thread for pulpcore 3.7.7, reading the plugins README, or as a last resort, reading their setup.py. 1. If they are not all compatible yet, **wait** for the plugins to be updated for compatibility. @@ -116,9 +116,9 @@ reading the plugins README, or as a last resort, reading their setup.py. Initial installation: -1. Observe the latest branch of `pulp_installer`, and what version of pulpcore it installs (3.7.6). +1. Observe the latest branch of `pulp_installer`, and what version of pulpcore it installs (3.7.7). 1. Confirm that all the latest stable releases of your desired plugins are compatible with pulpcore - 3.7.6, such as by reading the release announcement email thread for pulpcore 3.7.6, reading the + 3.7.7, such as by reading the release announcement email thread for pulpcore 3.7.7, reading the plugins README, or as a last resort, reading their setup.py. 1. If they are not all compatible yet, try the last version of the installer that installs pulpcore 3.6.z . Then confirm that there exist stable releases of your desired plugins that are compatible @@ -130,9 +130,9 @@ with pulpcore 3.6.z. If there are none, try pulpcore 3.5.z, and repeate. Upgrading your install: 1. Observe what the latest version of `pulp_installer` is, and what version of pulpcore it installed - (3.7.6). (Even if there is no update, you can still upgrade your plugins.) + (3.7.7). (Even if there is no update, you can still upgrade your plugins.) 1. Confirm that all the latest stable releases of **currently installed** plugins are compatible - with pulpcore 3.7.6, such as by reading the release announcement email thread for pulpcore 3.7.6, + with pulpcore 3.7.7, such as by reading the release announcement email thread for pulpcore 3.7.7, reading the plugins README, or as a last resort, reading their setup.py. 1. If they are not all compatible yet, try the last version of the installer that installs pulpcore 3.6.z . Then confirm that there exist stable releases of your desired plugins that are compatible diff --git a/galaxy.yml b/galaxy.yml index edd0928bb..5d0f13f5d 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: pulp name: pulp_installer # The version of the collection. Must be compatible with semantic versioning -version: 3.7.6 +version: 3.7.7 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md diff --git a/roles/pulp_common/defaults/main.yml b/roles/pulp_common/defaults/main.yml index ac11a06b5..db394befd 100644 --- a/roles/pulp_common/defaults/main.yml +++ b/roles/pulp_common/defaults/main.yml @@ -14,7 +14,7 @@ pulp_upgrade: false # they are confident that this version of pulp_installer is compatible with # pulp_version. # Ignored if pulp_source_dir is set -pulp_version: "3.7.6" +pulp_version: "3.7.7" pulp_user: pulp pulp_user_id: pulp_group: pulp