Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions test/bin/common_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,6 @@ export BREW_NIGHTLY_RELEASE_VERSION
# Set the release type to ec, rc or zstream
LATEST_RELEASE_TYPE="ec"
export LATEST_RELEASE_TYPE

BREW_LREL_RELEASE_VERSION="${BREW_EC_RELEASE_VERSION}"
export BREW_LREL_RELEASE_VERSION
2 changes: 2 additions & 0 deletions test/bin/scenario.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ SKIP_GREENBOOT=${SKIP_GREENBOOT:-false} # may be overridden in scenario file
IMAGE_SIGSTORE_ENABLED=false # may be overridden in scenario file
VNC_CONSOLE=${VNC_CONSOLE:-false} # may be overridden in global settings file
TEST_RANDOMIZATION="all" # may be overridden in scenario file
TEST_EXCLUDES="none" # may be overridden in scenario file
TEST_EXECUTION_TIMEOUT="30m" # may be overriden in scenario file
SUBSCRIPTION_MANAGER_PLUGIN="${SUBSCRIPTION_MANAGER_PLUGIN:-${SCRIPTDIR}/subscription_manager_register.sh}" # may be overridden in global settings file
RUN_HOST_OVERRIDE="" # target any given VM for running scenarios
Expand Down Expand Up @@ -1053,6 +1054,7 @@ EOF
if ! ${timeout_robot} \
--name "${SCENARIO}" \
--randomize "${TEST_RANDOMIZATION}" \
--exclude "${TEST_EXCLUDES}" \
--loglevel TRACE \
--listener "${TESTDIR}/resources/sos-on-failure-listener.py" \
--pythonpath "${TESTDIR}/resources" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ RUN firewall-offline-cmd --zone=public --add-port=22/tcp && \
firewall-offline-cmd --zone=public --add-port=443/tcp && \
firewall-offline-cmd --zone=public --add-port=5353/udp && \
firewall-offline-cmd --zone=public --add-port=6443/tcp && \
firewall-offline-cmd --zone=public --add-port=8889/tcp && \
firewall-offline-cmd --zone=public --add-port=30000-32767/tcp && \
firewall-offline-cmd --zone=public --add-port=30000-32767/udp
# {{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,24 @@ RUN firewall-offline-cmd --zone=public --add-port=22/tcp && \
firewall-offline-cmd --zone=public --add-port=443/tcp && \
firewall-offline-cmd --zone=public --add-port=5353/udp && \
firewall-offline-cmd --zone=public --add-port=6443/tcp && \
firewall-offline-cmd --zone=public --add-port=8889/tcp && \
firewall-offline-cmd --zone=public --add-port=30000-32767/tcp && \
firewall-offline-cmd --zone=public --add-port=30000-32767/udp

# Prepare system for testing Generic Device Plugin.
# Upgrade the kernel to keep the same procedure with RHEL and CentOS.
# CentOS requires upgrade because of a different package retention policy
# which means that the kernel in the base bootc image might no longer
# be available in the repositories.
# hadolint ignore=DL3003
RUN dnf upgrade kernel -y && \
KERNEL_VER=$(rpm -q --qf "%{VERSION}-%{RELEASE}" kernel); \
KERNEL_VER_ARCH="${KERNEL_VER}.$(uname -m)"; \
dnf install -y git make "kernel-devel-${KERNEL_VER}" python3-pyserial && \
dnf clean all && \
git clone https://github.com/pmtk/serialsim.git /tmp/serialsim && \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not pull sources from a private repo - is there a public one?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, I was surprised by this, though. But I think Patryk did it this way because some custom changes are needed in serialism repo. This is the PR where Patryk add it for the first time.

cd /tmp/serialsim && \
make KERNEL="${KERNEL_VER_ARCH}" all install && \
rm -rf /tmp/serialsim

# {{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,24 @@ RUN firewall-offline-cmd --zone=public --add-port=22/tcp && \
firewall-offline-cmd --zone=public --add-port=443/tcp && \
firewall-offline-cmd --zone=public --add-port=5353/udp && \
firewall-offline-cmd --zone=public --add-port=6443/tcp && \
firewall-offline-cmd --zone=public --add-port=8889/tcp && \
firewall-offline-cmd --zone=public --add-port=30000-32767/tcp && \
firewall-offline-cmd --zone=public --add-port=30000-32767/udp

# Prepare system for testing Generic Device Plugin.
# Upgrade the kernel to keep the same procedure with RHEL and CentOS.
# CentOS requires upgrade because of a different package retention policy
# which means that the kernel in the base bootc image might no longer
# be available in the repositories.
# hadolint ignore=DL3003
RUN dnf upgrade kernel -y && \
KERNEL_VER=$(rpm -q --qf "%{VERSION}-%{RELEASE}" kernel); \
KERNEL_VER_ARCH="${KERNEL_VER}.$(uname -m)"; \
dnf install -y git make "kernel-devel-${KERNEL_VER}" python3-pyserial && \
dnf clean all && \
git clone https://github.com/pmtk/serialsim.git /tmp/serialsim && \
cd /tmp/serialsim && \
make KERNEL="${KERNEL_VER_ARCH}" all install && \
rm -rf /tmp/serialsim

# {{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,23 @@ RUN firewall-offline-cmd --zone=public --add-port=22/tcp && \
firewall-offline-cmd --zone=public --add-port=443/tcp && \
firewall-offline-cmd --zone=public --add-port=5353/udp && \
firewall-offline-cmd --zone=public --add-port=6443/tcp && \
firewall-offline-cmd --zone=public --add-port=8889/tcp && \
firewall-offline-cmd --zone=public --add-port=30000-32767/tcp && \
firewall-offline-cmd --zone=public --add-port=30000-32767/udp

# Prepare system for testing Generic Device Plugin.
# Upgrade the kernel to keep the same procedure with RHEL and CentOS.
# CentOS requires upgrade because of a different package retention policy
# which means that the kernel in the base bootc image might no longer
# be available in the repositories.
# hadolint ignore=DL3003
RUN dnf upgrade kernel -y && \
KERNEL_VER=$(rpm -q --qf "%{VERSION}-%{RELEASE}" kernel); \
KERNEL_VER_ARCH="${KERNEL_VER}.$(uname -m)"; \
dnf install -y git make "kernel-devel-${KERNEL_VER}" python3-pyserial && \
dnf clean all && \
git clone https://github.com/pmtk/serialsim.git /tmp/serialsim && \
cd /tmp/serialsim && \
make KERNEL="${KERNEL_VER_ARCH}" all install && \
rm -rf /tmp/serialsim
# {{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ RUN firewall-offline-cmd --zone=public --add-port=22/tcp && \
firewall-offline-cmd --zone=public --add-port=443/tcp && \
firewall-offline-cmd --zone=public --add-port=5353/udp && \
firewall-offline-cmd --zone=public --add-port=6443/tcp && \
firewall-offline-cmd --zone=public --add-port=8889/tcp && \
firewall-offline-cmd --zone=public --add-port=30000-32767/tcp && \
firewall-offline-cmd --zone=public --add-port=30000-32767/udp
# {{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,24 @@ RUN firewall-offline-cmd --zone=public --add-port=22/tcp && \
firewall-offline-cmd --zone=public --add-port=443/tcp && \
firewall-offline-cmd --zone=public --add-port=5353/udp && \
firewall-offline-cmd --zone=public --add-port=6443/tcp && \
firewall-offline-cmd --zone=public --add-port=8889/tcp && \
firewall-offline-cmd --zone=public --add-port=30000-32767/tcp && \
firewall-offline-cmd --zone=public --add-port=30000-32767/udp

# Prepare system for testing Generic Device Plugin.
# Upgrade the kernel to keep the same procedure with RHEL and CentOS.
# CentOS requires upgrade because of a different package retention policy
# which means that the kernel in the base bootc image might no longer
# be available in the repositories.
# hadolint ignore=DL3003
RUN dnf upgrade kernel -y && \
KERNEL_VER=$(rpm -q --qf "%{VERSION}-%{RELEASE}" kernel); \
KERNEL_VER_ARCH="${KERNEL_VER}.$(uname -m)"; \
dnf install -y git make "kernel-devel-${KERNEL_VER}" python3-pyserial && \
dnf clean all && \
git clone https://github.com/pmtk/serialsim.git /tmp/serialsim && \
cd /tmp/serialsim && \
make KERNEL="${KERNEL_VER_ARCH}" all install && \
rm -rf /tmp/serialsim

# {{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ ports = [
"443:tcp",
"5353:udp",
"6443:tcp",
"8889:tcp",
"30000-32767:tcp",
"30000-32767:udp",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ ports = [
"443:tcp",
"5353:udp",
"6443:tcp",
"8889:tcp",
"30000-32767:tcp",
"30000-32767:udp",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ version = "{{ env.Getenv "BREW_EC_RELEASE_VERSION" }}"
name = "microshift-test-agent"
version = "*"

[[packages]]
name = "systemd-resolved"
version = "*"

[customizations.services]
enabled = ["microshift", "microshift-test-agent"]

Expand All @@ -53,6 +57,7 @@ ports = [
"443:tcp",
"5353:udp",
"6443:tcp",
"8889:tcp",
"30000-32767:tcp",
"30000-32767:udp",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ version = "{{ env.Getenv "BREW_NIGHTLY_RELEASE_VERSION" }}"
name = "microshift-test-agent"
version = "*"

[[packages]]
name = "systemd-resolved"
version = "*"

[customizations.services]
enabled = ["microshift", "microshift-test-agent"]

Expand All @@ -53,6 +57,7 @@ ports = [
"443:tcp",
"5353:udp",
"6443:tcp",
"8889:tcp",
"30000-32767:tcp",
"30000-32767:udp",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ version = "{{ env.Getenv "BREW_RC_RELEASE_VERSION" }}"
name = "microshift-test-agent"
version = "*"

[[packages]]
name = "systemd-resolved"
version = "*"

[customizations.services]
enabled = ["microshift", "microshift-test-agent"]

Expand All @@ -53,6 +57,7 @@ ports = [
"443:tcp",
"5353:udp",
"6443:tcp",
"8889:tcp",
"30000-32767:tcp",
"30000-32767:udp",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ version = "{{ env.Getenv "BREW_Y0_RELEASE_VERSION" }}"
name = "microshift-test-agent"
version = "*"

[[packages]]
name = "systemd-resolved"
version = "*"

[customizations.services]
enabled = ["microshift", "microshift-test-agent"]

Expand All @@ -53,6 +57,7 @@ ports = [
"443:tcp",
"5353:udp",
"6443:tcp",
"8889:tcp",
"30000-32767:tcp",
"30000-32767:udp",
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{{- if env.Getenv "BREW_LREL_RELEASE_VERSION" "" -}}
{{- /*

We wrap this template in a test so that the body of the output is
empty when there is no "current" version release. The output file
must end up completely empty, so we need to remove whitespace from
around the first and last template instructions.

*/ -}}

name = "rhel-9.6-microshift-brew-tuned-4.{{ .Env.MINOR_VERSION}}-{{ .Env.LATEST_RELEASE_TYPE}}"
description = "A RHEL 9.6 image with already built and released RPMs like EC, RC, or Z-stream release: {{ .Env.BREW_LREL_RELEASE_VERSION }}"
version = "0.0.1"
modules = []
groups = []
distro = "rhel-96"

# Parent specification directive recognized by test/bin/build_images.sh to be
# used with the '--parent' argument of 'osbuild-composer'
# parent = "rhel-9.6-microshift-brew-optionals-4.{{ .Env.PREVIOUS_MINOR_VERSION }}-zstream"

{{ range (env.Getenv "MICROSHIFT_MANDATORY_RPMS" | strings.Split " ") }}
[[packages]]
name = "{{ . }}"
version = "{{ env.Getenv "BREW_LREL_RELEASE_VERSION" }}"
{{ end }}

{{ range (env.Getenv "MICROSHIFT_OPTIONAL_RPMS" | strings.Split " ") }}
[[packages]]
name = "{{ . }}"
version = "{{ env.Getenv "BREW_LREL_RELEASE_VERSION" }}"
{{ end }}

{{- if and (env.Getenv "UNAME_M" "") (eq "x86_64" .Env.UNAME_M) }}
{{ range (env.Getenv "MICROSHIFT_X86_64_RPMS" | strings.Split " ") }}
[[packages]]
name = "{{ . }}"
version = "{{ env.Getenv "BREW_LREL_RELEASE_VERSION" }}"
{{ end }}
{{- end }}

[[packages]]
name = "microshift-test-agent"
version = "*"

[[packages]]
name = "systemd-resolved"
version = "*"

{{- if and (env.Getenv "UNAME_M" "") (eq "x86_64" .Env.UNAME_M) }}
# Kernel RT is only available for x86_64
[customizations.kernel]
name = "kernel-rt"
{{- end }}

[customizations.services]
enabled = ["microshift-test-agent", "microshift", "microshift-tuned"]

[customizations.firewall]
ports = [
"22:tcp",
"80:tcp",
"443:tcp",
"5353:udp",
"6443:tcp",
"8889:tcp",
"30000-32767:tcp",
"30000-32767:udp",
]

[customizations.firewall.services]
enabled = ["mdns", "ssh", "http", "https"]

[[customizations.firewall.zones]]
name = "trusted"
sources = ["10.42.0.0/16", "169.254.169.1", "fd01::/48"]

[[customizations.files]]
path = "/etc/microshift/config.yaml"
data = """
kubelet:
cpuManagerPolicy: static
cpuManagerPolicyOptions:
full-pcpus-only: "true"
cpuManagerReconcilePeriod: 5s
memoryManagerPolicy: Static
topologyManagerPolicy: single-numa-node
reservedSystemCPUs: 0-1
reservedMemory:
- limits:
memory: 1100Mi
numaNode: 0
kubeReserved:
memory: 500Mi
systemReserved:
memory: 500Mi
evictionHard:
imagefs.available: 15%
memory.available: 100Mi
nodefs.available: 10%
nodefs.inodesFree: 5%
evictionPressureTransitionPeriod: 0s
"""

[[customizations.files]]
path = "/etc/tuned/microshift-baseline-variables.conf"
data = """
# Isolated cores should be complementary to kubelet's reserved CPUs.
# Isolated and reserved CPUs should contain all online CPUs.
# Core #3 is for testing offlining hence skipped.
isolated_cores=2,4-5
hugepages_size=2M
hugepages=10
additional_args=test1=on test2=true dummy
offline_cpu_set=3
"""

[[customizations.files]]
path = "/etc/microshift/tuned.yaml"
data = """
profile: microshift-baseline
reboot_after_apply: True
"""

{{- end -}}
28 changes: 28 additions & 0 deletions test/scenarios-bootc/releases/el96-lrel@optional.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

# Sourced from scenario.sh and uses functions defined there.

# Redefine network-related settings to use the dedicated network bridge
VM_BRIDGE_IP="$(get_vm_bridge_ip "${VM_MULTUS_NETWORK}")"
# shellcheck disable=SC2034 # used elsewhere
WEB_SERVER_URL="http://${VM_BRIDGE_IP}:${WEB_SERVER_PORT}"

scenario_create_vms() {
prepare_kickstart host1 kickstart-bootc.ks.template "rhel96-bootc-brew-${LATEST_RELEASE_TYPE}-with-optional"
# Two nics - one for macvlan, another for ipvlan (they cannot enslave the same interface)
launch_vm --boot_blueprint rhel96-bootc --network "${VM_MULTUS_NETWORK},${VM_MULTUS_NETWORK}"
}

scenario_remove_vms() {
remove_vm host1
}

scenario_run_tests() {
run_tests host1 \
--variable "PROMETHEUS_HOST:$(hostname)" \
--variable "PROMETHEUS_PORT:9092" \
--variable "LOKI_HOST:$(hostname)" \
--variable "LOKI_PORT:3200" \
--variable "PROM_EXPORTER_PORT:8889" \
suites/optional/
}
Loading