
This document describes the various activities that are needed to maintain the BGA website in full error-free operation. It is not intended to be generally publicly available, but should be for the webmaster and everybody who had management access to the website.
The following people have contributed to the creation of this document: Tony Atkins, Brian Brunswick and Jon Diamond
This web site is hosted by Bytemark [1], on their normal commercial terms. The site started in 1998, but was revamped in spring 2008 to operate using Drupal.
We have a complete virtual server running Debian Linux "Lenny". The web server is Apache with many pages in PHP5. Databases are in MySQL. Some support software is in Perl other software In Python.
A limited number of people have full user access to our server. Each of these have a separate account, with all having the same group (users), to allow updating of the required directories, i.e. essentially those for our website.
All registered users have access to group "users". Common files are owned by this group, with directories set to 02775 permission to propagate the group ownership to files and directories contained therein. The standard umask is 002, permitting group write.
Some of these accounts allow admin access to the server.
For security reasons users are expected to connect to the server using SSH.
Users are encouraged to generate and install a SSH key to avoid password access (this is actually more secure as it identifies the user uniquely). See "ssh-keygen" and "ssh-copy-id" if running Linux or UNIX-style systems.
This facility was used when hosting was provided by Pair. There are no such requirements currently.
Authorised users are expected to move to SFTP in due course if needed.
Implementation is standard as provided by Bytemark.
To set up additional domains and/or subdomains, edit the files in /root/BytemarkDNS/data following the comments therein and run the script /root/BytemarkDNS/upload.
The configuration file for each server is in /etc/apache2/sites-available. When editing is complete, the file should be symbolically linked into /etc/apache2/sites-enabled and the server restarted.
There are a number of Drupal-based websites set up in /var/www:
www.britgo.org, www.britgo.org.uk, www.baduk.org.uk
old.britgo.org - our old website (as of November 2010, Drupal 5)
test.britgo.org - testing version for CiviCRM
In addition the following website directories also exist in /var/www:
ukgochallenge.org website
league.britgo.org
Backup currently uses Backup2l to copy system configuration, web and database files to a separate Bytemark server.
To recover data, the server can be NFS-mounted and the data retrieved.
Email addresses for other than the archived mailing lists are all specified as aliases in the file /etc/aliases.
The 3 archived mailing lists, "gotalk", "bga-policy" and "youth-go" are managed using "mailman". For more details, see the index [2].
Drupal [3] is a free and open source modular framework and content management system (CMS) written in the programming language PHP using MySQL as the database management system. Drupal, like many modern CMSs, makes it easier to create and organise content, allows easy site searching, provides menus and book facilities, an RSS feed and manages site contributors.
Drupal version 6.19 was installed in December 2010.
The Status Page [4] need regular monitoring as does the Log page [5].
Modules may need updating to fix bugs etc.
The website admin page [6] contains links to common activities.
The site style is garlandbga, which is a modification of the standard garland.
The following blocks are used within the site. Most of these are standard Drupal ones that are configured through Drupal->Administer->Site Building->Blocks.
The only one that is expected to be updated on any regular basis is the BGA Current Information with the Front Page right (News Type block) being changed occasionally. These are both only displayed on the Front Page.
Note: The weights are chosen so that they display in the order chosen.
The Menu system is in three parts - the Primary Links are those displayed at the top of all pages, the Secondary Links no longer used are those displayed under the Navigation links, which are the main items requiring some maintenance.
Entries are created in the Navigation links in two ways - either by selecting a Menu item within the Page/Story/Book entry or by creating a New (custom) Menu Item on the Drupal->Administer->Site Building->Menu page.
You can create two references to the same page from within the menu system, but it's recommended that in this case both should be custom items, to avoid future confusion.
The policy for menu items, no matter which way they are created, is:
Note carefully that the weights are chosen so that they display in the correct order, not the alphabetical one.
The Drupal Views system is used to create the News and Site Update pages (Drupal->Administer->Site Building->Views). In February 2011 Review and Club List Views were added.
These should be mostly self-explanatory when you examine them, but the following should be noted:
Users should be added as necessary and given only the permissions required to do their jobs: website contributor, website editor or admin plus the CiviCRM ones are the only classes currently.
Club editor was added in February 2011 to allow club secretaries to edit only the Club list pages (content type=club). If the secretary wants to edit their own web pages, then they also need to be at least a Web contributor.
A new content type Club has been created to support the easy entry and maintenance of the data for our Clubs list, map and BGJ entries. This is like a page, but with some additional fields.
Note: The list of regions is held as a text drop-down list. So changing the name of a region requires you to go through every club in the region to change their entry and creating a revision entry for those clubs. Moral: don't even think of changing a region name!
what needs to be said?
There are a number of other maintenance activities, some involving bespoke scripts, that are involved in keeping the website up to date. Most of these are accessible from the Website admin page [6].
Other than the lists managed by mailman (gotalk, youth-go and bga-policy), the lists and aliases apart from club-contacts@britgo.org are managed entirely by editing /etc/aliases. Each line in the file consists of the required alias, a colon, and one or more targets. The targets may be other aliases defined elsewhere in the file.
Changes to the file are effective immediately.
This list consists of all Council members, and no others. It is used for most email discussion within Council (especially for the rare occasions where something needs to remain confidential.) It has the following aliases:
president, treasurer, secretary, council-* (for other members)
This list is a generally low traffic list used for things which would benefit from wider discussion, e.g. drafts of publicity material, new policy ideas, etc. As at April 2010 it consists of the following aliases:
council-private, journal, mem, newsletter, vp-atkins, vp-wendes, auditor
This is generated automatically every hour from http://britgo.org/clubs/emailonly, so is an up to date list of all the club contacts.
The following mailing lists are maintained:
This is open to BGA members, but is moderated by the BGA and requests for membership of the list are sent to the list manager - president @ britgo.org.
to be written - John
Whenever the Officers change, normally after the AGM, the following changes need to be applied:
For a Membership Secretary change also:
http:/www.britgo.org/event/levy/form [16]
Three new Drupal Content Types have been created to handle this maintenance activity:
This holds the basic information about a person:
This defines the overall Committee structure. There are two specific ones which are not normally seen, but are used to make the Views structure work: COUNCIL and OTHER which contains the names of those with Honorary positions plus the Auditor.
There are three Views listed - Positions [17], People [18] and Contact Us Page [19], but there are several display pages defined within Positions to create the various displays required. These all have URLs starting position/ to ensure that all the Menu tab items at the top of the displays contain all the relevant pages.
Council and Contact pages are a little more complicated, as they contain Attachments displaying second and subsequent bits (for the COUNCIL and OTHER committees and non-President contacts), to ensure that the whole structure is shown.
The Photos field is used to sort displays into person name order, so appears in a number of displays although the field itself is not displayed.
Note: All Views have been created with specific roles allowing access, so that some are restricted to certain people. Those that aren't restricted have access allowed from Anonymous and Authorised users, i.e. effectively everybody.
The BGA rating system is controlled by code and files held on the BGA website in public_html/rating/graph
It runs every night to process the info from EGD and produce various web pages, messages and files of output.
The following needs updating as a result of moving to Bytemark and changing the system in February 2011 - John
The contents of the rating/graph directory are:
all.hst graph.php results_pages.txt alleuro.html hisgor.zip tlist.html archive index.php tournament_names.txt calibration.txt name_changes.txt update.pl calibration_backup.txt percentiles.html update.pl.2008 certificates.txt percentiles.pl update.pl.2009a championship_qualifiers.html player_names.txt update.pl.old club_names.txt possible_certificates.php update_cal.pl comparison.html possible_promotions.txt update_tlist.pl data qualifiers.html exclusions.txt readme.txt
Some of those are old versions of code, etc
The main program is update.pl but also update_cal.pl and update_tlist.pl are used. The later two seldom need changing. It is update.pl that does the bulk of the work and is the thing that needs changing from time to time. It was written by Tim Hunt, but I have changed some bits of it from time to time.
Beware that I (Tony Atkins) usually change the sources I keep and then upload, so any changes should be notified back to me.
Some of the things in the directory are subdirectories:
data contains .txt files for the playerids of each player. archive contains dated comparison.html files for the grader's reference (comparison between BGA and EGF grades etc).
The .pl programs are automatically run each night, but can be manually run using ./xxxxx.pl from within the rating/graph directory. Login to the maproom user using PuTTY or equivalent and cd into public_html/rating/graph
If you can file transfer directly into the directory then do so, but if your free FTP program will not allow this (due to permissions problems in the Pair setup) then file transfer in to directory tournament_results and use mv -i filename ../public_html/rating/graph/filename to move the file across.
There are certain things that need changing from time to time, for example the name of the EGD file (when they change it), and the qualification year (eg 2010). All the constants such as the year number and filenames are defined at the beginning and are easy to find. Note that the dates used start at month 0 so 2 is March and 3 is April. The qualification year is currently set to 1st April 2010 to 30th March 2011. This will need resetting April next year to set the new candidates qualifiers in file qualifiers.html.
It creates 2 web pages: the main rating list page, the qualifiers page.
Various messages can be sent upon each run. The code has been set to supress these (using boolean $supress). Some may still be issued in some failure conditions. When the code ran monthly it was no problem to generate messages, but with a run every night too many messages are produced if not supressed.
The EGD file is transfered in and unzipped for processing. It overwrites the previous version in the directory.
Each event has a 8 character code made the type, startdate and a unique suffix. The results_pages.txt file needs updating after each event to point to the results page on the BGA web site. If no BGA page is available the EGF page can be used. Other country and tournament pages are unreliable and often disappear so for most foreign events it is best just to point to the tournaments entry in the EGD database using the key.
This file needs to end up in rating/graph once amended. It will be picked up on the next run (eg overnight).
Then on the rating page there will be a link on the last played date for each person, and on each person's page to all the rated events they have played.
When a person is awarded a dan certificate their entry should be updated or created in certificates.txt. This is used when looking for promotions to recommend to the secretary in possible_promotions.php (by way of the equivalent possible_certificates.txt file).
To exclude someone from the ratings file eg deceased players there is a list held in the update.pl code:
my %exclude = ( '10537659','10537659','13074061','13074061','10613801','10613801');
This was originally intended to be held in a file of exclusions.txt, but due to a bug in perl on Pair's system the implemented code never worked.
The number is the EGD playerid.
EGD uses 4-char club codes and formerly 3-char ones. Our code converts those to real names using club_names.txt
Check the rating list for new codes appearing unconverted (most club names are longer than 3 or 4 characters so they are easy to spot) or get an update from Geoff Kaniuk.
This program updates the calibration reports for Geoff.
This program runs first to see if the EGD data has changed since the last run and aborts the rating run if no change is detected.
Geoff Kaniuk also gets his list of players/clubs/grades from the rating update for use in GoDraw. The update_players_list.pl script runs at the nightly ratings update. The script and its associated workhorse 'playerlist.c' resides in .../godrawsys.
Convert the following pages to the current style:
Links:
[1] http://www.bytemark.co.uk
[2] http://lists.britgo.org/listinfo
[3] http://www.drupal.org
[4] http://www.britgo.org/admin/reports/status
[5] http://www.britgo.org/admin/reports/dblog
[6] http://www.britgo.org/website/admin
[7] http://www.britgo.org/positions/officials
[8] http://www.britgo.org/history/officers
[9] http://www.britgo.org/files/levyform_2012.rtf
[10] http://www.britgo.org/files/levyform_2012.pdf
[11] http://www.britgo.org/join
[12] http://www.britgo.org/membership/schap.html
[13] http://www.britgo.org/join/pay
[14] http://www.britgo.org/join/form
[15] http://www.britgo.org/membership/schaponly.html
[16] http://www.britgo.org/event/levy/form
[17] http://www.britgo.org/admin/build/views/edit/Positions
[18] http://www.britgo.org/admin/build/views/edit/People
[19] http://www.britgo.org/admin/build/views/edit/Contact_Us_Page