ocrd_network.runtime_data.deployer module

Abstraction of the deployment functionality for processors.

The Processing Server provides the configuration parameters to the Deployer agent. The Deployer agent runs the RabbitMQ Server, MongoDB and the Processing Hosts. Each Processing Host may have several Processing Workers. Each Processing Worker is an instance of an OCR-D processor.

class ocrd_network.runtime_data.deployer.Deployer(config_path: str)[source]

Bases: object

deploy_workers(mongodb_url: str, rabbitmq_url: str) None[source]
stop_workers() None[source]
deploy_rabbitmq() str[source]
stop_rabbitmq()[source]
deploy_mongodb() str[source]
stop_mongodb()[source]
stop_all() None[source]

The order of stopping is important to optimize graceful shutdown in the future. If RabbitMQ server is stopped before stopping Processing Workers that may have a bad outcome and leave Processing Workers in an unpredictable state.

start_uds_mets_server(ws_dir_path: str) Path[source]
stop_uds_mets_server(mets_server_url: str, path_to_mets: str) None[source]