Tiles@home/Server install guide

From OpenStreetMap Wiki
Jump to: navigation, search

The Tiles@home server is the central hub of the Tiles@home distributed rendering system. Clients running all over the world talk to this server to get new rendering jobs, and upload their rendered results.

To be clear, the tile@home server is not the bit that runs "at home". It's not map rendering software. If you're interested in rendering maps, there are many rendering alternatives, including osmarender which forms part of the tiles@home client. This guide is to help developers who might be interested in running the server software (mostly to help with developing it)

Contents

Prerequisites

Programs and libraries

In a Debian/Ubuntu system, you can install most of them with the following command

sudo apt-get install apache2 libapache2-mod-python python-imaging python-pysqlite2 wget unzip 

Django needs a database module to store its data in. If you don't have a preference, sqlite is the simplest to use. You will need a python module for your database, such as python-mysql.

In Debian now 2008-08-03 we also need a not yet released development subversion version of the python-django package. Make your own package or download here python-django_0.97~svn8198-1_all.deb md5sum 695f6db34d1d4dd9ebab7045978b5cfe and install with sudo dpkg -i python-django_0.97~svn8198-1_all.deb


Installation

Download the source and main directory from the OpenStreetMap svn server.

svn co http://svn.openstreetmap.org/sites/other/tilesAtHome_tahngo
mv tilesAtHome_tahngo tah

Adapt the settings to your configuration

Check the django installation

In Debian:

ln -s /usr/share/python-support/python-django/django/contrib/admin/media/img .
ln -s /usr/share/python-support/python-django/django/contrib/admin/media/js .
ln -s /usr/share/python-support/python-django/django/contrib/admin/media/css .
ls -l `python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"`/django

If the link to django is missing, create it.

ln -s /usr/share/python-support/python-django/django `python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"`


In the web admin interface, you will need to add some "layers" for your maps. In t@h these are currently: tile (the default layer from z0-17), captionless (from z0-17; part of the default layers), maplint(transparent; from z12-17; part of the default layers), and caption (transparent; from z0-17).

Oceantiles

Get or better link to the oceantiles.dat file from the t@h client. The oceantiles file is used to roughly categorize Z12 tiles into land or sea tiles. As this file gets regularly refined, you should probably keep this file up to date with svn.


Running


Other

Munin

In Debian/Ubuntu, install with

apt-get install munin munin-node

As root:

cd /etc/munin/plugins

cat > tah << 'EOF'
#!/bin/sh
case $1 in
    config)
        cat ~ojw/public_html/Log/Requests/History/munin_conf.txt
        exit 0;;
esac

cd ~ojw/public_html/Log/Requests/History; php munin.php
EOF

chmod +x tah

In a Debian/Ubuntu server, as root, execute the command:

/etc/init.d/munin-node restart

Crontab entries

crontab -e
# m  h  dom mon dow  command
0    0   *   *   *   wget -O /dev/null http://dev.openstreetmap.org/~ojw/Upload/rmtemp.php 2>&1 &>/dev/null
40   9   *   *   *   wget -O /dev/null --timeout=3600 --tries=1 http://dev.openstreetmap.org/~ojw/Stats/update.php 2>&1 &>/dev/null
42  13   *   *   *   perl /home/ojw/parselog/parselog.pl < /var/log/apache2/access.log.1 > /home/ojw/public_html/Stats/Data/access.htm
15  */2  *   *   *   wget -O /dev/null http://dev.openstreetmap.org/~ojw/Log/Requests/History/update.php 2>&1 &>/dev/null
25  */2  *   *   *   wget -O /dev/null http://dev.openstreetmap.org/~ojw/Log/Requests/History/timeout.php 2>&1 &>/dev/null
0    *   *   *   *   /home/ojw/queue_handler/check_runner.sh > /dev/null

Meaning of the entries:

Personal tools
Namespaces
Variants
Actions
site
Toolbox