![]() |
The web service that is used for assisting the management of the Development Meeting is built as a rails application with access via an apache web server and with a mysql backend database.
The server that runs the software has a DNS CNAME record of devproj so that the user interface to the software is via the URL https://devproj.inf.ed.ac.uk/.
The server's LCFG profile includes a header file, dice/options/devproj-server.h, that sets up most of the software needed for the service. That header includes a few more other headers:
The rails application is located, by default, at /disk/devproj/rails and is supplied by the devproj rpm (the exact package is defined via the devproj-server.h header file).
The apache configuration file is, by default, held at /disk/devproj/httpd/httpd.conf.devproj and is also supplied by the devproj rpm.
The two locations /disk/devproj and /var/lib/mysql are mirrored via rsync. The first location contains, by default, the rails application files, the apache configuration file and the weekday backups of the mysql database. The second contains a snapshot of the mysql live database.
The devproj server is active as long as the mysql database and the apache web server are running. These are started and stopped via the standard lcfg-mysql and lcfg-apache components respectively. Consequently the service will be started automatically on reboot and stopped when the server is shut down.
The document root for the apache web server is /disk/devproj/rails/tracker/public (this is defined in the apache configuration file /disk/devproj/httpd/httpd.conf.devproj). There are only a few real html files within that document root and any URL that doesn't correspond to one of these files is mapped via the rewrite mechanism into calls to the rails application (see the Development Meeting Support Software Manual).
All the actual data on the development projects is held in the mysql database, so restoring the project data is very like restoring any other mysql database. There are weekday dumps of the mysql database that are held in /disk/devproj/backup/mysql by default. If these are lost (as well as the actual mysql database) then there are recent copies of both these and the live mysql database on the mirror server.
If the devproj server has completely failed and one needs to install a replacement machine then one should do the following:
#define DEVPROJ_SERVER
#include <dice/options/devproj-server.h>
However only add the first line if this is to be the actual devproj server; don't add that first line if it is a test server (just add the second #include line).
_X509_SERVICE(<machinename>) cosign.servicename <machinename> !x509.hashed_<machinename> mSET(/etc/httpd/conf/CA) cosign.file_filter_key /etc/httpd/conf/<machinename>.key cosign.file_filter_crt /etc/httpd/conf/<machinename>.crt !cosign.services mADD(<machinename>.inf.ed.ac.uk;0;;Informatics Development Projects test server;https://<machinename>.inf.ed.ac.uk/)
$ om updaterpms run
$ om cosign start
You can check that cosign has started correctly by checking that /var/cosign has 2 directories - filter and ticket.
Move any existing .crt file for this host out of the way (if it doesn't exist then one can skip this step). As root do:
$ mv /etc/httpd/conf/<machinename>.crt /etc/httpd/conf/<machinename>.crt.old
Create the SSL certificates:
$ om x509 run
and if this fails because the resources aren't available run the command:
$ om x509 configure
Check that the 3 <machinename> files have been created in /etc/httpd/conf along with a CA directory.
Make sure the apache daemon can read them. As root do:
$ chown -R apache.apache /etc/httpd/conf/CA
$ rfe dns/inf
Comment out the old line
# #verbatim inf.ed.ac.uk devproj IN CNAME dolly.inf.ed.ac.uk.
and add the replacement line
#verbatim inf.ed.ac.uk devproj IN CNAME <machinename>.inf.ed.ac.uk.
$ om mysql start
$ cd /tmp
$ mysql -u root mysql
mysql> source /tmp/dump.<weekday of most recent dump>
mysql> FLUSH PRIVILEGES;
mysql> \q
$ om apache start
Check that apache has started by doing ps - ef | grep httpd.
If the dns change has propagated as far as a machine then from that machine one should then be able to access the devproj web service via the normal URL https://devproj.inf.ed.ac.uk/ ( or https://<machinename>.inf.ed.ac.uk/ in the case of a test server).
Please contact us with any
comments or corrections.
Unless explicitly stated otherwise, all material is copyright The University of Edinburgh |
![]() |