Skip to content
Doug Bell edited this page Jan 5, 2018 · 8 revisions

Servers

All servers are set up with a cpantesters user which runs the CPAN Testers services and cron jobs. All users on all machines are allowed to use sudo to become cpantesters (sudo -u cpantesters -i) to run commands.

Note: The database server is donated by ServerCentral, but is not globally available via SSH, and is such not listed here. Contact Doug Bell ([email protected]), Zach Dykstra ([email protected]), or Phil Doroff [email protected] for any issues with the database server.

cpantesters3.dh.bytemark.co.uk

Billing contact: Mark Keating (Enlightened Perl Organization)
Support contact: [email protected]

cpantesters4.dh.bytemark.co.uk

Billing contact: Donated by Bytemark
Support contact: [email protected]

cpantesters1.barnyard.co.uk

Billing contact: Donated by David Cantrell
Support contact: David Cantrell

monitor.preaction.me

Billing contact: Donated by Doug Bell
Support contact: Doug Bell ([email protected])

Services

All service daemons are run with runit in the cpantesters user home directory (~/service).

To restart a service: sv restart ~/service/<service>. To restart all services: sv restart ~/service/*. If the restart has a timeout, you can kill the runsv <service> process and it will be automatically restarted (by the runsvdir process).

All services are logged to ~/service/<service>/log/current.

There is now a Rex task to easily restart services on multiple machines. See Rex below.

Legacy Backend

  • Handles
    • Writing CPAN uploads table
    • Sending report notification e-mails
  • Hosted on
    • cpantesters3.dh.bytemark.co.uk
  • Documentation

Legacy Webapp

  • Hosted on
    • cpantesters3.dh.bytemark.co.uk

The API is load balanced by Fastly. Every web app is proxied via an Apache server running on the same machine.

  • Daemons
  • Handles
    • Writing incoming test reports
    • Legacy Metabase API
  • Hosted on
    • cpantesters3.dh.bytemark.co.uk (api-1.cpantesters.org)
    • cpantesters1.barnyard.co.uk (api-2.cpantesters.org)

See beam list for a list of backend processes.

  • Daemons
    • minion - Run backend processing jobs
  • Handles
    • Processing test reports
  • Hosted on
    • cpantesters4.dh.bytemark.co.uk

In beta (http://beta.cpantesters.org).

Every web daemon is proxied via an Apache server running on the same machine.

  • Daemons
    • web-beta - Run beta testing web app
  • Handles
    • Future web app
    • Experiments in visualizations
  • Hosted on
    • cpantesters3.dh.bytemark.co.uk

Rex

Read the documentation for the Rex tasks by using perldoc Rexfile. Install Rex using cpan Rex.

See all the objects inside the Rexfile by using rex -T. This helps you pick which groups (-g), environments (-E), hosts (-H), and tasks to use.

Restart services

  • Restart all services on all machines: rex service
  • Restart all API services: rex -g api service
  • Show the status of all services: rex service --command=status
  • Restart only minion and broker services: rex service --services=minion,broker
  • Force restart if the restart fails: rex service --force=1

Monitors

The system is monitored on http://status.cpantesters.org. Users in CPAN Testers Github Org can log in to Grafana at http://status.cpantesters.org/grafana.

This dashboard shows if report processing jobs are being added and finished. Report processing jobs are added when a new test report is written. Report processing jobs are finished by the minion daemon on Backend servers.

  • Diagnostics
    • If report jobs are not being added, try restarting the legacy-metabase daemon.
    • If report jobs are not being finished, try restarting the minion daemon.

This dashboard shows the response times for all the web applications, and the amount of work the MySQL database is doing.

Clone this wiki locally