Skip to content

Latest commit

 

History

History
88 lines (54 loc) · 5.66 KB

release.adoc

File metadata and controls

88 lines (54 loc) · 5.66 KB

Release Process

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.

Process

Requirements

  1. Installed https://github.com/git-chglog/git-chglog

  2. Be on the list of the approved OperatorHub RHOAS developers

Procedure

  1. Create new release https://github.com/redhat-developer/app-services-operator/releases/new

  2. Wait for the build to finish and check if operator was properly pushed

  3. Update changelog

    git-chglog -o CHANGELOG.md
  4. Update release with the generated changelog version

  5. Install catalog source with version of the operator (or wait for the automatic verification to be performed using catalog source)

  6. Execute OperatorHub update for RHOAS

    cd olm
    ./operatorhub.sh
    cd community-operators
    git push yourfork +currentBranch
  7. Create PR to update Operator hub

  8. Once merged test installation of the Operator from OperatorHub

Additional Information

OLM metadata

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.

Operator Container

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.

OLM Catalog Index

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.

Customizing the release

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.

OLM Directory Structure

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.

Changing the container repository

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.

Update OLM Metadata

The Clusterserviceversion file has a reference to the operator container. This should be updated with your container repository instead of rhoas.

Updating GitHub action

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.

Updating update scripts

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.

Setting GitHub Variables

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