Skip to content

Commit

Permalink
[RHELC-1267] Add Alma, Rocky 8.9 to pipeline, 8.8 as EUS (oamg#997)
Browse files Browse the repository at this point in the history
* Add Alma, Rocky 8.9 to pipeline, 8.8 as EUS

* add published 8.9 AWS AMIs to the pipeline
* keep 8.8 as EUS
* modify the playbooks to hardcode 8.8 repos
* address changes in metadata
* uncomment the OracleLinux 8 jobs disabled in oamg#988

Signed-off-by: Daniel Diblik <[email protected]>

* Fix tests, cleanup rcmtools repo and pkgs

* Fix failing tests
* Add a fixture to cleanup the packages from the repository rcmtools
  installed by testing farm and the repo itself

Signed-off-by: Daniel Diblik <[email protected]>

---------

Signed-off-by: Daniel Diblik <[email protected]>
  • Loading branch information
danmyway authored Dec 7, 2023
1 parent 1150f42 commit cf2ef83
Show file tree
Hide file tree
Showing 19 changed files with 304 additions and 78 deletions.
202 changes: 168 additions & 34 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,23 +175,23 @@ jobs:
- oracle-8
- non-destructive

# - &tests-tier0-destructive-oraclelinux-8
# <<: *tests-tier0-non-destructive-oraclelinux-8
# identifier: "tier0-destructive-ol8"
# tmt_plan: "tier0/destructive"
# labels:
# - tier0
# - oracle-8
# - destructive
#
# - &tests-sanity-oraclelinux-8
# <<: *tests-tier0-non-destructive-oraclelinux-8
# identifier: "sanity-ol8"
# tmt_plan: "tier0/sanity"
# labels:
# - tier0
# - oracle-8
# - sanity
- &tests-tier0-destructive-oraclelinux-8
<<: *tests-tier0-non-destructive-oraclelinux-8
identifier: "tier0-destructive-ol8"
tmt_plan: "tier0/destructive"
labels:
- tier0
- oracle-8
- destructive

- &tests-sanity-oraclelinux-8
<<: *tests-tier0-non-destructive-oraclelinux-8
identifier: "sanity-ol8"
tmt_plan: "tier0/sanity"
labels:
- tier0
- oracle-8
- sanity

- &tests-tier0-non-destructive-almalinux-86
job: tests
Expand Down Expand Up @@ -243,6 +243,56 @@ jobs:
- alma-86
- sanity

- &tests-tier0-non-destructive-almalinux-88
job: tests
# Run tests on-demand
manual_trigger: true
# Do not merge the PR into the target branch, in case the merge is broken
# Given we are rebasing the source branches regularly, we do not need this feature enabled
merge_pr_in_ci: false
trigger: pull_request
identifier: "tier0-non-destructive-al88"
tmt_plan: "tier0/non-destructive"
# Run on Red Testing Farm Hat Ranch, tag resources to sst_conversions
use_internal_tf: True
# For some targets we use official AWS marketplace images, those do not support root ssh login as default,
# therefore we need to pass post-install-script to enable root login on the host
tf_post_install_script: '#!/bin/bash\nsudo sed -i "s/^.*ssh-rsa/ssh-rsa/" /root/.ssh/authorized_keys'
targets:
epel-8-x86_64:
distros: ["AlmaLinux OS 8.8.20230524 x86_64"]
tf_extra_params:
environments:
- tmt:
context:
distro: "alma-8.8"
settings:
provisioning:
tags:
BusinessUnit: sst_conversions
labels:
- tier0
- alma-88
- non-destructive

- &tests-tier0-destructive-almalinux-88
<<: *tests-tier0-non-destructive-almalinux-88
identifier: "tier0-destructive-al88"
tmt_plan: "tier0/destructive"
labels:
- tier0
- alma-88
- destructive

- &tests-sanity-almalinux-88
<<: *tests-tier0-non-destructive-almalinux-88
identifier: "sanity-al88"
tmt_plan: "tier0/sanity"
labels:
- tier0
- alma-88
- sanity

- &tests-tier0-non-destructive-almalinux-8
job: tests
# Run tests on-demand
Expand All @@ -260,7 +310,7 @@ jobs:
tf_post_install_script: '#!/bin/bash\nsudo sed -i "s/^.*ssh-rsa/ssh-rsa/" /root/.ssh/authorized_keys'
targets:
epel-8-x86_64:
distros: ["AlmaLinux OS 8.8.20230524 x86_64"]
distros: ["AlmaLinux OS 8.9.20231123 x86_64"]
tf_extra_params:
environments:
- tmt:
Expand Down Expand Up @@ -343,6 +393,56 @@ jobs:
- rocky-86
- sanity

- &tests-tier0-non-destructive-rockylinux-88
job: tests
# Run tests on-demand
manual_trigger: true
# Do not merge the PR into the target branch, in case the merge is broken
# Given we are rebasing the source branches regularly, we do not need this feature enabled
merge_pr_in_ci: false
trigger: pull_request
identifier: "tier0-non-destructive-rl88"
tmt_plan: "tier0/non-destructive"
# Run on Red Testing Farm Hat Ranch, tag resources to sst_conversions
use_internal_tf: True
# For some targets we use official AWS marketplace images, those do not support root ssh login as default,
# therefore we need to pass post-install-script to enable root login on the host
tf_post_install_script: '#!/bin/bash\nsudo sed -i "s/^.*ssh-rsa/ssh-rsa/" /root/.ssh/authorized_keys'
targets:
epel-8-x86_64:
distros: ["Rocky-8-EC2-Base-8.8-20230518.0.x86_64"]
tf_extra_params:
environments:
- tmt:
context:
distro: "rocky-8.8"
settings:
provisioning:
tags:
BusinessUnit: sst_conversions
labels:
- tier0
- rocky-88
- non-destructive

- &tests-tier0-destructive-rockylinux-88
<<: *tests-tier0-non-destructive-rockylinux-88
identifier: "tier0-destructive-rl88"
tmt_plan: "tier0/destructive"
labels:
- tier0
- rocky-88
- destructive

- &tests-sanity-rockylinux-88
<<: *tests-tier0-non-destructive-rockylinux-88
identifier: "sanity-rl88"
tmt_plan: "tier0/sanity"
labels:
- tier0
- rocky-88
- sanity

- &tests-tier0-non-destructive-rockylinux-8
job: tests
# Run tests on-demand
Expand All @@ -360,7 +460,7 @@ jobs:
tf_post_install_script: '#!/bin/bash\nsudo sed -i "s/^.*ssh-rsa/ssh-rsa/" /root/.ssh/authorized_keys'
targets:
epel-8-x86_64:
distros: ["Rocky-8-EC2-Base-8.8-20230518.0.x86_64"]
distros: ["Rocky-8-EC2-Base-8.9-20231119.0.x86_64"]
tf_extra_params:
environments:
- tmt:
Expand Down Expand Up @@ -410,13 +510,13 @@ jobs:
- tier1
- oracle-7

# - &tests-tier1-manual-oraclelinux-8
# <<: *tests-tier0-non-destructive-oraclelinux-8
# identifier: "tier1-ol8"
# tmt_plan: "tier1"
# labels:
# - tier1
# - oracle-8
- &tests-tier1-manual-oraclelinux-8
<<: *tests-tier0-non-destructive-oraclelinux-8
identifier: "tier1-ol8"
tmt_plan: "tier1"
labels:
- tier1
- oracle-8


- &tests-tier1-manual-almalinux-86
Expand All @@ -427,6 +527,14 @@ jobs:
- tier1
- alma-86

- &tests-tier1-manual-almalinux-88
<<: *tests-tier0-non-destructive-almalinux-88
identifier: "tier1-al88"
tmt_plan: "tier1"
labels:
- tier1
- alma-88

- &tests-tier1-manual-almalinux-8
<<: *tests-tier0-non-destructive-almalinux-8
identifier: "tier1-al8"
Expand All @@ -443,6 +551,14 @@ jobs:
- tier1
- rocky-86

- &tests-tier1-manual-rockylinux-88
<<: *tests-tier0-non-destructive-rockylinux-88
identifier: "tier1-rl88"
tmt_plan: "tier1"
labels:
- tier1
- rocky-88

- &tests-tier1-manual-rockylinux-8
<<: *tests-tier0-non-destructive-rockylinux-8
identifier: "tier1-rl8"
Expand Down Expand Up @@ -470,14 +586,14 @@ jobs:
trigger: commit
branch: main

# - &tests-main-tier1-oraclelinux-8
# <<: *tests-tier0-non-destructive-oraclelinux-8
# # Run test automatically with merge commit to main branch
# manual_trigger: false
# identifier: "tier1-ol8"
# tmt_plan: "tier1"
# trigger: commit
# branch: main
- &tests-main-tier1-oraclelinux-8
<<: *tests-tier0-non-destructive-oraclelinux-8
# Run test automatically with merge commit to main branch
manual_trigger: false
identifier: "tier1-ol8"
tmt_plan: "tier1"
trigger: commit
branch: main

- &tests-main-tier1-almalinux-86
<<: *tests-tier0-non-destructive-almalinux-86
Expand All @@ -488,6 +604,15 @@ jobs:
trigger: commit
branch: main

- &tests-main-tier1-almalinux-88
<<: *tests-tier0-non-destructive-almalinux-88
# Run test automatically with merge commit to main branch
manual_trigger: false
identifier: "tier1-al88"
tmt_plan: "tier1"
trigger: commit
branch: main

- &tests-main-tier1-almalinux-8
<<: *tests-tier0-non-destructive-almalinux-8
# Run test automatically with merge commit to main branch
Expand All @@ -506,6 +631,15 @@ jobs:
trigger: commit
branch: main

- &tests-main-tier1-rockylinux-88
<<: *tests-tier0-non-destructive-rockylinux-88
# Run test automatically with merge commit to main branch
manual_trigger: false
identifier: "tier1-rl88"
tmt_plan: "tier1"
trigger: commit
branch: main

- &tests-main-tier1-rockylinux-8
<<: *tests-tier0-non-destructive-rockylinux-8
# Run test automatically with merge commit to main branch
Expand Down
2 changes: 1 addition & 1 deletion convert2rhel/actions/system_checks/package_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def run(self):
package_up_to_date_check_skip = os.environ.get("CONVERT2RHEL_PACKAGE_UP_TO_DATE_CHECK_SKIP", None)
package_up_to_date_error_message = (
"There was an error while checking whether the installed packages are up-to-date. Having an updated system is"
" an important prerequisite for a successful conversion. Consider verifyng the system is up to date manually"
" an important prerequisite for a successful conversion. Consider verifying the system is up to date manually"
" before proceeding with the conversion. %s" % str(e)
)
if not package_up_to_date_check_skip:
Expand Down
6 changes: 6 additions & 0 deletions plans/main.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,18 @@ adjust+:
- environment+:
SYSTEM_RELEASE_ENV: alma-8.6
when: distro == alma-8.6
- environment+:
SYSTEM_RELEASE_ENV: alma-8.8
when: distro == alma-8.8
- environment+:
SYSTEM_RELEASE_ENV: alma-8-latest
when: distro == alma-8-latest
- environment+:
SYSTEM_RELEASE_ENV: rocky-8.6
when: distro == rocky-8.6
- environment+:
SYSTEM_RELEASE_ENV: rocky-8.8
when: distro == rocky-8.8
- environment+:
SYSTEM_RELEASE_ENV: rocky-8-latest
when: distro == rocky-8-latest
Expand Down
2 changes: 1 addition & 1 deletion plans/tier0.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ description+: |
adjust+:
- enabled: true
when: >
distro == alma-8.6, rocky-8.6
distro == alma-8.6, rocky-8.6, alma-8.8, rocky-8.8
discover+:
filter: tag:checks-after-conversion
prepare+:
Expand Down
3 changes: 2 additions & 1 deletion tests/ansible_collections/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

- role: hardcode-eus-version-repos
when: >
ansible_facts['distribution_version'] == "8.6"
(ansible_facts['distribution_version'] == "8.6"
or ansible_facts['distribution_version'] == "8.8")
and (ansible_facts['distribution'] == "AlmaLinux"
or ansible_facts['distribution'] == "Rocky")
Expand Down
10 changes: 4 additions & 6 deletions tests/ansible_collections/roles/add-custom-repos/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
become: false
- import_playbook: rhel7-repos.yml
when: ansible_facts['distribution_major_version'] == "7"
# When Oracle Linux 8.7 is released, the "8.6" needs to change to "8.7" and the
# "8.6" is to be moved to the condition below related to enabling RHEL 8 EUS repos
#TODO(danmyway) bump when new minor available
- import_playbook: rhel8-repos.yml
when: ansible_facts['distribution_version'] == "8.5" or ansible_facts['distribution_version'] == "8.7" or ansible_facts['distribution_version'] == "8.8"
when: ansible_facts['distribution_version'] == "8.5" or ansible_facts['distribution_version'] == "8.9"
- import_playbook: rhel8-eus-repos.yml
# We need to skip for Oracle Linux machine in case we end up provisioning
# an 8.6 machine which will get updated to latest
when: ansible_facts['distribution_version'] == "8.6" and ansible_facts['distribution'] != "OracleLinux"
# We need to skip for Oracle Linux machines since we don't test EUS on OL
when: (ansible_facts['distribution_version'] == "8.6" or ansible_facts['distribution_version'] == "8.8") and ansible_facts['distribution'] != "OracleLinux"
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
---
- name: Hardcode Alma Linux repositories to vault
- name: Hardcode Alma Linux repositories to 8.6 vault
include_tasks: alma-86-repos.yml
when: ansible_facts['distribution'] == "AlmaLinux"
when: >
ansible_facts['distribution'] == "AlmaLinux"
and ansible_facts['distribution_version'] == "8.6"
- name: Hardcode RockyLinux repositories to vault
- name: Hardcode RockyLinux repositories to 8.6 vault
include_tasks: rocky-86-repos.yml
when: ansible_facts['distribution'] == "Rocky"
when: >
ansible_facts['distribution'] == "Rocky"
and ansible_facts['distribution_version'] == "8.6"
- name: Hardcode Alma Linux repositories to 8.8 vault
include_tasks: alma-88-repos.yml
when: >
ansible_facts['distribution'] == "AlmaLinux"
and ansible_facts['distribution_version'] == "8.8"
- name: Hardcode RockyLinux repositories to 8.8 vault
include_tasks: rocky-88-repos.yml
when: >
ansible_facts['distribution'] == "Rocky"
and ansible_facts['distribution_version'] == "8.8"
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os.path
import re

import pytest

Expand Down Expand Up @@ -28,7 +29,7 @@ def test_enabled_repositories(shell, system_release):
enabled_repos = shell("yum repolist").output

try:
if "redhat-8.6" in system_release:
if re.match(r"redhat-8\.[68]", system_release):
# Handle the special test case scenario where we do not use the
# premium account with EUS repositories
if os.path.exists("/non_eus_repos_used"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def test_basic_conversion(shell):
{"id": "Green Obsidian", "name": "Rocky Linux", "version": "8.6"},
),
"Red Hat Enterprise Linux release 8.8 (Ootpa)": (
{"id": "null", "name": "Oracle Linux Server", "version": "8.8"},
{"id": "Sapphire Caracal", "name": "AlmaLinux", "version": "8.8"},
{"id": "Green Obsidian", "name": "Rocky Linux", "version": "8.8"},
),
Expand Down
Loading

0 comments on commit cf2ef83

Please sign in to comment.