Go to file
Adrian Schmutzler 39d9ddc9d0 api/alfred: Update router data instead of DELETE/INSERT
Previously, I just deleted all entries and recreated them again
with INSERT. Although this is simple to write and actually includes
less queries, it causes a lot more write IO. Since most of the
neighbors and interfaces do NOT change frequently, it is worth the
extra effort to delete only those really gone since the last
update.

Only br-mesh will normally have assigned IPv6 addresses, thus
we just delete all IPv6 adresses of the other ones.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-12-30 18:21:08 +01:00
alfred-monitoring-proxy Handle even larger requests 2016-02-17 02:47:13 +01:00
contrib - removed obsolete script 2017-03-22 18:10:41 +01:00
ffmap api/alfred: Update router data instead of DELETE/INSERT 2017-12-30 18:21:08 +01:00
scripts calcglobalstats/deletestats: Improve duration logging and output 2017-12-10 20:25:00 +01:00
.gitignore gitignore: Add mysqlconfig 2017-11-19 15:59:12 +01:00
README.md Update README to include changes due to MySQL and python3 2017-11-16 00:09:14 +01:00
install.sh Rename hoodsv2 to hoods_v2 for consistency 2017-11-16 20:41:52 +01:00
setup.py add alfred support and dynamic map creation 2015-10-10 17:42:44 +02:00

README.md

Debian Dependencies

apt-get install mysql-server python3-mysqldb python python3 python3-requests python3-lxml python3-pip python3-flask python3-dateutil python3-numpy python3-scipy python3-mapnik python3-pip uwsgi-plugin-python3 nginx
pip3 install pymongo pillow modestmaps simplejson werkzeug

When updating

apt-get install mysql-server python3-mysqldb python3-mapnik
apt-get uninstall mongodb python-mapnik uwsgi-plugin-python tilestache
pip3 install pillow modestmaps simplejson werkzeug
pip3 uninstall uuid

Prerequisites

  • Datenbank in MySQL anlegen
  • Git vorbereiten:
git clone https://github.com/asdil12/fff-monitoring
git clone https://github.com/TileStache/TileStache
cd fff-monitoring
cp ffmap/mysqlconfig.example.py ffmap/mysqlconfig.py
  • MySQL Zugangsdaten in mysqlconfig.py eintragen

Installation

./install.sh
systemctl daemon-reload
systemctl enable uwsgi-ffmap
systemctl enable uwsgi-tiles
systemctl start uwsgi-ffmap
systemctl start uwsgi-tiles
cd ffmap/db/
./init_db.py
# Then apply NGINX Config

NGINX Config

server {
	listen 443 ssl default_server;
	listen [::]:443 ssl default_server;

...

	location / {
		include uwsgi_params;
		uwsgi_pass 127.0.0.1:3031;
		client_max_body_size 30M;
	}

	location /tiles {
		include uwsgi_params;
		uwsgi_pass 127.0.0.1:3032;
	}
	
	location /static/ {
		root /usr/share/ffmap/;
		expires max;
		add_header Cache-Control "public";
	}

...

}

Admin anlegen

  • User über WebUI anlegen
  • Dann über z.B. phpmyadmin in der Tabelle users 'admin' auf 1 setzen