Manual
Use a manual installation when you are deploying Corridor directly on VMs, bare metal, or cloud instances and want direct control over the operating system, process manager, web server, database, and storage.
This path applies to on-premises servers and VM-based cloud deployments such as EC2, Azure VMs, and Compute Engine.
Prerequisites
Section titled “Prerequisites”Before starting, ensure the minimum requirements are met.
You also need:
- Corridor installation bundle.
- Linux host access with privilege to install packages and create services.
- Python 3.11 or later.
- Java 8 or later for Spark worker functionality.
- Metadata database: PostgreSQL 11.7 or later, Oracle 19 or later, or SQL Server 2016 or later.
- Persistent file storage.
- Nginx, Apache, or another production reverse proxy.
- TLS certificate for browser-facing traffic.
Components
Section titled “Components”The installation bundle provides command-line entry points for each component:
- Web application server:
corridor-app - API server:
corridor-api - API Celery worker:
corridor-worker - Spark Celery worker:
corridor-worker - Jupyter Notebook server:
corridor-jupyter
Install Components
Section titled “Install Components”Extract the bundle and run the installer for each required component:
unzip corridor-bundle.zipsudo ./corridor-bundle/install [app | api | worker-api | worker-spark | jupyter]The installer creates:
- A component-specific virtual environment under the installation path.
- Configuration files under the selected instance name.
- Component entry points for running services.
Check installer options with:
usage: install [-h] [-i INSTALL_DIR] [-n NAME] component
positional arguments: component The component to install. Possible values are: api, app, worker-api, worker-spark, jupyter
optional arguments: -h, --help show this help message and exit -e EXTRAS [EXTRAS ...], --extras EXTRAS [EXTRAS ...] The extra packages to install -i INSTALL_DIR, --install-dir INSTALL_DIR The location to install the corridor package. Default value: /opt/corridor --overwrite Whether to overwrite the configs if already present. Default behavior is to create config files only if they don't already exist.Configure The API
Section titled “Configure The API”Update the API configuration, usually at:
INSTALL_DIR/instances/INSTANCE_NAME/config/api_config.pyConfigure the database connection string, file storage, authentication, email, and other platform settings required by your environment.
Run database migrations:
INSTALL_DIR/venv-api/bin/corridor-api db upgradeRun Components
Section titled “Run Components”Web Application Server
Section titled “Web Application Server”- Configuration file:
INSTALL_DIR/instances/INSTANCE_NAME/config/app_config.py - Run command:
INSTALL_DIR/venv-app/bin/corridor-app run - WSGI application:
corridor_app.wsgi:app
Set WSGI_SERVER to gunicorn or auto for production. Do not use Werkzeug for production.
API Server
Section titled “API Server”- Configuration file:
INSTALL_DIR/instances/INSTANCE_NAME/config/api_config.py - Run command:
INSTALL_DIR/venv-api/bin/corridor-api run - WSGI application:
corridor_api.wsgi:app
Set WSGI_SERVER to gunicorn or auto for production. Do not use Werkzeug for production.
API Worker
Section titled “API Worker”- Configuration file:
INSTALL_DIR/instances/INSTANCE_NAME/config/api_config.py - Run command:
INSTALL_DIR/venv-api/bin/corridor-worker run --queue api
If the process runs as root, set C_FORCE_ROOT=1.
Spark Worker
Section titled “Spark Worker”- Configuration file:
INSTALL_DIR/instances/INSTANCE_NAME/config/api_config.py - Run command:
INSTALL_DIR/venv-api/bin/corridor-worker run --queue spark --queue quick_spark
The Spark worker should run on a machine configured as a Spark gateway or edge node. It should be able to import pyspark and reach the target Spark cluster.
Jupyter Notebook
Section titled “Jupyter Notebook”- Jupyter Hub configuration file:
INSTALL_DIR/instances/INSTANCE_NAME/config/jupyterhub_config.py - Jupyter Notebook configuration file:
INSTALL_DIR/instances/INSTANCE_NAME/config/jupyter_notebook_config.py - Run command:
INSTALL_DIR/venv-jupyter/bin/corridor-jupyter run
Process Management
Section titled “Process Management”Use systemd, Supervisor, or your standard process manager. A typical systemd service follows this shape:
[Unit]Description=Corridor API ServerAfter=network.target
[Service]Type=simpleUser=corridorGroup=corridorEnvironment=CORRIDOR_CONFIG_DIR=/opt/corridor/instances/default/configEnvironment=WSGI_SERVER=gunicornExecStart=/opt/corridor/venv-api/bin/corridor-api runRestart=always
[Install]WantedBy=multi-user.targetAfter creating services:
sudo systemctl daemon-reloadsudo systemctl enable corridor-app corridor-api corridor-worker-api corridor-worker-spark corridor-jupytersudo systemctl start corridor-app corridor-api corridor-worker-api corridor-worker-spark corridor-jupyterReverse Proxy
Section titled “Reverse Proxy”Place Nginx, Apache, or an approved load balancer in front of the application services:
- Route browser traffic for the main app to the web application server.
- Route API traffic to the API server if your topology separates app and API.
- Route
/jupyterto the Jupyter service. - Terminate TLS at the reverse proxy or load balancer.
- Set secure cookie and secret configuration values before production use.
Operations
Section titled “Operations”sudo systemctl status corridor-apisudo systemctl restart corridor-apijournalctl -u corridor-api -fFor cloud VM deployments, use the provider page for required cloud services: