An openshift deployment of review-rot
First log in using the appropriate oc login
command, then select or create
the OpenShift project that you will use.
oc create secret generic f2-reviewrot-frontend \
--from-literal=WebHookSecretKey=$(openssl rand -base64 12)
oc create secret generic f2-reviewrot-backend \
--from-literal=WebHookSecretKey=$(openssl rand -base64 12) \
--from-literal=github-token=${GITHUB_TOKEN} \
--from-literal=gitlab-token=${GITLAB_TOKEN}
oc create configmap f2-reviewrot-config --from-file=./configuration.yaml
oc create -f openshift-template.yaml
Specify the argument for the hostname to be used to access the frontend UI.
oc process f2-reviewrot-template -p FRONTEND_HOSTNAME=${FRONTEND_HOSTNAME} \
-p BACKEND_IMAGE=${BACKEND_IMAGE} | \
oc apply -f -
In the case of the internal Factory 2.0 deployment on the Upshift platform, the full command is:
oc process f2-reviewrot-template \
-p FRONTEND_HOSTNAME=f2-reviews.cloud.paas.psi.redhat.com \
-p BACKEND_IMAGE=docker-registry.default.svc:5000/f2-reviewrot/f2-reviewrot-backend \
| oc apply -f -
This is the most common update workflow and is performed when a change to the ReviewRot config is necessary.
First delete the old config:
oc delete configmap/f2-reviewrot-config
Then recreate the new one:
oc create configmap f2-reviewrot-config --from-file=./configuration.yaml
The new config will be used when the cronjob gets run next.
First delete the old template
oc delete template/f2-reviewrot-template
Then recreate it with the new version
oc create -f openshift-template.yaml
And finally, process the template
oc process f2-reviewrot-template \
-p FRONTEND_HOSTNAME=f2-reviews.cloud.paas.psi.redhat.com \
-p BACKEND_IMAGE=docker-registry.default.svc:5000/f2-reviewrot/f2-reviewrot-backend \
| oc apply -f -