Skip to content

Bundle Installation

This section describes the method to do a manual installation of the corridor-platform.

There is a command-line interface available with each component that is installed:

  • Web Application Server: corridor-app
  • API Server: corridor-api
  • API - Celery worker: corridor-worker
  • Spark - Celery worker: corridor-worker
  • Jupyter Notebook: corridor-jupyter

Pre Requisites

Before starting, ensure that the Minimum Requirements and System Dependencies are met.

Installation

To perform an install, take the installation bundle provided and extract it into a temporary location and run the install script inside it:

unzip corridor-bundle.zip
sudo ./corridor-bundle/install [app|api|worker-api|worker-spark|jupyter]

When installing, install the specific components of the platform that are required. This will setup:

  • An appropriate virtual-environment inside the provided installation path
  • The configuration file for the component in that section

The complete set of arguments for the installation can be checked with ./corridor-bundle/install -h:

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.

Running the Application

Once the installation of the component is done, it can be run using the provided command-line tool for that component. Also, each component has 1 or more configuration files that may need changes.

Web Application Server

  • Configuration File: INSTALL_DIR/instances/INSTANCE_NAME/config/app_config.py
  • Run application server: INSTALL_DIR/venv/bin/corridor-app run
  • The WSGI application: corridor_app.wsgi:app

Note

The web server (corridor-app run) can be used for production, by setting the WSGI_SERVER config to gunicorn or auto. Avoid using Werkzeug for production.

API Server

  • Configuration File: INSTALL_DIR/instances/INSTANCE_NAME/config/api_config.py

  • Run application server: INSTALL_DIR/venv/bin/corridor-api run

  • The WSGI application: corridor_api.wsgi:app

To initialize the database, corridor-api db upgrade needs to be run.

Note

The web server (corridor-api run) can be used for production, by setting the WSGI_SERVER config to gunicorn or auto. Avoid using Werkzeug for production.

API - Celery worker

  • Configuration File: INSTALL_DIR/instances/INSTANCE_NAME/config/api_config.py
  • Run celery worker: INSTALL_DIR/venv/bin/corridor-worker run --queue api

Deprecations:

  • apilocal queue is deprecated and replaced with api queue. Support for apilocal queue will be removed in future releases.

Spark - Celery worker

  • Configuration File: INSTALL_DIR/instances/INSTANCE_NAME/config/api_config.py
  • Run celery worker: INSTALL_DIR/venv/bin/corridor-worker run --queue spark --queue quick_spark

Deprecations:

  • celery queue is deprecated and split into two queues - spark and quick_spark queue. Support for celery queue will be removed in future releases.

Jupyter Notebook

  • Configuration File:

    • Jupyter Hub: INSTALL_DIR/instances/INSTANCE_NAME/config/jupyterhub_config.py
    • Jupyter Notebook: INSTALL_DIR/instances/INSTANCE_NAME/config/jupyter_server_config.py
  • Run jupyterhub server: INSTALL_DIR/venv/bin/corridor-jupyter run