You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2.4 KiB

Monitor

Introduction

Monitor is part of ReCodEx solution for reporting progress of job evaluation back to user in real time. It gets progress notifications from broker and sends them through WebSockets to clients' browsers. For now, it's meant as an optional part of whole solution, but for full experince it's recommended to use one.

Monitor is one per broker, that is one per ReCodEx instance. Also, monitor has to be publicly visible (has to have public IP address) and also needs a connection to the broker.

Basic info

Monitor is written in Python, tested versions are 3.4 and 3.5. For it's functionality following packages are required:

  • zmq - binding to ZeroMQ framework
  • websockets - framework for communication over WebSockets
  • asyncio - library for fast asynchronous operations
  • pyyaml - parsing YAML configuration files
  • argparse - parsing command line arguments

Architecture

Installation

Installation will provide you with following files:

  • /usr/bin/recodex-monitor - simple startup script located in PATH
  • /etc/recodex/monitor/config.yml - configuration file
  • /etc/systemd/system/recodex-monitor.service - systemd startup script
  • code files will be installed in location depending on your settings, mostly into /usr/lib/python3.5/site-packages/monitor/ or similar

Systemd script runs monitor binary as specific recodex user, so in postinst script user and group of this name are created. Also, ownership of configuration file will be granted to that user.

Fedora (and other RPM distributions):

  • run python3 setup.py bdist_rpm --post-install ./install/postints to generate binary .rpm package or download it from releases tab of monitor GitHub repository (it's architecture independent package)
  • install package using sudo dnf install ./dist/recodex-monitor-0.1.0-1.noarch.rpm (number depends on actual version)

Other Linux systems:

  • run installation as python3 setup.py install --install-scripts /usr/bin
  • run postinst script as root - sudo ./install/postinst

Configuration

Usage

Preferred way to start monitor as a service is via systemd as sudo systemctl start recodex-monitor.service. After that, check if application lauch was successful using sudo systemctl status recodex-monitor.service. Now you should see green Active (running).

Alternative starting command is recodex-monitor -c /etc/recodex/monitor/config.yml from command line. But note that it won't start monitor as a daemon.