Manage the replication directory
authorTom Hughes <tom@compton.nu>
Wed, 3 Jul 2013 23:40:14 +0000 (00:40 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 3 Jul 2013 23:40:14 +0000 (00:40 +0100)
cookbooks/osmosis/recipes/default.rb
cookbooks/planet/files/default/bin/apache-latest-planet-filename [changed mode: 0755->0644]
cookbooks/planet/files/default/bin/planet-mirror-redirect-update [changed mode: 0755->0644]
cookbooks/planet/files/default/bin/planet2pbf [changed mode: 0755->0644]
cookbooks/planet/files/default/cgi/HEADER.cgi [changed mode: 0755->0644]
cookbooks/planet/files/default/replication-bin/replicate-changesets [moved from cookbooks/planet/templates/default/changesets.bin.erb with 100% similarity]
cookbooks/planet/files/default/replication-cgi/HEADER.cgi [new file with mode: 0644]
cookbooks/planet/recipes/replication.rb

index 42679ac3f956c10f78f527efbed8ba0ce5f39125..7532cd7acde2c80487e473db6106548df329245e 100644 (file)
@@ -19,6 +19,9 @@
 
 include_recipe "chef"
 
+package "unzip"
+package "openjdk-6-jre"
+
 osmosis_package = "osmosis-#{node[:osmosis][:version]}.zip"
 osmosis_directory = "/opt/osmosis-#{node[:osmosis][:version]}"
 
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/cookbooks/planet/files/default/replication-cgi/HEADER.cgi b/cookbooks/planet/files/default/replication-cgi/HEADER.cgi
new file mode 100644 (file)
index 0000000..5432bd9
--- /dev/null
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+
+print """
+<html>
+ <head>
+  <title>OpenStreetMap replication diffs</title>
+  <link href="/style.css" rel="stylesheet" type="text/css">
+ </head>
+ <body>
+<img id="logo" src="/logo.png" alt="OSM logo" width="128" height="128">
+<h1>planet.openstreetmap.org - replication diffs</h1>
+<p>OpenStreetMap is <i>open data</i>, licensed under the <a href="http://opendatacommons.org/licenses/odbl/">Open Data Commons Open Database License</a> (ODbL)</p>
+<p>&nbsp;</p>
+"""
index 027aba96b14a8735b261505f2897a9a7c894a165..f1d06b5e1046781cd510a948b83a02918ff57f85 100644 (file)
@@ -26,11 +26,48 @@ package "ruby-libxml"
 
 gem_package "pg"
 
-template "/usr/local/bin/replicate-changesets" do
-  source "changesets.bin.erb"
+remote_directory "/usr/local/bin" do
+  source "replication-bin"
   owner "root"
   group "root"
   mode 0755
+  files_owner "root"
+  files_group "root"
+  files_mode 0755
+end
+
+remote_directory "/store/planet/replication" do
+  source "replication-cgi"
+  owner "root"
+  group "root"
+  mode 0755
+  files_owner "root"
+  files_group "root"
+  files_mode 0755
+end
+
+directory "/store/planet/replication/changesets" do
+  owner "planet"
+  group "planet"
+  mode 0755
+end
+
+directory "/store/planet/replication/day" do
+  owner "planet"
+  group "planet"
+  mode 0755
+end
+
+directory "/store/planet/replication/hour" do
+  owner "planet"
+  group "planet"
+  mode 0755
+end
+
+directory "/store/planet/replication/minute" do
+  owner "planet"
+  group "planet"
+  mode 0755
 end
 
 directory "/etc/replication" do