First version of new tilelog cookbook.
authorMatt Amos <zerebubuth@gmail.com>
Wed, 31 Dec 2014 14:04:24 +0000 (14:04 +0000)
committerMatt Amos <zerebubuth@gmail.com>
Wed, 31 Dec 2014 14:10:06 +0000 (14:10 +0000)
cookbooks/planet/attributes/default.rb
cookbooks/tilelog/CHANGELOG.md [new file with mode: 0644]
cookbooks/tilelog/README.md [new file with mode: 0644]
cookbooks/tilelog/attributes/default.rb [new file with mode: 0644]
cookbooks/tilelog/metadata.rb [new file with mode: 0644]
cookbooks/tilelog/recipes/default.rb [moved from cookbooks/planet/recipes/tilelog.rb with 90% similarity]
cookbooks/tilelog/templates/default/tilelog.cron.erb [moved from cookbooks/planet/templates/default/tilelog.cron.erb with 100% similarity]
cookbooks/tilelog/templates/default/tilelog.erb [moved from cookbooks/planet/templates/default/tilelog.erb with 100% similarity]
roles/ironbelly.rb

index a94e406..649d9b3 100644 (file)
@@ -2,7 +2,3 @@ default[:planet][:dump][:xml_directory] = "/store/planet/planet"
 default[:planet][:dump][:xml_history_directory] = "/store/planet/planet/full-history"
 default[:planet][:dump][:pbf_directory] = "/store/planet/pbf"
 default[:planet][:dump][:pbf_history_directory] = "/store/planet/pbf/full-history"
-
-default[:planet][:tilelog][:source_directory] = "/opt/tilelog"
-default[:planet][:tilelog][:input_directory] = "/store/logs/tile.openstreetmap.org"
-default[:planet][:tilelog][:output_directory] = "/store/planet/tile_logs"
diff --git a/cookbooks/tilelog/CHANGELOG.md b/cookbooks/tilelog/CHANGELOG.md
new file mode 100644 (file)
index 0000000..7c43bd8
--- /dev/null
@@ -0,0 +1,13 @@
+tilelog CHANGELOG
+=================
+
+This file is used to list changes made in each version of the tilelog cookbook.
+
+0.1.0
+-----
+- [your_name] - Initial release of tilelog
+
+- - -
+Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
+
+The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.
diff --git a/cookbooks/tilelog/README.md b/cookbooks/tilelog/README.md
new file mode 100644 (file)
index 0000000..31f6f4d
--- /dev/null
@@ -0,0 +1,74 @@
+tilelog Cookbook
+================
+This cookbook contains the tile log processing / analysis tools. This includes creating the tile log summaries of the number of tiles downloaded from the tile caches.
+
+Requirements
+------------
+
+#### cookbooks
+- `tools` - tilelog needs the OSM tools cookbook.
+- `git` - tilelog needs the OSM git cookbook to download the tile log analysis source.
+
+#### packages
+- `gcc` - for building the analysis tool.
+- `make` - for building the analysis tool.
+- `autoconf` - for building the analysis tool.
+- `automake` - for building the analysis tool.
+- `libboost-filesystem-dev` - a dependency of the analysis tool.
+- `libboost-system-dev` - a dependency of the analysis tool.
+- `libboost-program-options-dev` - a dependency of the analysis tool.
+
+
+Attributes
+----------
+
+#### tilelog::default
+<table>
+  <tr>
+    <th>Key</th>
+    <th>Type</th>
+    <th>Description</th>
+    <th>Default</th>
+  </tr>
+  <tr>
+    <td><tt>[:tilelog][:source_directory]</tt></td>
+    <td>String</td>
+    <td>Directory in which the source is checked out and built.</td>
+    <td><tt>/opt/tilelog</tt></td>
+  </tr>
+  <tr>
+    <td><tt>[:tilelog][:input_directory]</tt></td>
+    <td>String</td>
+    <td>Directory in which the input log files can be found.</td>
+    <td><tt>/store/logs/tile.openstreetmap.org</tt></td>
+  </tr>
+  <tr>
+    <td><tt>[:tilelog][:source_directory]</tt></td>
+    <td>String</td>
+    <td>Directory in which the output analysis files are to be placed.</td>
+    <td><tt>/store/planet/tile_logs</tt></td>
+  </tr>
+</table>
+
+Usage
+-----
+#### tilelog::default
+TODO: Write usage instructions for each cookbook.
+
+e.g.
+Just include `tilelog` in your node's `run_list`:
+
+```json
+{
+  "name":"my_node",
+  "run_list": [
+    "recipe[tilelog]"
+  ]
+}
+```
+
+License and Authors
+-------------------
+Released under the [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0).
+
+Authors: Matt Amos
diff --git a/cookbooks/tilelog/attributes/default.rb b/cookbooks/tilelog/attributes/default.rb
new file mode 100644 (file)
index 0000000..d07a287
--- /dev/null
@@ -0,0 +1,4 @@
+
+default[:tilelog][:source_directory] = "/opt/tilelog"
+default[:tilelog][:input_directory] = "/store/logs/tile.openstreetmap.org"
+default[:tilelog][:output_directory] = "/store/planet/tile_logs"
diff --git a/cookbooks/tilelog/metadata.rb b/cookbooks/tilelog/metadata.rb
new file mode 100644 (file)
index 0000000..0c75d9e
--- /dev/null
@@ -0,0 +1,9 @@
+name             'tilelog'
+maintainer       'OpenStreetMap Administrators'
+maintainer_email 'admins@openstreetmap.org'
+license          'Apache 2.0'
+description      'Installs and configures tile log analysis'
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
+version          '1.0.0'
+depends          'git'
+depends          'tools'
similarity index 90%
rename from cookbooks/planet/recipes/tilelog.rb
rename to cookbooks/tilelog/recipes/default.rb
index 30c281f..9deb70d 100644 (file)
@@ -1,6 +1,6 @@
 #
-# Cookbook Name:: planet
-# Recipe:: tilelog
+# Cookbook Name:: tilelog
+# Recipe:: default
 #
 # Copyright 2014, OpenStreetMap Foundation
 #
@@ -27,9 +27,9 @@ package "libboost-filesystem-dev"
 package "libboost-system-dev"
 package "libboost-program-options-dev"
 
-tilelog_source_directory = node[:planet][:tilelog][:source_directory]
-tilelog_input_directory = node[:planet][:tilelog][:input_directory]
-tilelog_output_directory = node[:planet][:tilelog][:output_directory]
+tilelog_source_directory = node[:tilelog][:source_directory]
+tilelog_input_directory = node[:tilelog][:input_directory]
+tilelog_output_directory = node[:tilelog][:output_directory]
 
 # resources for building the tile analysis binary
 git tilelog_source_directory do
index 821912a..9a81884 100644 (file)
@@ -100,5 +100,5 @@ run_list(
   "recipe[rsyncd]",
   "recipe[openvpn]",
   "recipe[git::server]",
-  "recipe[planet::tilelog]"
+  "recipe[tilelog]"
 )