Skip to content
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

feat: add QA testcase vagrant box definitions, scripts and examples #74

Open
wants to merge 40 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f19297b
update .gitignore for qa-testcase-boxes
tcooper May 26, 2022
7639231
basic layout for qa-testcase-boxes
tcooper May 26, 2022
9b5f6a3
add testcase-mediacheck
tcooper May 26, 2022
44b7a56
add testcase-mediacheck sample output
tcooper May 26, 2022
7af9ce9
add testcase-mediacheck examples
tcooper May 26, 2022
a4df3f6
add testcase-debranding-validation
tcooper May 26, 2022
1bb812b
add testcase-debranding-validation sample output
tcooper May 26, 2022
b1827b8
add testcase-debranding-validation examples
tcooper May 26, 2022
ea341ac
rename script and provide basic documentation
tcooper May 30, 2022
f5c49eb
update script and documentation
tcooper May 31, 2022
b08a3a7
update debranding configuration for r9
tcooper May 31, 2022
fd569ad
document process for updating debranding configuration
tcooper May 31, 2022
02280a7
update debranding configuration for r9
tcooper Jun 7, 2022
ac3bfda
abrt is removed in r9. move from all section to r8 section
tcooper Jun 7, 2022
4323a3d
ensure repository metadata is current
tcooper Jun 9, 2022
9bfd637
update debranding configuration for r9
tcooper Jun 9, 2022
64605b3
Add Rocky Linux 9 RC1 test reports (#77)
mkahric Jun 29, 2022
e0e1f81
Adding a few dev Intel systems to the Rocky 9 xsos reports (#78)
StackKorora Jun 29, 2022
9373393
xsos for RL9 install Dell Precision_Workstation_T3500 (#79)
dithotxgh Jul 13, 2022
093f90f
Merge remote-tracking branch 'upstream/main' into qa-testcase-boxes
tcooper Nov 11, 2022
053b5cc
update r8.yaml for 8.7
tcooper Nov 11, 2022
a09d097
update r9.yaml for 9.0
tcooper Nov 11, 2022
f324258
updates for 8.7 (tested with 9.0)
tcooper Nov 19, 2022
db08423
package version updates for 9.1
tcooper Dec 11, 2022
8dd7495
file target and/or content changes for 9.1
tcooper Dec 11, 2022
d576eb8
remove open-vm-tools for r9
tcooper Dec 11, 2022
cb3223e
remove sos from r8 and r9
tcooper Dec 11, 2022
bc1e8f0
add lorax for r9
tcooper Dec 11, 2022
641649a
add osbuild for r9
tcooper Dec 11, 2022
834a7db
add gnome-session for r9
tcooper Dec 11, 2022
f1a75cb
remove chrony for r8 and r9
tcooper Dec 11, 2022
c7fcd5f
update peridot projectid for r9.1
tcooper Dec 11, 2022
fb7351e
add support for r9 DVD media
tcooper Dec 11, 2022
6c182b6
powertools in r8, crb in r9
tcooper Dec 11, 2022
35035e1
ensure fresh repository metadata
tcooper Dec 11, 2022
025a9e5
don't add/show some files in git status
tcooper Nov 11, 2023
7f34c36
update debranding yaml for Rocky Linux 9.2
tcooper Nov 11, 2023
20f0466
update peridot yumrepofs for Rocky Linux 9.2
tcooper Nov 11, 2023
99f8835
pre-9.5 sync
tcooper Nov 13, 2024
0abb381
pre-9.5 fixes
tcooper Nov 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.DS_Store
*.rpm
*.iso
.vagrant
vagrant-settings.yaml
patch.yml
28 changes: 28 additions & 0 deletions qa-testcase-boxes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Vagrant Boxes for Rocky Linux QA Testing

This repository holds Vagrant box definitions for various partially automated QA testing sequences.

The Vagrant boxes will perform one sample analysis when they are instantiated. They can be reprovisioned with various other options to run other analyses, details are provided as examples within each box directory. Additionally, the script run the Vagrant boxes can be uses standalone in a system with similar specification and requirements without the need for Vagrant.

## testcase-mediacheck

This box will...

- Download Rocky Linux ISOs, CHECKSUM files and official GPG Public Key
- Verify all ISO checksums
- Verify internal ISO md5 checksums
- Where applicable (minimal and dvd1 ISO)...
- Mount ISOs locally as loopback filesystems to /media
- Run `dnf repoclosure` on the included repositories
- Analyze packages in included repositories for conflicts
- Unmount ISOs from /media
- Generate output logs


## testcase-debranding-validation

This box will...

- Validate package debranding as described in QA:Testcase Debranding Validation
- Optionally use cached rpms, previously downloaded Rocky Linux ISOs or published Rocky Linux repositories for debranding analysis.
- Produce output than can be parsed into summary reports
139 changes: 139 additions & 0 deletions qa-testcase-boxes/testcase-debranding-validation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# testcase-debrand-validation

This box will...

- Validate package debranding as described in QA:Testcase Debranding Validation
- Optionally use cached rpms, previously downloaded Rocky Linux ISOs or published Rocky Linux repositories for debranding analysis.
- Produce output than can be parsed into summary reports

## Requirements

The machine used for testing must...

- have the following RPM packages installed (in EL8), `coreutils`, `curl`, `dnf`, `isomd5sum`, `jq`, `koji`, `python3`, `rpm`, `util-linux` and `yq`.
- have available disk space in the test directory to hold the ISO(s) to be tested.
- have a connection to the Internet and/or access to pre-downloaded ISOs


## Quick Start

The basic Vagrant sequence is simply (redacted content)...

```
[rocky@localhost ~]$ vagrant status
Current machine states:

default not created (virtualbox)

The environment has not yet been created. Run `vagrant up` to
create the environment. If a machine is not created, only the
default provider will be shown. So if a provider is not listed,
then the machine is not created for that environment.
```

```
[rocky@localhost ~]$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'rockylinux/8'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: testcase-debranding-validation_default_1653577650369_30157
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
default: /vagrant => /home/rocky/testing/qa-testcase-boxes/testcase-debranding-validation
==> default: Running provisioner: Start Timestamp (shell)...
default: Running: script: Start Timestamp
default: Starting QA:Testcase-Debranding on Thu May 26 15:07:49 UTC 2022
==> default: Running provisioner: Install requirements (shell)...

...<snip>...

==> default: Running provisioner: file...
default: etc/koji.conf => /tmp/koji.conf
==> default: Running provisioner: Deploy koji.conf (shell)...
default: Running: script: Deploy koji.conf
==> default: Running provisioner: Prepare testing directories (shell)...
default: Running: script: Prepare testing directories
==> default: Running provisioner: Rocky 8.6 Debrand Validation (shell)...
default: Running: script: Rocky 8.6 Debrand Validation
default: mkdir: created directory '/home/rocky/testing/output/2022-05-26'
default:
default: ================================================================================
default: Package Debrand Validation for x86_64 packages in Rocky-8.6-x86_64-dvd1.iso
default:
default: ================================================================================
default: General Processing Parameters
default:
default: type: dvd1
default: version: 8.6
default: arch: x86_64
default:
default: ================================================================================
default: PackageKit
default:
default:
default: binary_pkg: PackageKit-1.1.12-6.el8.0.2.x86_64.rpm
default:
default: SUCCESS: FileContents found pattern.
default:
default: ================================================================================
default: WALinuxAgent
default:
default:
default: binary_pkg: WALinuxAgent-2.3.0.2-2.el8.rocky.0.noarch.rpm
default:
default: SUCCESS: FileContents found pattern.
default:

...<snip>...

default: ================================================================================
default: systemd
default:
default: WARN: dvd1 media does not contain SRPMs, use koji or cache
default:
default: ================================================================================
default: thunderbird
default:
default:
default: binary_pkg: thunderbird-91.9.0-3.el8_5.x86_64.rpm
default:
default: SUCCESS: FileContents found pattern.
==> default: Running provisioner: End Timestamp (shell)...
default: Running: script: End Timestamp
default: Finished QA:Testcase-Debranding on Thu May 26 15:08:37 UTC 2022
```


```
[rocky@localhost ~]$ vagrant halt
==> default: Attempting graceful shutdown of VM...
```


## Examples

Vagrant and non-Vagrant examples of usage are show in the following locations in this repository...

- [Default Vagrant](examples/default_vagrant.md)
- [Standalone System](examples/standalone_system.md)
- [Standalone Koji](examples/standalone_koji.md)
- [Standalone Cache](examples/standalone_cache.md)
58 changes: 58 additions & 0 deletions qa-testcase-boxes/testcase-debranding-validation/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

require 'yaml'

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

# configs, custom updates defaults
defaults_cfg = YAML.load_file('vagrant-settings.yaml_defaults')
if File.exist?('vagrant-settings.yaml')
custom_cfg = YAML.load_file('vagrant-settings.yaml')
cfg = defaults_cfg.merge(custom_cfg)
else
cfg = defaults_cfg
end

Vagrant.configure("2") do |config|
config.vm.box = cfg["box_image"]

config.vm.provider "virtualbox" do |vb|
vb.memory = cfg["box_ram"]
vb.cpus = cfg["box_cpus"]
end

config.vm.provision "shell", name: "Start Timestamp", inline: <<-SHELL
echo "Starting QA:Testcase-Debranding on $(date)"
SHELL

config.vm.provision "shell", name: "Install requirements", inline: <<-SHELL
dnf -y --enablerepo=extras,powertools update
dnf -y install epel-release
dnf -y install jq koji python3
curl -LR https://github.com/mikefarah/yq/releases/download/v4.25.1/yq_linux_amd64 -o yq
chmod +x yq && mv yq /usr/local/bin
SHELL

config.vm.provision "file", source: "etc/koji.conf", destination: "/tmp/koji.conf"

config.vm.provision "shell", name: "Deploy koji.conf", inline: <<-SHELL
cat /tmp/koji.conf > /etc/koji.conf
SHELL

config.vm.provision "shell", name: "Prepare testing directories", inline: <<-SHELL
mkdir -pv /vagrant/{isos,output}
SHELL

config.vm.provision "shell" do |script|
script.name = "Rocky #{cfg['version']} #{cfg['arch']} Debrand Validation"
script.privileged = false
script.inline = "/vagrant/scripts/test_wrapper.sh"
end

config.vm.provision "shell", name: "End Timestamp", inline: <<-SHELL
echo "Finished QA:Testcase-Debranding on $(date)"
SHELL

end
Loading