Skip to content

Conversation

@Fiona-Waters
Copy link
Contributor

@Fiona-Waters Fiona-Waters commented Feb 12, 2024

Issue link

Resolves RHOAIENG-66
Resolves RHOAIENG-12

By default the dashboard route tls termination will be set to edge. The route is secured (https) with the Let’s Encrypt cert. The dashboard works as expected.
Screenshot from 2024-02-20 12-17-23

From what I can see, it is not possible to use reencrypt here with the dashboard route as Ray is not using a cert on the dashboard port. I think edge is a good option here.

When openshift_oauth = true, we will set the tls termination to reencrypt. This means that the oauth self signed cert will not be exposed.

What changes have been made

When openshift_oauth = false the dashboard route will use edge tls termination.
When openshift_oauth = true the dashboard route will use reencrypt tls termination.

Verification steps

  • On an OpenShift Cluster with RHOAI installed navigate to the RHOAI dashboard and start a Jupyter notebook server.
  • Install codeflare sdk from my branch. In the terminal enter the following commands:
git clone https://github.com/Fiona-Waters/codeflare-sdk.git -b reencrypt
pip install poetry
cd codeflare-sdk
poetry install
  • Choose a demo notebook
    1 - In the ClusterConfiguration set openshift_oauth=False

    • Run cluster.up()
    • Check the dashboard route - this should have tls set to edge in the openshift console.
    • The dashboard should work as expected and be secure

    2 - In the ClusterConfiguration set openshift_oauth=True

    • Run cluster.up()
    • Check the dashboard route - this should have tls set to reencrypt in the openshift console.
    • The dashboard should work as expected and be secure

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 12, 2024
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 12, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 12, 2024
@Fiona-Waters Fiona-Waters force-pushed the reencrypt branch 3 times, most recently from ec07209 to 0eb3877 Compare February 13, 2024 11:13
@Fiona-Waters Fiona-Waters force-pushed the reencrypt branch 2 times, most recently from 5668803 to 263808b Compare February 20, 2024 12:09
@Fiona-Waters Fiona-Waters changed the title [WIP] Replacing passthrough with reencrypt Updating tls encryption for ray dashboard route Feb 20, 2024
@Fiona-Waters Fiona-Waters marked this pull request as ready for review February 20, 2024 16:53
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 20, 2024
Copy link
Contributor

@tedhtchang tedhtchang left a comment

Choose a reason for hiding this comment

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

Good Job /lgtm Tested both cases on ODH2.7 with 0_basic_ray.ipynb notebook and

cluster = Cluster(ClusterConfiguration(
    name='raytest',
    namespace='default',
    num_workers=1,
    min_cpus=1,
    max_cpus=1,
    min_memory=2,
    max_memory=2,
    num_gpus=0,
    image="quay.io/project-codeflare/ray:latest-py39-cu118",
    instascale=False,
    openshift_oauth=True, # and False
    head_cpus=1,
    head_memory=2
))

Copy link
Contributor

@Bobbins228 Bobbins228 left a comment

Choose a reason for hiding this comment

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

/approve
Tested basic and Oauth routes working as expected Nice work Fiona!

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 21, 2024
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 21, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Bobbins228

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 Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 21, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit ca5b198 into project-codeflare:main Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants