Skip to main content

Deploy ChRIS_ui on OpenShift

1. Import the nodejs base image as an ImageStream

This command specifies which base image to use for source-to-image (s2i).

oc import-image nodejs:20 --confirm

2. Create BuildConfig and Deployment using oc new-app

The command oc new-app attempts to do the following: given a GitHub repo URL, create a BuildConfig, Deployment, Service, and start a build.

oc new-app --name chrisui \
--build-env=VITE_CHRIS_UI_URL='' \
--build-env=VITE_CHRIS_UI_USERS_URL='' \
--build-env=VITE_CHRIS_UI_AUTH_URL='' \
--build-env=VITE_PFDCM_URL='' \

3. Reconfigure the build

  • Set ref=refs/heads/master, so that full commit history is cloned for the sake of being able to generate the version string. See
  • Increase memory limit for build to 4GB
  • (optional) Set RunPolicy=SerialLatestOnly
  • (optional) Set successfulBuildsHistoryLimit and failedBuildsHistoryLimit
oc patch bc/chrisui --patch '{"spec":{"resources":{"limits":{"memory":"3814Mi"}},"runPolicy":"SerialLatestOnly","source":{"git":{"ref":"refs/heads/master"}},"successfulBuildsHistoryLimit":2,"failedBuildsHistoryLimit":2}}'

4. Create a Route

The easiest way to do this is through the OpenShift console.

To create a HTTPS route on a custom domain on the NERC, see here.

5. Add a GitHub Webhook for automatic updates

More information:

6. (Optional) Reconfigure the Deployment

Decrease memory and CPU limit. It's just an HTTP server, no need for much.

oc set resources deployment chrisui --limits=cpu=1,memory=3814Mi --requests=cpu=1,memory=3814Mi