From: Matt Amos Date: Wed, 31 Dec 2014 14:04:24 +0000 (+0000) Subject: First version of new tilelog cookbook. X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/4226a607bcc0fbf418b9ae374af52651d67b8a52 First version of new tilelog cookbook. --- diff --git a/cookbooks/planet/attributes/default.rb b/cookbooks/planet/attributes/default.rb index a94e40697..649d9b399 100644 --- a/cookbooks/planet/attributes/default.rb +++ b/cookbooks/planet/attributes/default.rb @@ -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 index 000000000..7c43bd807 --- /dev/null +++ b/cookbooks/tilelog/CHANGELOG.md @@ -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 index 000000000..31f6f4d3b --- /dev/null +++ b/cookbooks/tilelog/README.md @@ -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 + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyTypeDescriptionDefault
[:tilelog][:source_directory]StringDirectory in which the source is checked out and built./opt/tilelog
[:tilelog][:input_directory]StringDirectory in which the input log files can be found./store/logs/tile.openstreetmap.org
[:tilelog][:source_directory]StringDirectory in which the output analysis files are to be placed./store/planet/tile_logs
+ +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 index 000000000..d07a287bf --- /dev/null +++ b/cookbooks/tilelog/attributes/default.rb @@ -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 index 000000000..0c75d9eb3 --- /dev/null +++ b/cookbooks/tilelog/metadata.rb @@ -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' diff --git a/cookbooks/planet/recipes/tilelog.rb b/cookbooks/tilelog/recipes/default.rb similarity index 90% rename from cookbooks/planet/recipes/tilelog.rb rename to cookbooks/tilelog/recipes/default.rb index 30c281f88..9deb70d0b 100644 --- a/cookbooks/planet/recipes/tilelog.rb +++ b/cookbooks/tilelog/recipes/default.rb @@ -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 diff --git a/cookbooks/planet/templates/default/tilelog.cron.erb b/cookbooks/tilelog/templates/default/tilelog.cron.erb similarity index 100% rename from cookbooks/planet/templates/default/tilelog.cron.erb rename to cookbooks/tilelog/templates/default/tilelog.cron.erb diff --git a/cookbooks/planet/templates/default/tilelog.erb b/cookbooks/tilelog/templates/default/tilelog.erb similarity index 100% rename from cookbooks/planet/templates/default/tilelog.erb rename to cookbooks/tilelog/templates/default/tilelog.erb diff --git a/roles/ironbelly.rb b/roles/ironbelly.rb index 821912a19..9a8188449 100644 --- a/roles/ironbelly.rb +++ b/roles/ironbelly.rb @@ -100,5 +100,5 @@ run_list( "recipe[rsyncd]", "recipe[openvpn]", "recipe[git::server]", - "recipe[planet::tilelog]" + "recipe[tilelog]" )