Skip to content

Develop

Lorenzo Cavazzi edited this page Feb 20, 2025 · 20 revisions

Develop

ℹ️ This section refers to the React-based client and the Cypress tests. The Express-based server is deprecated.

Developing for Renku UI is easy! You will only need a recent version of NPM and Git.

Getting started

Once you clone the Renku UI repository locally, go into the client folder and install the dependencies with the npm install command. You can now start the Vite server with the command npm run start and the interface will be available at the local URL localhost:3000.

The web interface requires some backend components, and there are two ways to have them:

  • Create a full Renkulab deployment for development (re-using a public instance like renkulab.io isn't currently supported out-of-the-box).
  • Mock the responses from the APIs.

The first approach is recommended since all the backend resources will be available, but it requires access to the SDSC Kubernetes infrastructure. This is available to all the official Renku team members and can be extended to other SDSC employees and collaborators. Mind that deploying all the infrastructure separately is technically feasible but overkill.

The second approach relies on the existing Cypress tests in the tests folder that mock many responses from the APIs. It's much quicker and has no additional requirements, but it might be tedious if you need to mock many new responses.

Full deployment

If you have access to a full Renkulab dev deployment on the SDSC Kubernetes infrastructure, you can use Telepresence to swap the renku-ui pod with a local instance of the UI.

You need to install NPM to get the dependencies. Then you need Telepresence, Docker, and Kubectl to run a local instance of the UI and connect to the cluster.

The easiest way to get a deployment up and running is to use our CI automation on GitHub. Create a new PR with at least one commit and include in the description a line with the text /deploy. This will trigger the acceptance-tests workflow that deploys a dev instance of Renkulab reachable at the URL https://renku-ci-ui-<PR_number>.dev.renku.ch/. The process takes a few minutes and Renku Bot will post the exact URL.

You can now run the run-telepresence script, provide the PR number, and access the instance from the URL you got from Renku Bot. Mind that it takes up to a minute for the new telpresence-injected pod to start serving pages; until that moment, the page you get won't come from your local code.

ℹ️ Every time you commit and push to the same PR, the CI

Clone this wiki locally