You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Debmonitor: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>Quiddity
m (sp)
imported>Volans
(Add small details on the server side)
Line 1: Line 1:
DebMonitor is a Debian package tracker website and tool developed at the Wikimedia Foundation and used to track installed and upgradable packages across the fleet.
DebMonitor is a Debian package tracker website and tool developed at the Wikimedia Foundation and used to track installed and upgradable packages across the fleet. It has multiple components.


There are 2 main components:
=== [http://debmonitor.wikimedia.org DebMonitor website] ===
The DebMonitor website is a Django-based application installed in an active/passive setup with <code>uwsgi</code> and <code>nginx</code> on two dedicated Ganeti VMs and deployed via [[Scap]]. The application has two different virtual hosts, one on port <code>80</code> for [[Varnish]] and one on port <code>443</code> for the DebMonitor client (see below). The data is stored on a MySQL database hosted by the <code>m2</code> cluster.


* the [http://debmonitor.wikimedia.org DebMonitor website]
There is a weekly crontab on each host to run a garbage collection script twice a week to remove orphan objects from the database (e.g. package versions not installed anymore in any host).
* the <code>debmonitor-client</code> Debian package to install on all the clients that should report their installed packages.


=== DebMonitor client ===
The <code>debmonitor-client</code> Debian package is installed on all the clients and reports the installed packages to the DebMonitor active server. It reports them in three different ways:
* A dpkg hook triggered on <code>Dpkg::Pre-Install-Pkgs</code> to report any change to packages. It doesn't block package actions on failure.
* An APT hook triggered on <code>APT::Update::Post-Invoke</code> to report any upgradable packages. It doesn't block <code>apt-get update</code> on failure.
* A daily crontab to report all installed and upgradable packages to reconcile the data in case any of the above failed.
The client authenticate with the DebMonitor server via mutual authentication using the Puppet certificate, and the server authorize the connecting host to modify only its own data.
[[Category:Deployment]]
[[Category:Deployment]]

Revision as of 10:01, 12 March 2019

DebMonitor is a Debian package tracker website and tool developed at the Wikimedia Foundation and used to track installed and upgradable packages across the fleet. It has multiple components.

DebMonitor website

The DebMonitor website is a Django-based application installed in an active/passive setup with uwsgi and nginx on two dedicated Ganeti VMs and deployed via Scap. The application has two different virtual hosts, one on port 80 for Varnish and one on port 443 for the DebMonitor client (see below). The data is stored on a MySQL database hosted by the m2 cluster.

There is a weekly crontab on each host to run a garbage collection script twice a week to remove orphan objects from the database (e.g. package versions not installed anymore in any host).

DebMonitor client

The debmonitor-client Debian package is installed on all the clients and reports the installed packages to the DebMonitor active server. It reports them in three different ways:

  • A dpkg hook triggered on Dpkg::Pre-Install-Pkgs to report any change to packages. It doesn't block package actions on failure.
  • An APT hook triggered on APT::Update::Post-Invoke to report any upgradable packages. It doesn't block apt-get update on failure.
  • A daily crontab to report all installed and upgradable packages to reconcile the data in case any of the above failed.

The client authenticate with the DebMonitor server via mutual authentication using the Puppet certificate, and the server authorize the connecting host to modify only its own data.