Skip to content

Dev Guide - Updating OPCT components

OPCT project delivers the following components:

  • OPCT CLI: client-side utility to orchestrate the conformance workflow. It is delivered by binary and Contianer image.
  • Aggregator server: the aggregator server is the Sonobuoy service responsible to handle the status of the workflow steps, and aggregate the results. It is delivered as a Container image to a repository in OPCT registry, mirroring from the supported version by OPCT
  • OPCT Plugins: Plugins are step definition used by the workflow created by CLI. The steps are Kubernetes Pod definitions delivered as container images in quay.io/opct repository, and manifest defined in the CLI. Currently the following steps have it's own build definitions, and are released together in the plugins monorepo:
    • openshift-tests plugin
    • must-gather-monitoring
    • collector
    • tools

The table below summarizes the components:

Component Name Source/Doc Image
opct (cli) source quay.io/opct/opct
sonobuoy (mirror) mirror info quay.io/opct/sonobuoy
utility: tools source quay.io/opct/tools
plugin: openshift-tests source quay.io/opct/plugin-openshift-tests
plugin: artifacts-collector source quay.io/opct/lugin-artifacts-collector
plugin: must-gather-monitoring source quay.io/opct/lugin-artifacts-collector

The following sections describes the steps of how to release each component.

Table of Contents:

  • Container Image OS version update
  • Golang version update
  • Container image tools - utilities update (layered image)
  • Sonobuoy version update

Container Image OS version update

The project standarize to use the same version across all images shipped by the project: quay.io/fedora/fedora-minimal:${MAJOR}$

When the ${MAJOR} need to be changed, it's a practice to be changed across the following images:

Golang version update

Version update on CLI:

Version update on Plugin openshift-tests:

Container image tools - utilities update (layered image)

tools image handles utilities tools used by workflow steps (plugins), currently there are three main dependencies:

  • oc utility - OpenShift Client
  • jq utility - used to parse JSON files
  • camgi utility - utility to create unified report from must-gather

Those plugins are used by the images:

Steps to build the tools image:

  • step 1) Update required utilitieis (eg, bump jq, oc, etc) for each dependency in build.sh script

  • step 2) Update the static version of tools image:

In general tools image are released by y-stream when utilities are changed.

echo "v0.5.0" > tools/VERSION
  • step 3) Build and publish the image

If you want to build locally only, remove the COMMAND variable

make build-tools-release COMMAND=push EXPIRE=never
  • step 4) update the dependencies to new version

Updating Sonobuoy version

Sonobuoy is used by OPCT to orchestrate and aggregate the results of the test environment. The CLI wraps mostly sonobuoy CLI command customizing to OpenShift conformance environment.

The Sonobuoy is used as a library in the OPCT CLI (client-side), plugin openshift-tests, and in the server-side the aggregator. All components must use the same versions of Sonobuoy.

Update the Sonobuoy library

Steps to update the Sonobuoy librar in the openshift-tests plugin:

  • Edit the go.mod
  • Update the library github.com/vmware-tanzu/sonobuoy version to [supported one][sb-version]
  • Open a PR with your changes
  • Merge it
  • (optional) Create a release
  • Create a release (or just test it on CLI using command run --plugins-image=your image)

Steps to update the Sonobuoy library in CLI project:

  • Edit the go.mod
  • Update the library github.com/vmware-tanzu/sonobuoy version to [supported one][sb-version]
  • Update the plugins image
  • Open a PR with your changes

Mirror Sonobuoy aggregator server image

Steps to check if Sonobuoy provides images to the target platform in the version used by OPCT:

1) Check the Sonobuoy version used by OPCT

$ go list -m github.com/vmware-tanzu/sonobuoy
github.com/vmware-tanzu/sonobuoy v0.57.3

2) Check the Sonobuoy images built for the version required by OPCT

$ skopeo list-tags docker://docker.io/sonobuoy/sonobuoy | jq .Tags | grep -i v0.57.3
 "amd64-v0.57.3",
  "arm64-v0.57.3",
  "ppc64le-v0.57.3",
  "s390x-v0.57.3",
  "v0.57.3",
  "win-amd64-1809-v0.57.3",
  "win-amd64-1903-v0.57.3",
  "win-amd64-1909-v0.57.3",
  "win-amd64-2004-v0.57.3",
  "win-amd64-20H2-v0.57.3",

3) Bump the desired Sonobuoy version in the script mirror.sh to mirror the Sonobuoy image to the OPCT image repository.

4) Run the mirror script to mirror and push images to the OPCT registry:

(you must have permissions to quay.io/opct, otherwise you can hack it to push to yours)

make image-mirror-sonobuoy