Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BuildConfiguration objects to build RStudio and CUDA R RStudio notebooks oc OCP cluster #118

Merged

Conversation

atheo89
Copy link
Member

@atheo89 atheo89 commented Jan 24, 2024

This PR fixes:
https://issues.redhat.com/browse/RHOAIENG-1478
https://issues.redhat.com/browse/RHOAIENG-315

This pull request introduces two BuildConfig objects, enabling users to create an RStudio Workbench on their cluster.
The branch that hosts the RStudio dockerfile is hosted on f/rstudio-rhel9 branch

Probably a good enhancement on this implementation is to, have prebuild the base-rhel9 image in order to avoid its build all the time. This enchancment has already stated on this PR: #123 However, this implementation it stand alone as is now.

How has been Tested

There are two ways to deploy the new Build Configs

The first and the recommended is (Deploy the configs outside from RHOAI):

  1. Login on the cluster:
    oc login <ocp cluster url>

  2. Enter on redhat-ods-applications namespace if you use RHOAI or opendatahub if you use ODH
    oc project redhat-ods-applications

  3. Create a secret, PM me to provide you testing credentials:
    oc create secret generic rhel-subscription-secret --from-literal=USERNAME=<username> --from-literal=PASSWORD=<pass> --from-literal=BASEURL=<baseurl> --from-literal=SERVERURL=<serverurl> -n redhat-ods-applications

  4. Run the rstudio-buildconfig.yaml file to to deploy the simple version of RStudio:
    oc apply -f rstudio-buildconfig.yaml -n redhat-ods-applications
    Or run the cuda-rstudio-buildconfig.yaml to build the CUDA version of RStudio:
    oc apply -f cuda-rstudio-buildconfig.yaml-n redhat-ods-applications

  5. After creating all the objects, navigate to the BuildConfig and initiate the build process as illustrated in the image:

image

  1. Once the builds are complete means that the RStudio workbench is ready
    image

  2. To add Workbench to the list of notebooks, start by obtaining the image from the rstudio-rhel9 Image Stream and importing it as a custom notebook, following the instructions in the image below:
    image

  3. Spin up the workbench that you just created
    image

The second way is (Deploy the configs inside RHOAI, as it is implemented already):

  1. Edit the DSC of the operator with the following:
    workbenches:
      devFlags:
        manifests:
          - contextDir: components/odh-notebook-controller/config
            sourcePath: ''
            uri: 'https://github.com/opendatahub-io/kubeflow/tarball/v1.7.0-5'
          - contextDir: components/notebook-controller/config
            sourcePath: ''
            uri: 'https://github.com/opendatahub-io/kubeflow/tarball/v1.7.0-5'
          - contextDir: ''
            sourcePath: base
            uri: >-
              https://github.com/red-hat-data-services/notebooks/tarball/pull/118/head
  1. Create a secret, PM me to provide you testing credentials:
    oc create secret generic rhel-subscription-secret --from-literal=USERNAME=<username> --from-literal=PASSWORD=<pass> --from-literal=BASEURL=<baseurl> --from-literal=SERVERURL=<serverurl> -n redhat-ods-applications

  2. Follow the same steps from (5) till the end

@atheo89 atheo89 changed the title Add BuildConfiguration objects to build RStudio and CUDAR RStudio notebooks oc OCP cluster Add BuildConfiguration objects to build RStudio and CUDA R RStudio notebooks oc OCP cluster Jan 25, 2024
@atheo89 atheo89 force-pushed the add-buildconfig-for-rstudio branch 4 times, most recently from 260c9cc to ff485b3 Compare January 25, 2024 11:27
@atheo89 atheo89 mentioned this pull request Jan 25, 2024
@jiridanek
Copy link
Member

What's RHOAI 2.7 going to do? The second option? So when I install the Operator, it will automatically deploy the buildconfigs for me, so I then need to create rhel-subscription-secret, and trigger the build?

@atheo89 atheo89 force-pushed the add-buildconfig-for-rstudio branch 2 times, most recently from 0eb062b to c2b5b35 Compare February 1, 2024 15:05
Copy link
Member

@harshad16 harshad16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the discussions, we can perhaps include additional details on the imagestream, so user can directly use these in the RHOAI dashboard

PTAL at suggestions

manifests/base/rstudio-buildconfig.yaml Outdated Show resolved Hide resolved
manifests/base/cuda-rstudio-buildconfig.yaml Outdated Show resolved Hide resolved
manifests/base/cuda-rstudio-buildconfig.yaml Outdated Show resolved Hide resolved
manifests/base/cuda-rstudio-buildconfig.yaml Outdated Show resolved Hide resolved
manifests/base/rstudio-buildconfig.yaml Outdated Show resolved Hide resolved
@atheo89 atheo89 force-pushed the add-buildconfig-for-rstudio branch from c2b5b35 to d850634 Compare February 2, 2024 09:09
@atheo89 atheo89 force-pushed the add-buildconfig-for-rstudio branch from d850634 to 1698067 Compare February 2, 2024 09:19
@atheo89
Copy link
Member Author

atheo89 commented Feb 2, 2024

Created this PR #127 with two fixes on the CUDA Dockerfile

@atheo89 atheo89 force-pushed the add-buildconfig-for-rstudio branch 3 times, most recently from 7466816 to aa8cfde Compare February 2, 2024 11:14
@atheo89 atheo89 requested a review from harshad16 February 2, 2024 12:26
@atheo89 atheo89 force-pushed the add-buildconfig-for-rstudio branch from 8cde95a to 2eff051 Compare February 2, 2024 14:00
@harshad16
Copy link
Member

Created this PR #127 with two fixes on the CUDA Dockerfile

@atheo89 , if we switch to ARG, then we might have to pass in the buildarg on buildconfig:https://docs.openshift.com/container-platform/3.11/dev_guide/builds/build_strategies.html#docker-strategy-build-args
however, i think buildconfig, buildarg doesn't support secrets yet.
https://access.redhat.com/solutions/4501551

@atheo89
Copy link
Member Author

atheo89 commented Feb 2, 2024

if we switch to ARG, then we might have to pass in the buildarg on buildconfig:https://docs.openshift.com/container-platform/3.11/dev_guide/builds/build_strategies.html#docker-strategy-build-args however, i think buildconfig, buildarg doesn't support secrets yet. https://access.redhat.com/solutions/4501551

I will add ENVs on the Dockerfiles as it was

@atheo89 atheo89 force-pushed the add-buildconfig-for-rstudio branch from 2eff051 to 3e1b267 Compare February 2, 2024 15:35
@atheo89 atheo89 force-pushed the add-buildconfig-for-rstudio branch from 3e1b267 to ac0c6ee Compare February 2, 2024 15:39
Copy link
Member

@harshad16 harshad16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

thanks for the work 💯

@openshift-ci openshift-ci bot added the lgtm label Feb 2, 2024
Copy link

openshift-ci bot commented Feb 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: harshad16

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Feb 2, 2024
@harshad16 harshad16 merged commit c203a8e into red-hat-data-services:main Feb 2, 2024
3 of 6 checks passed
@atheo89 atheo89 deleted the add-buildconfig-for-rstudio branch October 23, 2024 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants