Skip to content

Latest commit

 

History

History
85 lines (52 loc) · 3.91 KB

dev-setup.md

File metadata and controls

85 lines (52 loc) · 3.91 KB

Dev Setup

Requirements

ODH requires the following to run:

Additional tooling

Development

  1. Clone the repository
    git clone https://github.com/opendatahub-io/odh-dashboard
  2. Within the repo context, install project dependencies
    cd odh-dashboard && npm install

Build project

npm run build

Serve development content

This is the default context for running a local UI. Make sure you build the project using the instructions above prior to running the command below.

Note: You must be logged-in with oc before you can start the backend. Details for that are in the the contribution guidelines.

Note: The CLI logged-in user will need to be a cluster-admin level user on the cluster to mimic the Dashboard Service Account level of permissions. You could also bind the cluster role to your user as we do with the service account binding.

npm run start

If you'd like to run "backend" and "frontend" separately for development, cd into each directory in two different terminals and run npm run start:dev from each.

For in-depth local run guidance review the contribution guidelines.

Testing

Run the tests.

npm run test

For in-depth testing guidance review the testing guidelines

Dev Feature Flags

Feature flags are defined in the dashboard config. When testing on a live cluster, changing feature flags via the config affects all users on the cluster. It is also possible to personally control the enablement of feature flags within the browser session. Simply append ?devFeatureFlags to the dashboard URL. A blue banner will appear at the top of the page where a modal can be opened, allowing one to adjust the enablement of feature flags. These settings will persist for the length of the browser session.

With the dev feature flags modal opened, the browser URL will update to include the current feature flag enablement settings. The URL can then be bookmarked or shared.

Deploying the ODH Dashbard

Official Image Builds

odh-dashboard images are automatically built and pushed to quay.io after every commit to the main branch. The image tag name format for each image is main-<COMMIT SHORT HASH>.

Example: The main branch is updated with commit f76e3952834f453b1d085e8627f9c17297c2f64c. The CI system will automatically build an odh-dashboard image based on that code and push the new image to odh-dashboard:main-f76e395 and updated odh-dashboard:main to point to the same image hash.

The nightly tag is a floating tag that is updated nightly and points to the most recent main-<HASH> commit from the previous day.

Deploy using kustomize

The manifests folder contains a kustomize manifest that can be used with kustomize build.

Deploy using a kfdef

Note: This flow is deprecated, deploy v2 Operator with their custom CR.

The manifests/kfdef folder contains an example kfdef to deploy ODH Dashboard with the Notebook Controller backend is located in odh-dashboard-kfnbc-test.yaml.