Skip to content

Commit

Permalink
QE: Get rid of tools pool repos
Browse files Browse the repository at this point in the history
  • Loading branch information
srbarrios authored Feb 2, 2025
1 parent 3ce7e15 commit efcd7d2
Show file tree
Hide file tree
Showing 13 changed files with 138 additions and 151 deletions.
10 changes: 10 additions & 0 deletions testsuite/documentation/test-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ As part of the Salt states configuring the systems, we have a state that injects
Those repositories are not directly handled by our server, so during the reposync stage we create custom channels with new custom repositories that will parse and include the repositories injected by Sumaform.
These custom channels will be part of the activation keys that we use to bootstrap the different clients.

#### How do we speed up the workflow to onboard the clients?

Normally a customer will trigger a full synchronization of a product, including all the mandatory and recommended channels. This process can take a long time, depending on the number of packages and the network speed.
In our CI Test Suite we want to speed up this workflow by synchronizing only the necessary packages to generate the bootstrap repository for the clients.

For now, this only applies to our Leap Minion in our Uyuni flavor, but the plan is to extend this to the MLM and other clients as well:
We first need to trigger a synchronization of the channel through `spacewalk-common-channel`, but then we immediately kill that repo-sync process, we need this as otherwise the following command will fail, warning about a non-existing custom channel.
After that, we run the command `spacewalk-repo-sync -c <channel> --include <package> --include <package> ...` for each of the packages that define as part of our bootstrap repository.
This way we can speed up the synchronization process, and we can bootstrap the clients immediately after that. The rest of the product channels will automatically be synchronized by the scheduled tasks when it reaches the time to do so.

#### Overview of Channels and Repositories

The current overview of channels and repositories is as follows:
Expand Down
20 changes: 0 additions & 20 deletions testsuite/features/reposync/allcli_update_activationkeys.feature
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ Feature: Update activation keys
And I wait until I do not see "Loading..." text
And I select the parent channel for the "sle_minion" from "selectedBaseChannel"
And I wait until I do not see "Loading..." text
And I check "openSUSE 15.5 non oss (x86_64)"
And I check "openSUSE Leap 15.5 non oss Updates (x86_64)"
And I check "openSUSE Leap 15.5 Updates (x86_64)"
And I check "Update repository of openSUSE Leap 15.5 Backports (x86_64)"
And I check "Update repository with updates from SUSE Linux Enterprise 15 for openSUSE Leap 15.5 (x86_64)"
And I check "Uyuni Client Tools for openSUSE Leap 15.5 (x86_64) (Development)"
And I check "Fake-RPM-SUSE-Channel"
And I wait until "Fake-RPM-SUSE-Channel" has been checked
Expand Down Expand Up @@ -81,11 +76,6 @@ Feature: Update activation keys
And I wait until I do not see "Loading..." text
And I select the parent channel for the "sle_minion" from "selectedBaseChannel"
And I wait until I do not see "Loading..." text
And I check "openSUSE 15.5 non oss (x86_64)"
And I check "openSUSE Leap 15.5 non oss Updates (x86_64)"
And I check "openSUSE Leap 15.5 Updates (x86_64)"
And I check "Update repository of openSUSE Leap 15.5 Backports (x86_64)"
And I check "Update repository with updates from SUSE Linux Enterprise 15 for openSUSE Leap 15.5 (x86_64)"
And I check "Uyuni Client Tools for openSUSE Leap 15.5 (x86_64) (Development)"
And I check "Fake-RPM-SUSE-Channel"
And I wait until "Fake-RPM-SUSE-Channel" has been checked
Expand Down Expand Up @@ -119,11 +109,6 @@ Feature: Update activation keys
And I wait until I do not see "Loading..." text
And I select the parent channel for the "sle_minion" from "selectedBaseChannel"
And I wait until I do not see "Loading..." text
And I check "openSUSE 15.5 non oss (x86_64)"
And I check "openSUSE Leap 15.5 non oss Updates (x86_64)"
And I check "openSUSE Leap 15.5 Updates (x86_64)"
And I check "Update repository of openSUSE Leap 15.5 Backports (x86_64)"
And I check "Update repository with updates from SUSE Linux Enterprise 15 for openSUSE Leap 15.5 (x86_64)"
And I check "Uyuni Client Tools for openSUSE Leap 15.5 (x86_64) (Development)"
And I check "Fake-RPM-SUSE-Channel"
And I wait until "Fake-RPM-SUSE-Channel" has been checked
Expand Down Expand Up @@ -156,11 +141,6 @@ Feature: Update activation keys
And I wait for child channels to appear
And I select the parent channel for the "proxy_traditional" from "selectedBaseChannel"
And I wait for child channels to appear
And I check "openSUSE 15.5 non oss (x86_64)"
And I check "openSUSE Leap 15.5 non oss Updates (x86_64)"
And I check "openSUSE Leap 15.5 Updates (x86_64)"
And I check "Update repository of openSUSE Leap 15.5 Backports (x86_64)"
And I check "Update repository with updates from SUSE Linux Enterprise 15 for openSUSE Leap 15.5 (x86_64)"
And I check "Uyuni Client Tools for openSUSE Leap 15.5 (x86_64) (Development)"
And I check "Uyuni Proxy Devel for openSUSE Leap 15.5 (x86_64)"
And I click on "Update Activation Key"
Expand Down
16 changes: 16 additions & 0 deletions testsuite/features/reposync/srv_sync_products.feature
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,22 @@ Feature: Synchronize products in the products page of the Setup Wizard
Then the SLE15 SP4 product should be added
When I wait until all synchronized channels for "sles15-sp4" have finished

@uyuni
Scenario: Partially add openSUSE Leap 15.5 product, only including the required packages to generate the bootstrap repository
When I use spacewalk-common-channel to add channel "opensuse_leap15_5" with arch "x86_64"
And I kill running spacewalk-repo-sync for "opensuse_leap15_5-x86_64" channel
And I use spacewalk-repo-sync to sync channel "opensuse_leap15_5-x86_64" including "python3-ply dmidecode libunwind" packages
And I use spacewalk-common-channel to add all "leap15.5-client-tools" channels with arch "x86_64"
And I wait until all synchronized channels for "leap15.5-client-tools-x86_64" have finished

@containerized_server
@proxy
@uyuni
Scenario: Add openSUSE Leap Micro 5.5 Proxy, including Uyuni Client Tools
# TODO: Refactor the scenarios in order to not require a full synchronization of Uyuni proxy product (OpenSUSE Micro 5.5)
When I use spacewalk-common-channel to add all "uyuni-proxy" channels with arch "x86_64"
And I wait until all synchronized channels for "uyuni-proxy" have finished

@scc_credentials
@uyuni
Scenario: Synchronize SLES 15 SP4 product with recommended sub-products for Retail feature
Expand Down
24 changes: 6 additions & 18 deletions testsuite/features/secondary/min_ansible_control_node.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 SUSE LLC
# Copyright (c) 2021-2025 SUSE LLC
# Licensed under the terms of the MIT license.

@scope_ansible
Expand All @@ -9,17 +9,12 @@ Feature: Operate an Ansible control node in a normal minion

Scenario: Pre-requisite: Deploy test playbooks and inventory file
When I deploy testing playbooks and inventory files to "sle_minion"
@skip_if_github_validation
@susemanager
Scenario: Pre-requisite: Enable client tools repositories
When I enable the repositories "tools_update_repo tools_pool_repo" on this "sle_minion"
And I refresh the metadata for "sle_minion"

# TODO: Check why tools_update_repo is not available on the openSUSE minion
# TODO: Check why tools_update_repo is not available on the openSUSE minion
@skip_if_github_validation
@uyuni
Scenario: Pre-requisite: Enable client tools repositories
When I enable the repositories "tools_pool_repo os_pool_repo" on this "sle_minion"
Scenario: Pre-requisite: Enable OS pool repository
When I enable repository "os_pool_repo" on this "sle_minion"
And I refresh the metadata for "sle_minion"

Scenario: Enable "Ansible control node" system type
Expand Down Expand Up @@ -90,16 +85,9 @@ Feature: Operate an Ansible control node in a normal minion
And I remove package "orion-dummy" from this "sle_minion" without error control
And I remove "/tmp/file.txt" from "sle_minion"

@skip_if_github_validation
@susemanager
Scenario: Cleanup: Disable client tools repositories
Given I am on the Systems overview page of this "sle_minion"
When I disable the repositories "tools_update_repo tools_pool_repo" on this "sle_minion"
And I refresh the metadata for "sle_minion"

@skip_if_github_validation
@uyuni
Scenario: Cleanup: Disable client tools repositories
Scenario: Cleanup: Disable OS pool repository
Given I am on the Systems overview page of this "sle_minion"
When I disable the repositories "tools_pool_repo os_pool_repo" on this "sle_minion"
When I disable repository "os_pool_repo" on this "sle_minion"
And I refresh the metadata for "sle_minion"
8 changes: 0 additions & 8 deletions testsuite/features/secondary/min_deblike_monitoring.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ Feature: Monitor SUMA environment with Prometheus on a Debian-like Salt minion
As an authorized user
I want to enable Prometheus exporters

@skip_if_github_validation
Scenario: Pre-requisite: enable Prometheus exporters repository on the Debian-like minion
When I enable the necessary repositories before installing Prometheus exporters on this "deblike_minion"

Scenario: Log in as org admin user
Given I am authorized

Expand Down Expand Up @@ -69,7 +65,3 @@ Feature: Monitor SUMA environment with Prometheus on a Debian-like Salt minion
And I click on "Apply Highstate"
Then I should see a "Applying the highstate has been scheduled." text
And I wait until event "Apply highstate scheduled" is completed

@skip_if_github_validation
Scenario: Cleanup: disable Prometheus exporters repository on the Debian-like minion
When I disable the necessary repositories before installing Prometheus exporters on this "deblike_minion" without error control
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017-2023 SUSE LLC
# Copyright (c) 2017-2025 SUSE LLC
# Licensed under the terms of the MIT license.

@scope_openscap
Expand All @@ -16,7 +16,6 @@ Feature: OpenSCAP audit of Debian-like Salt minion
@skip_if_github_validation
Scenario: Enable all the necessary repositories for OpenSCAP on Debian-like minion
When I enable Debian-like "universe" repository on "deblike_minion"
And I enable the repositories "tools_update_repo tools_pool_repo" on this "deblike_minion"

@skip_if_github_validation
Scenario: Install the OpenSCAP packages on the Debian-like minion
Expand Down Expand Up @@ -84,5 +83,4 @@ Feature: OpenSCAP audit of Debian-like Salt minion

@skip_if_github_validation
Scenario: Cleanup: remove all the necessary repositories for OpenSCAP on Debian-like minion
When I disable the repositories "tools_update_repo tools_pool_repo" on this "deblike_minion"
And I disable Debian-like "universe" repository on "deblike_minion"
13 changes: 2 additions & 11 deletions testsuite/features/secondary/min_monitoring.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2024 SUSE LLC
# Copyright (c) 2022-2025 SUSE LLC
# Licensed under the terms of the MIT license.
# This feature depends on:
# - features/secondary/srv_monitoring.feature : As this feature disable/re-enable monitoring capabilities
Expand All @@ -11,11 +11,6 @@ Feature: Monitor SUMA environment with Prometheus on a SLE Salt minion
As an authorized user
I want to enable Prometheus exporters

@skip_if_github_validation
Scenario: Pre-requisite: enable Prometheus exporters repository on the minion
When I enable the necessary repositories before installing Prometheus exporters on this "sle_minion"
And I refresh the metadata for "sle_minion"

Scenario: Log in as org admin user
Given I am authorized

Expand Down Expand Up @@ -56,7 +51,7 @@ Feature: Monitor SUMA environment with Prometheus on a SLE Salt minion
Then I should see a "Applying the highstate has been scheduled." text
And I wait until event "Apply highstate scheduled" is completed

@skip_if_github_validation
@skip_if_github_validation
Scenario: Wait for services
When I wait until "prometheus" service is active on "sle_minion"
And I wait until "node" exporter service is active on "sle_minion"
Expand All @@ -82,7 +77,3 @@ Feature: Monitor SUMA environment with Prometheus on a SLE Salt minion
And I click on "Apply Highstate"
Then I should see a "Applying the highstate has been scheduled." text
And I wait until event "Apply highstate scheduled" is completed

@skip_if_github_validation
Scenario: Cleanup: disable Prometheus exporters repository
When I disable the necessary repositories before installing Prometheus exporters on this "sle_minion" without error control
16 changes: 4 additions & 12 deletions testsuite/features/secondary/min_rhlike_monitoring.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2024 SUSE LLC
# Copyright (c) 2022-2025 SUSE LLC
# Licensed under the terms of the MIT license.
# This feature depends on:
# - features/secondary/srv_monitoring.feature: as this feature disables/re-enables monitoring capabilities
Expand All @@ -12,10 +12,6 @@ Feature: Monitor SUMA environment with Prometheus on a Red Hat-like Salt minion
As an authorized user
I want to enable Prometheus exporters

@skip_if_github_validation
Scenario: Pre-requisite: enable Prometheus exporters repository on the Red Hat-like minion
When I enable the necessary repositories before installing Prometheus exporters on this "rhlike_minion"

Scenario: Log in as org admin user
Given I am authorized

Expand All @@ -39,14 +35,14 @@ Feature: Monitor SUMA environment with Prometheus on a Red Hat-like Salt minion
And I click on "Save"
Then I should see a "Formula saved" text

@skip_if_github_validation
@skip_if_github_validation
Scenario: Apply highstate for Prometheus exporters on the Red Hat-like minion
When I follow "States" in the content area
And I click on "Apply Highstate"
Then I should see a "Applying the highstate has been scheduled." text
And I wait until event "Apply highstate scheduled" is completed

@skip_if_github_validation
@skip_if_github_validation
Scenario: Wait for service
When I wait until "node" exporter service is active on "rhlike_minion"
And I wait until "apache" exporter service is active on "rhlike_minion"
Expand All @@ -63,13 +59,9 @@ Feature: Monitor SUMA environment with Prometheus on a Red Hat-like Salt minion
And I click on "Save"
Then I wait until I see "Formula saved" text

@skip_if_github_validation
@skip_if_github_validation
Scenario: Cleanup: apply highstate after test monitoring on the Red Hat-like minion
When I follow "States" in the content area
And I click on "Apply Highstate"
Then I should see a "Applying the highstate has been scheduled." text
And I wait until event "Apply highstate scheduled" is completed

@skip_if_github_validation
Scenario: Cleanup: disable Prometheus exporters repository on the Red Hat-like minion
When I disable the necessary repositories before installing Prometheus exporters on this "rhlike_minion" without error control
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017-2024 SUSE LLC
# Copyright (c) 2017-2025 SUSE LLC
# Licensed under the terms of the MIT license.

@scope_openscap
Expand All @@ -16,7 +16,6 @@ Feature: OpenSCAP audit of Red Hat-like Salt minion
@skip_if_github_validation
Scenario: Enable repositories for openSCAP on the Red Hat-like minion
When I enable the repositories "Rocky-BaseOS Rocky-AppStream" on this "rhlike_minion"
And I enable the repositories "tools_update_repo tools_pool_repo" on this "rhlike_minion"
And I refresh the metadata for "rhlike_minion"

@skip_if_github_validation
Expand Down Expand Up @@ -83,7 +82,6 @@ Feature: OpenSCAP audit of Red Hat-like Salt minion
Scenario: Cleanup: remove the OpenSCAP packages from the Red Hat-like minion
When I remove OpenSCAP dependencies from "rhlike_minion"
And I disable repository "Rocky-BaseOS" on this "rhlike_minion"
And I disable the repositories "tools_update_repo tools_pool_repo" on this "rhlike_minion"

@skip_if_github_validation
Scenario: Cleanup: restore the base channel for the Red Hat-like minion
Expand Down
21 changes: 5 additions & 16 deletions testsuite/features/secondary/minssh_ansible_control_node.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 SUSE LLC
# Copyright (c) 2021-2025 SUSE LLC
# Licensed under the terms of the MIT license.

@skip_if_github_validation
Expand All @@ -13,15 +13,10 @@ Feature: Operate an Ansible control node in SSH minion
Scenario: Pre-requisite: Deploy test playbooks and inventory file
When I deploy testing playbooks and inventory files to "ssh_minion"

@susemanager
Scenario: Pre-requisite: Enable client tools repositories
When I enable the repositories "tools_update_repo tools_pool_repo" on this "ssh_minion"
And I refresh the metadata for "ssh_minion"

# TODO: Check why tools_update_repo is not available on the openSUSE minion
@uyuni
Scenario: Pre-requisite: Enable client tools repositories
When I enable the repositories "tools_pool_repo os_pool_repo" on this "ssh_minion"
Scenario: Pre-requisite: Enable OS pool repository
When I enable repository "os_pool_repo" on this "ssh_minion"
And I refresh the metadata for "ssh_minion"

Scenario: Enable "Ansible control node" system type
Expand Down Expand Up @@ -92,14 +87,8 @@ Feature: Operate an Ansible control node in SSH minion
And I remove package "orion-dummy" from this "ssh_minion" without error control
And I remove "/tmp/file.txt" from "ssh_minion"

@susemanager
Scenario: Cleanup: Disable client tools repositories
Given I am on the Systems overview page of this "ssh_minion"
When I disable the repositories "tools_update_repo tools_pool_repo" on this "ssh_minion"
And I refresh the metadata for "ssh_minion"

@uyuni
Scenario: Cleanup: Disable client tools repositories
Scenario: Cleanup: Disable OS pool repository
Given I am on the Systems overview page of this "ssh_minion"
When I disable the repositories "tools_pool_repo os_pool_repo" on this "ssh_minion"
When I disable repository "os_pool_repo" on this "ssh_minion"
And I refresh the metadata for "ssh_minion"
Loading

0 comments on commit efcd7d2

Please sign in to comment.