Skip to content

Latest commit

 

History

History
151 lines (102 loc) · 3.03 KB

File metadata and controls

151 lines (102 loc) · 3.03 KB

Production Deployment

This guide covers a source-based production deployment of Argus.

Prerequisites

  • Python 3.12+
  • uv
  • Node.js >= 22 with npm
  • Yarn (npm -g install yarn)
  • nginx

Install from Source

Create a user for the service:

useradd -m -s /bin/bash argus
sudo -iu argus

Optional: install pyenv and create a virtualenv for this user:

pyenv install 3.12.0
pyenv virtualenv argus
pyenv activate argus

Clone the repository somewhere the argus user can write to:

git clone https://github.com/scylladb/argus ~/app
cd ~/app

Install dependencies:

uv sync --all-extras
yarn install

Build the frontend:

yarn build

Configure Argus

Create the local config files in the application directory:

cp argus_web.example.yaml argus_web.yaml
cp argus.yaml argus.local.yaml

Update argus.local.yaml with your database connection settings:

  • contact_points
  • user
  • password
  • keyspace name

Update argus_web.yaml with:

  • a secure SECRET_KEY
  • the required GITHUB_* values

Configure nginx

Copy the bundled nginx config.

Ubuntu:

sudo cp docs/config/argus.nginx.conf /etc/nginx/sites-available/argus
sudo ln -s /etc/nginx/sites-available/argus /etc/nginx/sites-enabled/argus

RHEL, CentOS, AlmaLinux, Fedora:

sudo cp docs/config/argus.nginx.conf /etc/nginx/conf.d/argus.conf

Adjust the virtual host settings as needed, especially listen and server_name.

Configure systemd

Install the service file:

sudo cp docs/config/argus.service /etc/systemd/system/argus.service

Edit it and adjust:

  • ExecStart to point at start_argus.sh
  • the service user and group

start_argus.sh assumes pyenv is installed in ~/.pyenv.

Reload and enable the service:

sudo systemctl daemon-reload
sudo systemctl enable --now argus.service

Configure Logging

Gunicorn writes the application log to /var/log/argus/argus.log. The maintenance cron writes to /var/log/argus/maintenance.log. Create the directory and install log rotation:

sudo mkdir -p /var/log/argus
sudo chown argus:argus /var/log/argus
sudo cp docs/config/argus.logrotate /etc/logrotate.d/argus

Configure Maintenance Cron

Two maintenance commands must run on a schedule:

  • scan_jobs.sh imports new Jenkins jobs as Argus tests. Without a matching test, a submitted run stays invisible in the UI.
  • refresh_issues.sh updates the cached GitHub and Jira issue data.

Edit the crontab of the argus user:

sudo -iu argus crontab -e

Replace any existing maintenance lines with these two lines:

*/5 * * * * /home/argus/app/scan_jobs.sh >> /var/log/argus/maintenance.log 2>&1
*/15 * * * * /home/argus/app/refresh_issues.sh >> /var/log/argus/maintenance.log 2>&1

Both scripts change into the application directory and read the config from there. Use absolute paths in the crontab.

Check the log after the first run:

tail /var/log/argus/maintenance.log