From b2c5ec8ad66c3c2070a509e79a87e92727280bb3 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 26 Feb 2019 09:35:54 +0000 Subject: [PATCH] Attempt to rebalance the render servers --- Makefile | 2 +- bin/mkgeo | 16 ++++++++++++++-- src/render.openstreetmap | 29 +++++++++++++++++++++++++---- 3 files changed, 40 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index cf3a462..3cdf57f 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,7 @@ data/tile.openstreetmap.org json/tile.openstreetmap.org.json origins/render.open bin/mkgeo origins/tile.openstreetmap.yml src/tile.openstreetmap tile.openstreetmap.org origins/render.openstreetmap.yml data/render.openstreetmap.org json/render.openstreetmap.org.json: bin/mkgeo origins/render.openstreetmap.yml src/render.openstreetmap - bin/mkgeo origins/render.openstreetmap.yml src/render.openstreetmap render.openstreetmap.org + bin/mkgeo origins/render.openstreetmap.yml src/render.openstreetmap render.openstreetmap.org origins/total.openstreetmap.yml data/%: sed -r -e 's/$(notdir $<)(:|$$)/$(notdir $@)\1/g' < $< > $@ diff --git a/bin/mkgeo b/bin/mkgeo index bd5bfbb..1b9f87f 100755 --- a/bin/mkgeo +++ b/bin/mkgeo @@ -292,8 +292,20 @@ sub match_origin my $match; if ($cluster->{preferred} && - $cluster->{preferred}->{countries} && - grep { $_ eq $origin->{country} } @{$cluster->{preferred}->{countries}}) + $cluster->{preferred}->{origins} && + grep { $_ eq $origin->{name} } @{$cluster->{preferred}->{origins}}) + { + $match = "preferred"; + } + elsif ($cluster->{allowed} && + $cluster->{allowed}->{origins} && + grep { $_ eq $origin->{name} } @{$cluster->{allowed}->{origins}}) + { + $match = "allowed"; + } + elsif ($cluster->{preferred} && + $cluster->{preferred}->{countries} && + grep { $_ eq $origin->{country} } @{$cluster->{preferred}->{countries}}) { $match = "preferred"; } diff --git a/src/render.openstreetmap b/src/render.openstreetmap index 70cd238..b03f995 100644 --- a/src/render.openstreetmap +++ b/src/render.openstreetmap @@ -4,10 +4,13 @@ orm: statuscake: - 2217312 colour: "#bfa730" - bandwidth: 200 + bandwidth: 300 ipv4: 130.117.76.3 ipv6: 200109780002002c0000000001720003 default: "" + preferred: + origins: + - amsterdam yevaud: lat: 51.5228002 @@ -18,6 +21,9 @@ yevaud: bandwidth: 300 ipv4: 193.60.236.22 default: "" + preferred: + origins: + - london scorch: lat: 50.6911904 @@ -25,10 +31,13 @@ scorch: statuscake: - 2217314 colour: "#bf8230" - bandwidth: 300 + bandwidth: 500 ipv4: 176.31.235.79 ipv6: 200141d00002fc4f0000000000000001 default: "" + preferred: + origins: + - france rhaegal: lat: 45.8082123 @@ -36,9 +45,13 @@ rhaegal: statuscake: - 3343399 colour: "#a1b92e" - bandwidth: 350 + bandwidth: 700 ipv4: 161.53.248.77 default: "" + preferred: + origins: + - osijek + - pula pyrene: lat: 44.5639267 @@ -46,10 +59,18 @@ pyrene: statuscake: - 3451753 colour: "#269926" - bandwidth: 300 + bandwidth: 500 ipv4: 140.211.167.98 ipv6: 2605bc8030100700000000008cd3a762 default: "" + preferred: + origins: + - corvallis + - hsinchu + - montreal + - sanfrancisco + - vinadelmar + - wellington # Spare colours: # -- 2.39.5