-
Notifications
You must be signed in to change notification settings - Fork 54
Using live code reload and debug mode
We know how to build and deploy REANA cluster from unreleased sources locally. This page shows how to deploy cluster with source code "mounted" in the cluster itself, so that we can perform code changes "live" and see the effects immediately inside the cluster.
The reana-dev cluster-create
helper command contains a mode
option that
allows to deploy the cluster in various modes. We are concerned with --mode debug
option here:
(reana) $ reana-dev cluster-create -m /var/reana:/var/reana --mode debug
This will mount the source code directory into the cluster.
Similarly, you can build the cluster with -b DEBUG=1
argument to switch
debugging on. This variable is checked in the Dockerfile
of cluster
components, and, when switched on, will install component source in editable
mode. This is basically doing pip install -e .
behind the scenes, which
allows for live code modifications.
(reana) $ reana-dev cluster-build --mode debug
As for the production-like mode, it is possible to build multiple Docker images in parallel:
(reana) $ reana-dev cluster-build --mode debug --parallel 8
Most of the time, you do not need the following 3 images during development: r-a-krb5,r-a-vomsproxy,r-a-rucio
. Therefore, you can exclude them when building the cluster.
(reana) $ reana-dev cluster-build --exclude-components=r-a-krb5,r-a-vomsproxy,r-a-rucio --mode debug --parallel 8
After the cluster is built, we can deploy REANA as follows:
(reana) $ reana-dev cluster-deploy --admin-email [email protected] --admin-password mysecretpassword --mode debug
If you are making changes to components that do not run in the cluster but are executed locally on your computer, such as reana-client
, you can enable live code reload by installing them in editable mode:
(reana) $ pip install -e ./reana-client
That's all! If you'd like to start stepping through the code to confirm whether you can live-reload and debug code, please see the dedicated Debugging page.
Congratulations! You have successfully installed REANA from sources, be it in production mode or in debug mode. You may now start your REANA developer journey.
If you are part of REANA CERN team, dedicated person from the team will help you with your first task.
If you are an external contributor, check one of the "good first issues".
REANA reproducible analysis platform
blog.reana.io | docs.reana.io | forum.reana.io | www.reana.io |
@gitter | @mattermost | @twitter
Introduction
Getting started
- Setting up your system
- Cloning sources
- Using production-like development mode
- Using live-code-reload and debug mode
Issue lifecycle
Understanding code base
Technology tips and tricks
- Tips for Docker
- Tips for Git
- Tips for GitLab
- Tips for Keycloak
- Tips for Kind
- Tips for Kubernetes
- Tips for OpenAPI
- Tips for PostgreSQL
- Tips for Python
- Tips for RabbitMQ
- Tips for SQLAlchemy