Our release process is automated via GitHub actions. Each release generates new OLM metadata with its container, an operator container, updates the OLM Catalog index container, and pushes all of these to the RHOAS Quay organization. These releases are available on the beta
channel in OperatorHub.
-
Installed https://github.com/git-chglog/git-chglog
-
Be on the list of the approved OperatorHub RHOAS developers
-
Create new release https://github.com/redhat-developer/app-services-operator/releases/new
-
Wait for the build to finish and check if operator was properly pushed
-
Update changelog
git-chglog -o CHANGELOG.md
-
Update release with the generated changelog version
-
Install catalog source with version of the operator (or wait for the automatic verification to be performed using catalog source)
-
Execute OperatorHub update for RHOAS
cd olm ./operatorhub.sh cd community-operators git push yourfork +currentBranch
-
Create PR to update Operator hub
-
Once merged test installation of the Operator from OperatorHub
The olm/olm-catalog
directory is managed by our release scripts. It contains the metadata files which are hosted by the index container. Each bundle is released as a separate container image named service-operator-bundle
with the version of the GitHub tag that triggered the release script. The olm/autoupdate.sh
script maintains this metadata.
The Operator container includes the Quarkus appplication which is responsible for managing the custom resources. The operator container is built by Quarkus JIB. The configuration is provided by application.properties. The GitHub action release workflow contains an example of these values being overidden to release the operator.
The index.Dockerfile file is the build file for the OLM catalog index container. These all share the same version, autolatest. They are released as quay.io/rhoas/service-operator-registry:autolatest
by the build job.
You can set the QUAY_ORGANIZATION
variable in github secrets. This will define where to publish and what to tag your containers as. Edit catalogsource.yaml
to use the new bundle repository. Within this organization, you need to create three repositories service-operator-bundle
, service-operator
, and service-operator-registry
. These repositories will need a user with read and write permissions, and this user will be used by the GitHub action and authenticate with the QUAY_ROBOTTOKEN
and QUAY_ROBOTACCOUNT
secrets.
The olm
directory contains the olm-metadata
directory necessary to recreate the index image, the olm-templates
directory which is used to create new bundles, the autoupdate.sh
script responsible for creating and updating the olm metadata, and the index.Dockerfile
and run_opm.sh
files which update the index. The catalogsource.yaml
file is used by your cluster to install and update the operator via the Operator Marketplace.
Currently, we use the RHOAS Quay organization container image repository. If you wish to deploy to your own organization you will need to update the catalogsource.yaml
file to use your own image, as well as updating several build files. In the future we hope to parameterize this.
The Clusterserviceversion file has a reference to the operator container. This should be updated with your container repository instead of rhoas
.
The only changes you need to make to the release.yaml
file to release to a custom container repository are override the maven build and set the container index image tag. Optionally you may wish to disable the push back to your main branch. autoupdate.sh
creates a new git commit, and the action pushes it to main.
autoupdate.sh is responsible for updating the olm bundle. An OLM bundle is a versioned release of the operator. References to quay.io/rhoas/
should be replaced with your organizations.
run_opm.sh builds the index image. quay.io/rhoas
references should be replaced here additionally.
The build requires the following Secrets set in the GitHub repository : * quay_robotaccount - a username which can be used to push the olm metadata container, index container, and operator container * quay_robottoken - a password which can be used to push the olm metadata container, index container, and operator container