### REANA Client Setup and First Connection Test Source: https://github.com/reanahub/reana/blob/master/helm/reana/templates/NOTES.txt Installs the REANA client, sets the necessary environment variables for connecting to the REANA server, and performs a basic connectivity test using 'reana-client ping'. ```shell # install REANA client pip install --user reana-client # set environment variables for REANA client export REANA_SERVER_URL=https://{{ .Values.reana_hostname }}:{{.Values.reana_hostport}} export REANA_ACCESS_TOKEN="$mytoken" # test connection to the REANA cluster reana-client ping ``` -------------------------------- ### Launch Colima VM with Kubernetes on macOS Source: https://github.com/reanahub/reana/wiki/Setting-up-your-system Starts a Colima virtual machine with Kubernetes enabled on macOS, suitable for REANA development. This example configures it for Apple Silicon with specific CPU, memory, and disk allocations. Ensure Colima and Homebrew are installed. ```shell colima start \ --activate \ --arch aarch64 \ --cpu 8 \ --disk 300 \ --kubernetes \ --memory 18 \ --mount-type virtiofs \ --profile default \ --verbose \ --vm-type vz \ --vz-rosetta ``` -------------------------------- ### Setup Virtual Environments and Install Dependencies Source: https://github.com/reanahub/reana/wiki/Testing Demonstrates the process of creating isolated Python virtual environments for REANA components and installing necessary dependencies. This ensures that different components do not interfere with each other's dependencies. ```shell cd ~/src/reana-server mkvirtualenv _reana_server -p python3.12 pip install --upgrade pip pip install '.[all]' --upgrade --use-feature=fast-deps cd ~/src/reana-workflow-controller mkvirtualenv _reana_server -p python3.12 pip install --upgrade pip pip install '.[all]' --upgrade --use-feature=fast-deps ``` -------------------------------- ### Run a Simple REANA Analysis Example Source: https://github.com/reanahub/reana/blob/master/helm/reana/templates/NOTES.txt Clones a sample REANA analysis repository, navigates into it, and submits the analysis workflow using the REANA client. This demonstrates a complete cycle of running an analysis on the REANA cluster. ```shell git clone https://github.com/reanahub/reana-demo-root6-roofit cd reana-demo-root6-roofit reana-client run -w demo ``` -------------------------------- ### Automated REANA Cluster Setup and Test Source: https://github.com/reanahub/reana/wiki/Using-production-like-development-mode A comprehensive one-liner command to automate the entire REANA cluster setup, component building, deployment, and running an example. Useful for CI integration tests or rapid local development bootstrapping. ```console (reana) $ reana-dev run-ci -m /var/reana:/var/reana \ -c r-d-helloworld \ --exclude-components=r-a-krb5,r-a-vomsproxy,r-a-rucio \ --admin-email john.doe@example.org \ --admin-password mysecretpassword ``` -------------------------------- ### Install WSL and Linux Distribution on Windows Source: https://github.com/reanahub/reana/wiki/Setting-up-your-system Installs the Windows Subsystem for Linux (WSL) and guides through setting up a Linux distribution. This enables running Linux development tools on Windows. Requires administrator privileges for PowerShell. ```powershell wsl --install ``` -------------------------------- ### Install Docker, Kubectl, Kind, Helm on Linux (Fedora) Source: https://github.com/reanahub/reana/wiki/Setting-up-your-system Installs essential development tools for REANA on Fedora Linux. This includes Docker for containerization, Kubectl for Kubernetes interaction, Kind for local Kubernetes clusters, and Helm for package management. Ensure you have sudo privileges. ```bash sudo dnf -y install dnf-plugins-core sudo dnf config-manager \ --add-repo \ https://download.docker.com/linux/fedora/docker-ce.repo sudo dnf install docker-ce docker-ce-cli containerd.io sudo systemctl enable --now docker sudo usermod -aG docker $USER sudo dnf install kubernetes-client curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64 chmod +x ./kind sudo mv ./kind /usr/local/bin sudo dnf install helm ``` -------------------------------- ### Run REANA Example Source: https://github.com/reanahub/reana/wiki/Using-production-like-development-mode Executes a REANA example workflow using the `reana-dev` tool. This is a way to test the deployed cluster's functionality. ```console (reana) $ reana-dev run-example -c r-d-helloworld ``` -------------------------------- ### Setup REANA Client Environment Source: https://github.com/reanahub/reana/wiki/Using-production-like-development-mode Sets up environment variables for the REANA client, including the server URL and access token for the deployed cluster's administrative account. ```console eval $(reana-dev client-setup-environment) ``` -------------------------------- ### Install pyenv using Homebrew on macOS Source: https://github.com/reanahub/reana/wiki/Setting-up-your-system Installs pyenv, a tool for managing multiple Python versions, using Homebrew on macOS. This is recommended for managing different Python environments required for REANA development. ```shell brew install pyenv ``` -------------------------------- ### Install reana-dev Helper Script Source: https://github.com/reanahub/reana/wiki/Cloning-sources Installs the 'reana-dev' helper script into the active Python virtual environment using pip. This script provides utility functions for REANA development, such as repository management. ```console (reana) $ pip install git+https://github.com/reanahub/reana.git#egg=reana ``` -------------------------------- ### Install Multiple Python Versions on Linux (Fedora) Source: https://github.com/reanahub/reana/wiki/Setting-up-your-system Installs multiple Python 3 versions (3.8 through 3.12) on Fedora Linux. This is useful for testing REANA client compatibility with different Python environments. ```bash sudo dnf install python38 python39 python310 python311 python312 ``` -------------------------------- ### Deploy REANA Cluster Source: https://github.com/reanahub/reana/wiki/Using-production-like-development-mode Deploys the REANA cluster components onto the created Kubernetes cluster. Requires administrator credentials for setup. ```console (reana) $ reana-dev cluster-deploy --admin-email john.doe@example.org --admin-password mysecretpassword ``` -------------------------------- ### Initialize REANA Database Source: https://github.com/reanahub/reana/blob/master/helm/reana/templates/NOTES.txt Initializes the database for a new REANA deployment. This script sets up the necessary database structure for the REANA server. It is executed within the REANA server pod in the Kubernetes cluster. ```shell kubectl -n {{ .Release.Namespace }} exec deployment/{{ .Release.Name }}-server -c rest-api -- \ ./scripts/create-database.sh ``` -------------------------------- ### Prepare Source Code Directory Source: https://github.com/reanahub/reana/wiki/Cloning-sources Creates and navigates into a new directory intended to hold the REANA source code. This is the initial step for organizing the development workspace. ```console mkdir -p ~/project/reana/src cd ~/project/reana/src ``` -------------------------------- ### Run REANA Workflow with reana-client Source: https://github.com/reanahub/reana/wiki/Using-production-like-development-mode Runs a REANA workflow using the `reana-client` CLI tool. This demonstrates using the client to interact with a deployed REANA cluster. ```console (reana) $ reana-client run -w helloworld-demo ``` -------------------------------- ### Run CI Tests for Demo Examples with reana-dev Source: https://github.com/reanahub/reana/wiki/Integrating This section shows how to run integration tests specifically for REANA demo examples. It includes loading Docker images for demos, submitting test jobs, and checking test results, allowing for phased execution of the test suite. ```shell $ reana-dev kind-load-docker-image -c DEMO $ reana-dev run-ci ... -c DEMO --submit-only ... $ reana-dev run-ci ... -c DEMO --check-only ``` -------------------------------- ### Install virtualenvwrapper Source: https://github.com/reanahub/reana/wiki/Cloning-sources Installs the virtualenvwrapper package, a set of extensions to the 'virtualenv' tool that makes managing Python virtual environments easier. This is a prerequisite for creating and managing REANA's development environment. ```bash pip install virtualenvwrapper ``` -------------------------------- ### Install Keycloak Helm Chart Source: https://github.com/reanahub/reana/wiki/Tips-for-Keycloak Installs the Keycloak Helm chart for local testing. Ensure all previous PVs/PVCs are deleted before installation. This command sets the service type to NodePort and specifies the admin password. ```bash helm install reana-keycloak oci://registry-1.docker.io/bitnamicharts/keycloak \ --set service.type=NodePort \ --set service.nodePorts.http=31234 \ --set auth.adminPassword=mysecretpassword ``` -------------------------------- ### Activate Virtual Environment and Run Tests Source: https://github.com/reanahub/reana/wiki/Testing Shows how to activate a previously created virtual environment and execute the component's test suite using the `run-tests.sh` script. ```shell workon _reana_server ./run-tests.sh workon _reana_workflow_controller ./run-tests.sh ``` -------------------------------- ### Create Kind Kubernetes Cluster Source: https://github.com/reanahub/reana/wiki/Using-production-like-development-mode Creates a Kubernetes-in-Docker (Kind) cluster and mounts a local directory into it for REANA data storage. This is the initial step for setting up a local REANA environment. ```console sudo mkdir /var/reana (reana) $ reana-dev cluster-create -m /var/reana:/var/reana ``` -------------------------------- ### REANA CLI Help Command Source: https://github.com/reanahub/reana/wiki/Using-production-like-development-mode Displays the comprehensive help information for the `reana-dev` command-line interface. This command lists various options and subcommands available for managing and interacting with REANA in production-like development environments. ```console (reana) $ reana-dev --help ``` -------------------------------- ### Fork REANA Repositories (Automatic) Source: https://github.com/reanahub/reana/wiki/Cloning-sources Automatically forks all REANA repositories using the reana-dev helper script and the GitHub CLI ('gh'). This method requires the 'gh' tool to be installed and configured for seamless, non-interactive repository forking. ```console (reana) $ reana-dev git-fork -c ALL --automatic ``` -------------------------------- ### Install Kubernetes Metrics Server Source: https://github.com/reanahub/reana/wiki/Tips-for-Kind Installs the Kubernetes metrics-server, which is required for `kubectl top nodes` to function locally on Kind. It involves applying a YAML configuration and editing the metrics-server deployment to enable insecure TLS. ```console $ kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml $ kubectl edit -n kube-system deployment/metrics-server # Add "--kubelet-insecure-tls" to spec.template.spec.containers[0].args and save. ``` -------------------------------- ### Install REANA Client in Editable Mode Source: https://github.com/reanahub/reana/wiki/Using-live-code-reload-and-debug-mode Enables live code reload for the REANA client by installing it in editable mode. This is useful when making changes to components executed locally, such as the client itself. ```python pip install -e ./reana-client ``` -------------------------------- ### Install Black Code Formatter Source: https://github.com/reanahub/reana/wiki/Tips-for-Python Command to install or upgrade the Black code formatter. Black is used for automatic code formatting to ensure consistency across the project, checked during CI builds. ```console pip install --upgrade black ``` -------------------------------- ### Create REANA Administrator User and Token Source: https://github.com/reanahub/reana/blob/master/helm/reana/templates/NOTES.txt Creates a new administrator user for the REANA system and generates an access token. This token is essential for authenticating administrative actions and is stored as a Kubernetes secret. ```shell mytoken=$(kubectl -n {{ .Release.Namespace }} exec deployment/{{ .Release.Name }}-server -c rest-api -- \ flask reana-admin create-admin-user --email john.doe@example.org \ --password mysecretpassword) ``` -------------------------------- ### REANA Cluster Debug Setup Commands Source: https://github.com/reanahub/reana/wiki/Debugging Commands to create a REANA cluster in debug mode, build components with debug flags, and deploy the cluster. This prepares the environment for interactive debugging. ```console $ reana-dev cluster-create --mode=debug ``` ```console $ reana-dev docker-build -b DEBUG=1 -c reana-server ``` ```console $ reana-dev kind-load-docker-image -c reana-server ``` ```console $ reana-dev cluster-deploy --admin-email john.doe@example.org --admin-password mysecretpassword --mode debug ``` -------------------------------- ### Sync REANA Repositories with Upstream Source: https://github.com/reanahub/reana/wiki/Cloning-sources Synchronizes your local REANA repositories with the upstream repository. This command fetches changes from 'upstream', merges them, and pushes them to your personal fork. It requires the `reana-dev` tool. ```shell reana-dev git-upgrade -c ALL ``` -------------------------------- ### Python Import Ordering Example Source: https://github.com/reanahub/reana/wiki/Tips-for-Python Demonstrates the recommended import order for Python files in the REANA project, following isort rules. Imports are grouped into built-in, external, and local modules, separated by empty lines for clarity. ```python from __future__ import absolute_import, print_function import logging import os from reana_commons.config import REANA_LOG_FORMAT, REANA_LOG_LEVEL from reana_commons.serial import serial_load from reana_commons.workflow_engine import create_workflow_engine_command from .config import CACHE_ENABLED from .utils import ( build_job_spec, check_cache, copy_workspace_from_cache, copy_workspace_to_cache, get_targeted_workflow_steps, poll_job_status, publish_cache_copy, publish_job_submission, publish_job_success, publish_workflow_failure, publish_workflow_start, ) ``` -------------------------------- ### Set up SSH Agent for GitHub Authentication Source: https://github.com/reanahub/reana/wiki/Cloning-sources Configures the SSH agent and adds the default SSH private key to it. This enables password-less authentication with GitHub, which is often required for cloning and pushing to repositories. ```console (reana) $ eval "$(ssh-agent -s)" (reana) $ ssh-add ~/.ssh/id_rsa ``` -------------------------------- ### View Alembic Migration History Source: https://github.com/reanahub/reana/wiki/Tips-for-SQLAlchemy Execute the 'reana-db alembic history' command via kubectl to display the sequence of Alembic migration versions and their descriptions. This helps in understanding the migration path and identifying specific versions. ```bash kubectl exec deployment/reana-server -- reana-db alembic history ``` ```sql ad93dae04483 -> 4801b98f6408 (head), Job started and finished times. c912d4f1e1cc -> ad93dae04483, Interactive sessions. -> c912d4f1e1cc, Quota tables. ``` -------------------------------- ### Build REANA Cluster Components Source: https://github.com/reanahub/reana/wiki/Using-production-like-development-mode Builds all the necessary Docker images for the REANA cluster components. This command can be parallelized for faster builds and allows excluding specific components. ```console (reana) $ reana-dev cluster-build ``` ```console (reana) $ reana-dev cluster-build --parallel 8 ``` ```console (reana) $ reana-dev cluster-build --exclude-components=r-a-krb5,r-a-vomsproxy,r-a-rucio --parallel 8 ``` -------------------------------- ### Clone REANA Repositories Locally Source: https://github.com/reanahub/reana/wiki/Cloning-sources Clones all REANA repositories from your personal GitHub fork. This command sets up both 'upstream' and 'origin' branches for your local copies. It requires the `reana-dev` tool and specifies the target user. ```shell (reana) $ reana-dev git-clone -c ALL -u johndoe ``` -------------------------------- ### Automate Component Tests with reana-dev Source: https://github.com/reanahub/reana/wiki/Testing Explains how to use the `reana-dev` helper script to automatically run all tests for a component, including the creation of virtual environments. The `-k` option can be used to preserve the environment after tests. ```shell reana-dev python-unit-tests -c r-j-controller -k ``` -------------------------------- ### Upgrade REANA Database Schema Source: https://github.com/reanahub/reana/blob/master/helm/reana/templates/NOTES.txt Executes the database schema upgrade process using Alembic. This command is typically run when upgrading from a previous REANA release series. It requires access to the Kubernetes cluster and the REANA server pod. ```shell kubectl -n {{ .Release.Namespace }} exec -i -t deployment/{{ .Release.Name }}-server -c rest-api -- reana-db alembic upgrade ``` -------------------------------- ### Run Python Unit Tests for a Component Source: https://github.com/reanahub/reana/wiki/Testing Illustrates how to run only Python unit tests for a specific REANA component by utilizing the `--check-pytest` option of the `run-tests.sh` script. ```shell workon _reana_server ./run-tests.sh --check-pytest ``` -------------------------------- ### Upgrade Alembic Migration to Head Source: https://github.com/reanahub/reana/wiki/Tips-for-SQLAlchemy Execute the 'reana-db alembic upgrade' command via kubectl to apply all pending migrations and bring the database schema to the latest version. This tests the forward migration path. ```bash kubectl exec deployment/reana-server -- reana-db alembic upgrade ``` ```sql INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. INFO [alembic.runtime.migration] Running upgrade ad93dae04483 -> 4801b98f6408, Job started and finished times. ``` -------------------------------- ### Create REANA Development Cluster with Worker Nodes Source: https://github.com/reanahub/reana/wiki/Tips-for-Kind Creates a local Kind cluster for REANA development, specifying the number of worker nodes for a more realistic scenario. The example mounts a local directory and enables debug mode. ```console $ reana-dev cluster-create -m /var/reana:/var/reana --mode debug --worker-nodes 3 ``` -------------------------------- ### Deploy REANA Cluster in Debug Mode Source: https://github.com/reanahub/reana/wiki/Tips-for-SQLAlchemy Command to deploy the REANA cluster in debug mode with specified admin credentials. This allows for easier inspection during the migration process. ```bash reana-dev cluster-deploy --admin-email john.doe@example.org --admin-password mysecretpassword --mode debug ``` -------------------------------- ### Access PostgreSQL and Check Table Schema Source: https://github.com/reanahub/reana/wiki/Tips-for-SQLAlchemy Connect to the REANA database pod using kubectl and then use psql to inspect the schema of the '__reana.job' table. This step is crucial for verifying schema changes after migration operations. ```bash kubectl exec -ti deployment/reana-db -- psql -U reana ``` ```sql reana=# \d __reana.job Table "__reana.job" Column | Type | Modifiers --------------------+-----------------------------+----------- ... finished_at | timestamp without time zone | started_at | timestamp without time zone | ... reana=# \q ``` -------------------------------- ### Create REANA Cluster in Debug Mode Source: https://github.com/reanahub/reana/wiki/Using-live-code-reload-and-debug-mode Command to create a REANA cluster with source code mounted for live debugging. This involves using the `reana-dev cluster-create` helper with the `--mode debug` option. ```console (reana) $ reana-dev cluster-create -m /var/reana:/var/reana --mode debug ``` -------------------------------- ### Flake8 Code Checker Configuration Source: https://github.com/reanahub/reana/wiki/Tips-for-Python Configuration settings for the Flake8 code checker, optimized to work with Black. This setup defines line length limits, ignored error codes, and complexity metrics to enforce coding standards during CI builds. ```ini [flake8] max-line-length = 89 ignore = E203, E231, E266, E501, W503, F403, F401 max-complexity = 18 select = B,C,E,F,W,T4,B9 ``` -------------------------------- ### Install Calico CNI Provider Source: https://github.com/reanahub/reana/wiki/Using-production-like-development-mode Installs the Calico Container Network Interface (CNI) provider for the Kubernetes cluster. This is required when the default Kind networking is disabled, enabling network policy management. ```kubectl kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.24.2/manifests/tigera-operator.yaml kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.24.2/manifests/custom-resources.yaml ``` -------------------------------- ### Fork REANA Repositories (Browser) Source: https://github.com/reanahub/reana/wiki/Cloning-sources Uses the reana-dev helper script to initiate the forking of all REANA repositories. This command opens browser tabs for manual forking, allowing the user to fork repositories into their GitHub account. The '-b firefox' argument specifies the browser to use. ```console (reana) $ eval "$(reana-dev git-fork -c ALL -b firefox)" ``` -------------------------------- ### Store Administrator Access Token as Kubernetes Secret Source: https://github.com/reanahub/reana/blob/master/helm/reana/templates/NOTES.txt Stores the generated administrator access token as a Kubernetes secret. This allows other services or users to securely access the REANA API using the administrator credentials. ```shell kubectl -n {{ .Release.Namespace }} create secret generic {{ .Release.Name }}-admin-access-token \ --from-literal=ADMIN_ACCESS_TOKEN="$mytoken" ``` -------------------------------- ### Build REANA Cluster in Debug Mode Source: https://github.com/reanahub/reana/wiki/Using-live-code-reload-and-debug-mode Builds the REANA cluster components with debugging enabled. This is achieved by passing the `-b DEBUG=1` argument, which ensures components are installed in editable mode, facilitating live code modifications. ```console (reana) $ reana-dev cluster-build --mode debug ``` -------------------------------- ### Install eralchemy2 for ER Diagram Generation Source: https://github.com/reanahub/reana/wiki/Tips-for-PostgreSQL Installs the eralchemy2 Python library, which is used to generate Entity-Relationship diagrams from database schemas. This is a prerequisite for visualizing the REANA database structure. ```bash pip install eralchemy2 ``` -------------------------------- ### Update Git Submodules Source: https://github.com/reanahub/reana/wiki/Tips-for-SQLAlchemy Command to update REANA project submodules. This ensures all dependencies are at the correct versions. ```bash reana-dev git-submodule --update ``` -------------------------------- ### Undeploy REANA Cluster Source: https://github.com/reanahub/reana/wiki/Tips-for-SQLAlchemy Command to undeploy the current REANA cluster. This is a prerequisite step before modifying the database schema. ```bash reana-dev cluster-undeploy ``` -------------------------------- ### Pop Git Stash Source: https://github.com/reanahub/reana/wiki/Tips-for-SQLAlchemy Command to reapply stashed Git changes. This restores the previously saved modifications to the database models. ```bash git stash pop ``` -------------------------------- ### Traefik Configuration Source: https://github.com/reanahub/reana/blob/master/helm/reana/README.md Configuration options related to Traefik, an edge router that makes publishing microservices easy. These settings control Traefik's installation and integration within the REANA cluster. ```APIDOC `traefik.enabled` - Description: Install Traefik in the cluster when installing REANA. - Default: `true` `traefik.external` - Description: Use an externally installed Traefik instance. - Default: `false` ``` -------------------------------- ### REANA Deployment Commands Source: https://github.com/reanahub/reana/wiki/Tips-for-GitLab These console commands are used to build the REANA development environment and deploy it to a cluster. It also includes a command to set up the client environment variables for connecting to the deployed server. ```console $ reana-dev cluster-build --mode debug $ reana-dev cluster-deploy --mode debug $ eval $(reana-dev client-setup-environment --server-hostname https://reana-johndoe.cern.ch:30443) ``` -------------------------------- ### Deploy REANA with Keycloak Source: https://github.com/reanahub/reana/wiki/Tips-for-Keycloak Deploys REANA using the `reana-dev` command-line tool. This command includes parameters for the admin email and password, enabling the integration with the previously configured Keycloak instance. ```bash reana-dev cluster-deploy --admin-email john.doe@example.org --admin-password mysecretpassword ``` -------------------------------- ### Stash Git Changes Source: https://github.com/reanahub/reana/wiki/Tips-for-SQLAlchemy Command to stash local changes in the Git repository. This is useful to keep the working directory clean before deploying an older version. ```bash git stash ``` -------------------------------- ### REANA Server Workflow Scheduling Readiness Check Level Source: https://github.com/reanahub/reana/blob/master/helm/reana/README.md Defines the level of checks performed to assess cluster readiness for starting new workflows. Higher values indicate more stringent checks. ```environment-variables REANA_WORKFLOW_SCHEDULING_READINESS_CHECK_LEVEL=9 # Values: 0 = no check # 1 = check running workflows # 2 = check available memory # 9 = perform all checks ``` -------------------------------- ### Generate Alembic Migration Source: https://github.com/reanahub/reana/wiki/Tips-for-SQLAlchemy Command to generate a new Alembic database migration using autogenerate. It executes within the reana-server pod and applies changes to the database. ```bash kubectl exec deployment/reana-server -- reana-db alembic revision --autogenerate -m "{{{description_of_your_change}}}" ``` -------------------------------- ### REANA Compute Backends Source: https://github.com/reanahub/reana/blob/master/helm/reana/README.md Defines the list of supported compute backends for running REANA workflows. Users can select from options like Kubernetes, HTCondor, or Slurm. ```configuration compute_backends: ["kubernetes", "htcondorcern", "slurmcern"] ``` -------------------------------- ### Run CI in Production Mode Source: https://github.com/reanahub/reana/wiki/Releasing Executes the REANA development tool to run Continuous Integration tests in a production-like environment. It mounts a local directory for persistence, excludes specific components, and specifies admin credentials. This is crucial for verifying release readiness. ```console $ reana-dev git-status -c CLUSTER -c CLIENT -c reana $ reana-dev run-ci -m /var/reana:/var/reana \ --exclude-components=r-a-krb5,r-a-vomsproxy -c r-d-helloworld \ --admin-email john.doe@example.org --admin-password xxxxxxxxx ``` -------------------------------- ### Add wdb Breakpoint in Python Code Source: https://github.com/reanahub/reana/wiki/Debugging Example of adding a wdb breakpoint in a Python file to enable interactive debugging. This line should be inserted where you want the debugger to pause execution. ```python import wdb; wdb.set_trace() ``` -------------------------------- ### Configure virtualenvwrapper Source: https://github.com/reanahub/reana/wiki/Cloning-sources Configures the shell environment to use virtualenvwrapper by sourcing its script. This step ensures that virtualenvwrapper commands are available in the current shell session. Users need to replace '/path/to/virtualenvwrapper.sh' with the actual path found using the 'which' command. ```bash source /path/to/virtualenvwrapper.sh ``` -------------------------------- ### Deploy REANA Cluster in Debug Mode Source: https://github.com/reanahub/reana/wiki/Using-live-code-reload-and-debug-mode Deploys the REANA cluster after it has been built in debug mode. This command requires specifying administrator credentials and confirms the debug mode activation. ```console (reana) $ reana-dev cluster-deploy --admin-email john.doe@example.org --admin-password mysecretpassword --mode debug ``` -------------------------------- ### Build and Push Specialized Docker Images Source: https://github.com/reanahub/reana/wiki/Releasing Builds and pushes specialized Docker images for the REANA-Job-Controller with specific compute backend support (e.g., Kubernetes, Slurm CERN, HTCondor CERN, Compute4PUNCH). It involves cleaning the environment, building with specific backend flags, tagging the image appropriately, and pushing it to the Docker registry. ```console # CERN image sudo git clean -d -ff -x reana-dev docker-build -c r-j-controller -b COMPUTE_BACKENDS=kubernetes,slurmcern,htcondorcern docker tag docker.io/reanahub/reana-job-controller:latest docker.io/reanahub/reana-job-controller-htcondorcern-slurmcern:0.95.0-alpha.1 docker push docker.io/reanahub/reana-job-controller-htcondorcern-slurmcern:0.95.0-alpha.1 # Compute4PUNCH image sudo git clean -d -ff -x reana-dev docker-build -c r-j-controller -b COMPUTE_BACKENDS=kubernetes,compute4punch docker tag docker.io/reanahub/reana-job-controller:latest docker.io/reanahub/reana-job-controller-compute4punch:0.95.0-alpha.1 docker push docker.io/reanahub/reana-job-controller-compute4punch:0.95.0-alpha.1 ```