Skip to content

stolostron/volsync-operator-product-build

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

volsync-operator-product-build

VolSync Operator Product Build to build downstream VolSync via Konflux

Getting Started

The main branch for this repo contains the renovate config renovate.json used by renovate for all branches. Look at the release-X.Y branches for configuration related to building the related X.Y release downstream of VolSync via konflux.

This repo contains submodules in order to have all the dependencies to build the VolSync Operator.

Current submodules:

To clone this repo and submodules it can be done in one step with:

git clone https://github.com/stolostron/volsync-operator-product-build.git --recurse-submodules

Or, after cloning the repo you can do this to pull the submodules:

cd volsync-operator-product-build
git submodule update --init --recursive

Updating

Submodules such as rclone, syncthing, diskrsync should not be updated unless the corresponding update is made in volsync itself.

When the volsync submodule is updated, the Dockerfile will need to be copied to Dockerfile.cached. The volsync build (building Dockerfile.rhtap) will fail if the Dockerfile.cached doesn't match the one in volsync. Not matching is usually an indicator something like one of the other submodules was updated.

If another submodule (rclone, syncthing, diskrsync) needs an update, make sure to update the proper GIT hashes in rhtap-buildargs.conf.

The rhtap-buildargs.conf file is also used during the bundle build and will contain the volsync image SHA to be packaged in the bundle image. Konflux nudges from the volsync component should keep this up-to-date.

Building locally

To build locally and simulate/exercise what the konflux build will do, you can do the following:

Build the volsync container

podman build --build-arg-file rhtap-buildargs.conf -f Dockerfile.rhtap -t volsync-container:local-build-latest .

Build the volsync bundle

podman build --build-arg-file rhtap-buildargs.conf -f bundle.Dockerfile.rhtap -t volsync-bundle:local-build-latest .

Editing RPM dependencies

If any dependencies are added or removed in the Dockerfiles then we will need to update rpms.in.yaml and rpms.lock.yaml

Using the rpm-lockfile-prototype tool

Steps to run it as a container (this has some manual steps as it seems we need to manually login to registry.redhat.io)

  1. First update the rpms.in.yaml
  2. Now start the container
container_dir=/work
podman run -it --entrypoint=/bin/bash -v ${PWD}:${container_dir} localhost/rpm-lockfile-prototype:latest
  1. Exec into the container and run the following:
skopeo login registry.redhat.io
...
rpm-lockfile-prototype --outfile=/work/rpms.lock.yaml /work/rpms.in.yaml

About

VolSync Operator Product Build to build downstream VolSync via Konflux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •