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::ssl"
23 package "build-essential"
27 package "libarchive-dev"
28 package "libexpat1-dev"
31 package "libcache-memcached-perl"
33 directory "/srv/gps-tile.openstreetmap.org" do
39 git "/srv/gps-tile.openstreetmap.org/import" do
41 repository "git://github.com/ericfischer/gpx-import.git"
47 execute "/srv/gps-tile.openstreetmap.org/import/src/Makefile" do
50 cwd "/srv/gps-tile.openstreetmap.org/import/src"
53 subscribes :run, "git[/srv/gps-tile.openstreetmap.org/import]"
56 git "/srv/gps-tile.openstreetmap.org/datamaps" do
58 repository "git://github.com/ericfischer/datamaps.git"
64 execute "/srv/gps-tile.openstreetmap.org/datamaps/Makefile" do
67 cwd "/srv/gps-tile.openstreetmap.org/datamaps"
70 subscribes :run, "git[/srv/gps-tile.openstreetmap.org/datamaps]"
73 git "/srv/gps-tile.openstreetmap.org/updater" do
75 repository "git://github.com/ericfischer/gpx-updater.git"
81 template "/etc/init.d/gps-update" do
82 source "update.init.erb"
88 service "gps-update" do
89 action [:enable, :start]
90 supports :restart => true, :status => true
91 subscribes :restart, "git[/srv/gps-tile.openstreetmap.org/updater]"
94 remote_directory "/srv/gps-tile.openstreetmap.org/html" do
100 files_group "gpstile"
104 apache_module "headers"
106 ssl_certificate "gps-tile.openstreetmap.org" do
107 domains ["gps-tile.openstreetmap.org",
108 "a.gps-tile.openstreetmap.org",
109 "b.gps-tile.openstreetmap.org",
110 "c.gps-tile.openstreetmap.org",
111 "gps.tile.openstreetmap.org",
112 "gps-a.tile.openstreetmap.org",
113 "gps-b.tile.openstreetmap.org",
114 "gps-c.tile.openstreetmap.org"]
115 fallback_certificate "tile.openstreetmap"
116 notifies :reload, "service[apache2]"
119 apache_site "gps-tile.openstreetmap.org" do
120 template "apache.erb"