Skip to content

Deploy on OpenShift

Jennings Zhang edited this page Feb 3, 2023 · 13 revisions
# Step 1: create "ImageStream"
# This indicates which image we want to use for s2i
oc import-image nodejs:18 --from=quay.io/fedora/nodejs-18 --confirm

# Step 2: create BuildConfig and Deployment
# the command `oc new-app` attempts to do almost everything:
# given a Github repo URL, create a BuildConfig, Deployment, Service,
# and start a build.
oc new-app nodejs:18~https://github.com/FNNDSC/ChRIS_ui.git
# Figure out how to set environment variables
# e.g. REACT_APP_CHRIS_UI_URL=https://cube.chrisproject.org/api/v1/
# and other stuff like the BuildConfig's `runPolicy: SerialLatestOnly`

# Step 3: increase memory limit
# Default limit is 2Gi mem, it needs to be increased
oc patch bc/chrisui --patch '{"spec":{"resources":{"limits":{"memory":"8Gi"}}}}'

# Step 4: add webhook to Github project
# https://docs.openshift.com/container-platform/4.7/cicd/builds/triggering-builds-build-hooks.html
# https://github.com/FNNDSC/ChRIS_ui/settings/hooks

# Step 5: everything works?

# Step 6: create route
Clone this wiki locally