2 # Cookbook Name:: gps-tile
5 # Copyright 2013, OpenStreetMap Foundation
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
20 include_recipe "apache"
32 libcache-memcached-perl
35 directory "/srv/gps-tile.openstreetmap.org" do
41 git "/srv/gps-tile.openstreetmap.org/import" do
43 repository "git://github.com/ericfischer/gpx-import.git"
49 execute "/srv/gps-tile.openstreetmap.org/import/src/Makefile" do
52 cwd "/srv/gps-tile.openstreetmap.org/import/src"
55 subscribes :run, "git[/srv/gps-tile.openstreetmap.org/import]"
58 git "/srv/gps-tile.openstreetmap.org/datamaps" do
60 repository "git://github.com/ericfischer/datamaps.git"
66 execute "/srv/gps-tile.openstreetmap.org/datamaps/Makefile" do
69 cwd "/srv/gps-tile.openstreetmap.org/datamaps"
72 subscribes :run, "git[/srv/gps-tile.openstreetmap.org/datamaps]"
75 git "/srv/gps-tile.openstreetmap.org/updater" do
77 repository "git://github.com/ericfischer/gpx-updater.git"
83 systemd_service "gps-update" do
84 description "GPS tile update daemon"
85 after ["network.target", "memcached.service"]
86 wants ["memcached.service"]
88 working_directory "/srv/gps-tile.openstreetmap.org"
89 exec_start "/srv/gps-tile.openstreetmap.org/updater/update"
94 no_new_privileges true
98 service "gps-update" do
99 action [:enable, :start]
100 subscribes :restart, "git[/srv/gps-tile.openstreetmap.org/updater]"
101 subscribes :restart, "systemd_service[gps-update]"
104 remote_directory "/srv/gps-tile.openstreetmap.org/html" do
109 files_owner "gpstile"
110 files_group "gpstile"
114 apache_module "headers"
116 ssl_certificate "gps-tile.openstreetmap.org" do
117 domains ["gps-tile.openstreetmap.org",
118 "a.gps-tile.openstreetmap.org",
119 "b.gps-tile.openstreetmap.org",
120 "c.gps-tile.openstreetmap.org",
121 "gps.tile.openstreetmap.org",
122 "gps-a.tile.openstreetmap.org",
123 "gps-b.tile.openstreetmap.org",
124 "gps-c.tile.openstreetmap.org"]
125 notifies :reload, "service[apache2]"
128 apache_site "gps-tile.openstreetmap.org" do
129 template "apache.erb"