Configuration

class cube_builder.config.Config

Base configuration with default flags.

This file consists in default arguments flags for Data Cube Builder environment.

Most of these settings can set configured using environment variables as following:

export DATA_DIR=/data/
export SQLALCHEMY_DATABASE_URI='postgresql://postgres:postgres@localhost:5432/bdc_catalog'
BDC_AUTH_ACCESS_TOKEN_URL = None

Access token url used for retrieving user info in BDC-Auth Defaults to None. Used when BDC_AUTH_REQUIRED is set.

BDC_AUTH_CLIENT_ID = None

Client ID generated by BDC-Auth. Defaults to None. Used when BDC_AUTH_REQUIRED is set.

BDC_AUTH_CLIENT_SECRET = None

Client secret generated by BDC-Auth. Defaults to None. Used when BDC_AUTH_REQUIRED is set.

BDC_AUTH_REQUIRED = 0

Flag to manage when a Auth is required. Defaults to 0, that means that there is not authorization request to access Cube Builder API.

DATA_DIR = '/data'

Directory to store the published data.

Inside this directory, the Cube-Builder will separate into identity and composed folders. Defaults to /data.

ITEM_PREFIX = '/cubes'

Set custom item prefix. This is useful to “pre-append” a prefix in published items and be available by STAC server. Defaults to /cubes/.

QUEUE_BLEND_CUBE = 'blend-cube'

Set a RabbitMQ queue name for Composed Data Cubes generation. Defaults to blend-cube.

QUEUE_IDENTITY_CUBE = 'merge-cube'

Set a RabbitMQ queue name for Identity Data Cube generation. Defaults to merge-cube.

QUEUE_PREPARE_CUBE = 'prepare-cube'

Set a RabbitMQ queue name for Post Processing of Identity Data Cubes. Defaults to prepare-cube.

QUEUE_PUBLISH_CUBE = 'publish-cube'

Set a RabbitMQ queue name for Publish Data Cubes. Defaults to publish-cube.

QUEUE_TRIGGER_CUBE = 'trigger-cube'

Set a RabbitMQ queue name for Triggering Data Cubes. Defaults to trigger-cube.

SQLALCHEMY_DATABASE_URI = 'postgresql://postgres:postgres@localhost:5432/bdc_catalog'

The database URI that should be used for the database connection. Defaults to 'postgresql://postgres:postgres@localhost:5432/bdc_catalog'.

SQLALCHEMY_ENGINE_OPTIONS = {'max_overflow': 5, 'pool_recycle': -1, 'pool_size': 2, 'poolclass': None}

Set SQLAlchemy engine options for pooling. You may set the following environment variables to customize pooling:

  • SQLALCHEMY_ENGINE_POOL_SIZE: The pool size. Defaults to 2.

  • SQLALCHEMY_ENGINE_MAX_OVERFLOW: Max pool overflow. Defaults to 5.

  • SQLALCHEMY_ENGINE_POOL_CLASS: The pool type for management.

  • SQLALCHEMY_ENGINE_POOL_RECYCLE: Define the given number of seconds to recycle pool. Defaults to -1, or no timeout.

WORK_DIR = '/workdir'

Directory to generate temporary data.

When the item is published, all the data inside WORK_DIR will be moved to DATA_DIR. Its good practice to set different directory from DATA_DIR. Inside this directory, the Cube-Builder will separate into identity and composed folders. Defaults to /workdir.