Branch workaround for RStudio image BuildConfig definition
Environment
- OpenShift AI
- 2.8.0
- 2.8.1
- 2.8.2
- 2.8.3
This issue is resolved from OpenShift AI version 2.8.4.
Issue
The definition of the RStudio BuildConfig file points to the wrong branch in OpenShift AI. Instead of main it should point to rhoai-2.8.
To use the RStudio and CUDA - RStudio workbench images in OpenShift AI, complete the following workaround steps before performing the manual build steps described in This content is not included.Building the RStudio Server notebook images.
As a prerequisite to performing the steps in this workaround, ensure that you have installed the OpenShift command-line interface (CLI). For more information about installing the OpenShift command-line interface (CLI), see This page is not included, but the link has been rewritten to point to the nearest parent document.Getting started with the OpenShift CLI.
Resolution
- Open a command-line terminal and log in to your OpenShift cluster:
$ oc login
- Create a new, empty directory.
- Within the directory that you created in the previous step, create a new YAML file, and paste the following content into the file:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://raw.githubusercontent.com/red-hat-data-services/notebooks/rhoai-2.8/manifests/base/rstudio-buildconfig.yaml
- https://raw.githubusercontent.com/red-hat-data-services/notebooks/rhoai-2.8/manifests/base/cuda-rstudio-buildconfig.yaml
namespace: redhat-ods-applications
patches:
- patch: |-
kind: ImageStream
apiVersion: image.openshift.io/v1
metadata:
annotations:
opendatahub.io/notebook-image-url: https://github.com/red-hat-data-services/notebooks/tree/rhoai-2.8/rstudio
name: rstudio-rhel9-rhoai28
target:
kind: ImageStream
name: rstudio-rhel9
options:
allowNameChange: true
- patch: |-
kind: ImageStream
apiVersion: image.openshift.io/v1
metadata:
name: cuda-rhel9-rhoai28
target:
kind: ImageStream
name: cuda-rhel9
options:
allowNameChange: true
- patch: |-
kind: ImageStream
apiVersion: image.openshift.io/v1
metadata:
annotations:
opendatahub.io/notebook-image-url: https://github.com/red-hat-data-services/notebooks/tree/rhoai-2.8/rstudio
name: cuda-rstudio-rhel9-rhoai28
target:
kind: ImageStream
name: cuda-rstudio-rhel9
options:
allowNameChange: true
- patch: |-
kind: BuildConfig
apiVersion: build.openshift.io/v1
metadata:
name: rstudio-server-rhel9-rhoai28
spec:
source:
git:
ref: rhoai-2.8
output:
to:
name: "rstudio-rhel9-rhoai28:latest"
target:
kind: BuildConfig
name: rstudio-server-rhel9
options:
allowNameChange: true
- patch: |-
kind: BuildConfig
apiVersion: build.openshift.io/v1
metadata:
name: cuda-rhel9-rhoai28
labels:
app: buildchain-rhoai28
component: cuda-rhel9-rhoai28
spec:
source:
git:
ref: rhoai-2.8
output:
to:
name: "cuda-rhel9-rhoai28:latest"
target:
kind: BuildConfig
name: cuda-rhel9
options:
allowNameChange: true
- patch: |-
kind: BuildConfig
apiVersion: build.openshift.io/v1
metadata:
name: cuda-rstudio-server-rhel9-rhoai28
labels:
app: buildchain-rhoai28
component: cuda-rstudio-server-image-rhoai28
spec:
source:
git:
ref: rhoai-2.8
strategy:
dockerStrategy:
from:
name: "cuda-rhel9-rhoai28:latest"
output:
to:
name: "cuda-rstudio-rhel9-rhoai28:latest"
target:
kind: BuildConfig
name: cuda-rstudio-server-rhel9
options:
allowNameChange: true
- Save the file inside the directory that you created with the name
kustomization.yaml. - In your command-line terminal, change to the directory that you created.
- Run the following command to process the YAML file:
$ oc kustomize --output rstudio-rhoai28.yaml
- Review
rstudio-rhoai28.yamland apply it to the cluster using the following command:
$ oc apply -f rstudio-rhoai28.yaml
After these workaround steps are complete, you can perform the manual build steps as described in This content is not included.Building the RStudio Server notebook images.
To verify that you have successfully applied rstudio-rhoai28.yaml to the cluster, start the RStudio Server notebook image and click Help -> About RStudio in the user interface. Confirm that the following message is displayed in the dialog:
RStudio 2023.06.1+524 "Mountain Hydrangea" Release (547dcf861cac0253a8abb52c135e44e02ba407a1, 2023-07-07) for RHEL 9
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.