Docker

The medialoopster components are deployed as Docker services and although medialoopster is a "dockerized" system, not all components are required to run as a Docker service. In an open environment medialoopster can be configured to use already existing services (e.g. CDN, Elasticsearch cluster, etc.) if required.

This guide will go through configuration and installation of all required services using the basic orchestration tool Docker ComposeWith Docker Compose you use a YAML file (compose file) to define the services to run.

Services

Database (postgres)

The database (PostgreSQL) is the heart of the system. medialoopster requires exactly one master database instance. The provided Docker image comes with an initialized database called medialoopster which is part of the default configuration. Though beyond the scope of this guide, it is possible (in a more complex setup) to install additional read-only instances if necessary.

Required to run as Docker service: no

Single instance: yes

Search engine (elasticsearch)

medialoopster relies on Elasticsearch to provide a powerful main search engine. Should this service be unavailable, medialoopster uses it's own database (with limited capabilities) for searching as a fallback method. Within Elasticsearch medialoopster currently uses a single index called search_index by default.

Required to run as Docker service: no

Single instance: no

Message Broker (rabbitmq)

The RabbitMQ message broker is the internal communications system used by almost all services. Primarily the message broker distributes medialoopster workload (tasks) to it's consumers through configured routes. The available tasks and how they are routed are described in a later chapter.

Required to run as Docker service: no

Single instance: no

License Server (license_server)

medialoopster licensing information is provided through this service. It requires the RabbitMQ message broker to communicate.

Required to run as Docker service: yes

Single instance: yes

Frontend Server (web_node)

The browser application is provided through at least one web_node instance. All instances need access to the same RabbitMQ service to share tasks and to receive license information from the license server.

Required to run as Docker service: yes

Single instance: no

Backend Server (worker_node)

A worker_node instance handles all background tasks (e.g. directory scans, housekeeping, proxy generation, etc.). Like the web_node, all instances need access to the same RabbitMQ service to share tasks and to receive license information from the license server.

Required to run as Docker service: yes


Single instance: no

Task scheduler (task_scheduler)

The task_scheduler triggers reoccurring tasks (periodic tasks). It also requires access to the same RabbitMQ message broker like the web_node and worker_node instances. It is important to allow only a single instance to be active within the entire medialoopster system!

Required to run as Docker service: yes

Single instance: yes

Media server (media_server)

All preview files are provided through this dedicated web service.

Required to run as Docker service: no

Single instance: no

Compose file


version: "2"


networks:
  ml_network:
    external:
      name: ml_network

services:
  postgres:
    container_name: ml_postgres
    env_file: <mycompany.env>
    hostname: ml_postgres
    image: postgres
    networks:
      - ml_network
  elasticsearch:
    container_name: ml_elasticsearch
    hostname: ml_elasticsearch
    image: elasticsearch
    networks:
      - ml_network
  rabbitmq:
    container_name: ml_rabbitmq
    hostname: ml_rabbitmq
    image: rabbitmq
    networks:
      - ml_network
  license_server:
    container_name: ml_license_server
    depends_on:
      - rabbitmq
    environment:
      - BROKER_DOMAIN=rabbitmq
    hostname: ml_license_server
    image: ml_license_server
    networks:
      - ml_network
 media_server:
    container_name: ml_mediaserver
    hostname: ml_mediaserver
    image: ml_mediaserver
    networks:
      - ml_network
    volumes:
      - <proxy-mount-point>:/mnt/medialoopster/Proxy
  web_node:
    container_name: web_node
    depends_on:
      - postgres
      - rabbitmq
      - license_server
    env_file: <mycompany.env>
    environment:
      - TERM=xterm
    networks:
      - ml_network
    volumes:
      - <SAN-mount-point>:/mnt/medialoopster/<SAN>
      - <custom-settings-file>:/home/medialoopster/medialoopster/settings/custom.py
  worker_node:
    depends_on:
      - postgres
      - rabbitmq
      - license_server
    env_file: <mycompany.env>
    environment:
      - TERM=xterm
    image: worker_node
    networks:
      - ml_network
    volumes:
      - <SAN-mount-point>:/mnt/medialoopster/<SAN>
      - <proxy-mount-point>:/mnt/medialoopster/Proxy
      - <custom-settings-file>:/home/medialoopster/medialoopster/settings/custom.py
  task_scheduler:
    container_name: ml_task_scheduler
    depends_on:
      - postgres
    env_file: <mycompany.env>
    environment:
      - TERM=xterm
    hostname: ml_task_scheduler
    image: ml_task_scheduler
    networks:
      - ml_network
    volumes:
      - <custom-settings-file>:/home/medialoopster/medialoopster/settings/custom.py