]> git.openstreetmap.org Git - chef.git/commitdiff
Merge remote-tracking branch 'zerebubuth/add-tile-log-analysis'
authorTom Hughes <tom@compton.nu>
Sat, 17 Jan 2015 12:23:08 +0000 (12:23 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 17 Jan 2015 12:23:08 +0000 (12:23 +0000)
16 files changed:
cookbooks/foundation/recipes/board.rb
cookbooks/foundation/recipes/wiki.rb
cookbooks/mediawiki/definitions/mediawiki_extension.rb
cookbooks/mediawiki/definitions/mediawiki_site.rb
cookbooks/mediawiki/templates/default/mw-ext-ConfirmEdit.inc.php.erb
cookbooks/otrs/templates/default/backup.cron.erb
cookbooks/piwik/attributes/default.rb
cookbooks/piwik/recipes/default.rb
cookbooks/piwik/templates/default/config.erb
cookbooks/planet/recipes/dump.rb
cookbooks/planet/templates/default/planet-mirror-redirect-update.erb
cookbooks/wiki/recipes/default.rb
roles/dev.rb
roles/saphira.rb
roles/stormfly-02.rb
roles/tile.rb

index 02d1461fec70e5af82508bb31d0066eeec7301fb..8c2708881038a43b29525abd79d7b1687604aa4d 100644 (file)
@@ -32,6 +32,8 @@ mediawiki_site  "board.osmfoundation.org" do
   email_sender "webmaster@openstreetmap.org"
   email_sender_name "OSMF Board Wiki"
   private true
+  recaptcha_public_key "6LflIQATAAAAAMXyDWpba-FgipVzE-aGF4HIR59N"
+  recaptcha_private_key passwords["board"]["recaptcha"]
 end
 
 cookbook_file "/srv/board.osmfoundation.org/Wiki.png" do
index f5347ee42c9825563dfcbb3a619f27bdbfa31a0e..5d54b5426f8b152aa924bf9b16c8a17fb6a4c3b4 100644 (file)
@@ -33,6 +33,8 @@ mediawiki_site  "wiki.osmfoundation.org" do
   email_sender "webmaster@openstreetmap.org"
   email_sender_name "OSMF Wiki"
   private_accounts true
+  recaptcha_public_key "6LflIQATAAAAAMXyDWpba-FgipVzE-aGF4HIR59N"
+  recaptcha_private_key passwords["wiki"]["recaptcha"]
 end
 
 cookbook_file "/srv/wiki.osmfoundation.org/Wiki.png" do
index 91c3116569da10c75680ee07ad49288d4172cce1..37c93e41d3ca383379f3b339017a49e158197a99 100644 (file)
@@ -17,7 +17,7 @@
 # limitations under the License.
 #
 
-define :mediawiki_extension, :action => [ :enable ] do
+define :mediawiki_extension, :action => [ :enable ], :variables => {} do
   name = params[:name]
   site = params[:site]
   site_directory = node[:mediawiki][:sites][site][:site_directory]
@@ -25,6 +25,7 @@ define :mediawiki_extension, :action => [ :enable ] do
   extension_directory = "#{mediawiki_directory}/extensions/#{name}"
   source = params[:source]
   template = params[:template]
+  template_variables = params[:variables]
 
   if source
     remote_directory extension_directory do
@@ -67,6 +68,7 @@ define :mediawiki_extension, :action => [ :enable ] do
       user node[:mediawiki][:user]
       group node[:mediawiki][:group]
       mode 0664
+      variables template_variables
       notifies :create, resources(:template => "#{mediawiki_directory}/LocalSettings.php")
     end
   end
index 3e427b2498ea3ba571116d4e9fa856f2fd0b5745..f8f03c18efe85089314ab0e704b3d37ac56ef73a 100644 (file)
@@ -39,23 +39,25 @@ define :mediawiki_site, :action => [ :create, :enable ] do
   mediawiki_reference      = "refs/heads/REL#{mediawiki_version}".tr(".", "_")
 
   mediawiki = {
-    :directory        => "#{site_directory}/w",
-    :site             => name,
-    :sitename         => params[:sitename] || "OpenStreetMap Wiki",
-    :metanamespace    => params[:metanamespace] || "OpenStreetMap",
-    :logo             => params[:logo] || "$wgStylePath/common/images/wiki.png",
-    :email_contact    => params[:email_contact] || "",
-    :email_sender     => params[:email_sender] || "",
+    :directory         => "#{site_directory}/w",
+    :site              => name,
+    :sitename          => params[:sitename] || "OpenStreetMap Wiki",
+    :metanamespace     => params[:metanamespace] || "OpenStreetMap",
+    :logo              => params[:logo] || "$wgStylePath/common/images/wiki.png",
+    :email_contact     => params[:email_contact] || "",
+    :email_sender      => params[:email_sender] || "",
     :email_sender_name => params[:email_sender_name] || "MediaWiki Mail", 
-    :commons          => params[:commons] || TRUE,
-    :skin             => params[:skin] || "vector",
-    :site_notice      => params[:site_notice] || "",
-    :site_readonly    => params[:site_readonly] || FALSE,
-    :site_admin_user  => "Admin",
-    :site_admin_pw    => params[:admin_password],
-    :enable_ssl       => params[:enable_ssl] || FALSE,
-    :private_accounts => params[:private_accounts] || FALSE,
-    :private          => params[:private] || FALSE
+    :commons           => params[:commons] || TRUE,
+    :skin              => params[:skin] || "vector",
+    :site_notice       => params[:site_notice] || "",
+    :site_readonly     => params[:site_readonly] || FALSE,
+    :site_admin_user   => "Admin",
+    :site_admin_pw     => params[:admin_password],
+    :enable_ssl        => params[:enable_ssl] || FALSE,
+    :private_accounts  => params[:private_accounts] || FALSE,
+    :private           => params[:private] || FALSE,
+    :recaptcha_public  => params[:recaptcha_public_key],
+    :recaptcha_private => params[:recaptcha_private_key],
   }
 
 #----------------
@@ -207,6 +209,8 @@ define :mediawiki_site, :action => [ :create, :enable ] do
   mediawiki_extension "ConfirmEdit" do
     site name
     template "mw-ext-ConfirmEdit.inc.php.erb"
+    variables :public_key => mediawiki[:recaptcha_public],
+              :private_key => mediawiki[:recaptcha_private]
   end
 
   mediawiki_extension "Gadgets" do
index e2759a02fcf896cd6840de556bdedc946a1793b0..0bb3b91ff4ca9b6d2c9c99ab45feb0bcc41eacd8 100644 (file)
@@ -2,6 +2,6 @@
 # DO NOT EDIT - This file is being maintained by Chef
 require_once( $IP.'/extensions/ConfirmEdit/ReCaptcha.php' );
 $wgCaptchaClass = 'ReCaptcha';
-$recaptcha_public_key = '6Lc9OLsSAAAAAKazGuA9zItboXIHb6ObYOdiVm6o';
-$recaptcha_private_key = '6Lc9OLsSAAAAAKVZr9jFBc0GL-9Fm2H-paqu-4TB';
+$recaptcha_public_key = '<%= @public_key %>';
+$recaptcha_private_key = '<%= @private_key %>';
 $wgCaptchaTriggers['addurl'] = true;
index 4be1ce99f32f4a54afb8815a5a439b33520dc41b..ccbb3c2d509d8a2bec49c2b44d7750a1414937c9 100644 (file)
@@ -11,7 +11,7 @@ chown otrs $T
 chown otrs $T/otrs-$D
 sudo -u otrs pg_dump --file=$T/otrs-$D/otrs.dmp otrs
 ln -s /opt/otrs $T/otrs-$D/otrs
-ln -s /etc/apache2/sites-available/otrs.openstreetmap.org $T/otrs-$D/apache2-otrs.openstreetmap.org
+ln -s /etc/apache2/sites-available/otrs.openstreetmap.org.conf $T/otrs-$D/apache2-otrs.openstreetmap.org.conf
 
 export GZIP="--rsyncable -9"
 export RSYNC_RSH="ssh -ax -c arcfour"
index f20a3a55f46694882f8c64ff328fa45d2dd8eec5..b044d41db56172cfd215cdac5a69714132f9cec6 100644 (file)
@@ -1 +1,13 @@
-default[:piwik][:version] = "2.9.1"
+default[:piwik][:version] = "2.10.0"
+default[:piwik][:plugins] = [
+  "Actions", "API", "BulkTracking", "Contents", "CoreAdminHome",
+  "CoreConsole", "CoreHome", "CorePluginsAdmin", "CoreUpdater",
+  "CoreVisualizations", "CustomVariables", "Dashboard",
+  "DevicesDetection", "DevicePlugins", "DoNotTrack", "Feedback",
+  "Goals", "ImageGraph", "Installation", "LanguagesManager", "Live",
+  "Login", "Morpheus", "MultiSites", "PrivacyManager", "Provider",
+  "Proxy", "Referrers", "Resolution", "SEO", "SitesManager",
+  "UserCountry", "UserCountryMap", "UserSettings", "UsersManager",
+  "Widgetize", "VisitFrequency", "VisitorInterest", "VisitsSummary",
+  "VisitTime"
+]
index 376b96e4f08bb417788e405881446943512a1273..1366d72c9d4a4ecbdfdb4d8d1124fabffe73017d 100644 (file)
@@ -67,7 +67,9 @@ template "/opt/piwik-#{version}/piwik/config/config.ini.php" do
   owner "root"
   group "root"
   mode "0644"
-  variables :passwords => passwords
+  variables :passwords => passwords,
+            :directory => "/opt/piwik-#{version}/piwik", 
+            :plugins => node[:piwik][:plugins]
 end
 
 directory "/opt/piwik-#{version}/piwik/tmp" do
index cea82b6b0a2a3e530085fb47693c3773f44034ec..744f7cd773ea1601e511e3632ccf7cc43a32d656 100644 (file)
@@ -15,90 +15,14 @@ trusted_hosts[] = "piwik.openstreetmap.org"
 salt = "<%= @passwords['salt'] %>"
 
 [Plugins]
-Plugins[] = "CorePluginsAdmin"
-Plugins[] = "CoreAdminHome"
-Plugins[] = "CoreHome"
-Plugins[] = "Proxy"
-Plugins[] = "API"
-Plugins[] = "Widgetize"
-Plugins[] = "LanguagesManager"
-Plugins[] = "Actions"
-Plugins[] = "Dashboard"
-Plugins[] = "MultiSites"
-Plugins[] = "UserSettings"
-Plugins[] = "Goals"
-Plugins[] = "SEO"
-Plugins[] = "UserCountry"
-Plugins[] = "VisitsSummary"
-Plugins[] = "VisitFrequency"
-Plugins[] = "VisitTime"
-Plugins[] = "VisitorInterest"
-Plugins[] = "ExampleAPI"
-Plugins[] = "ExamplePlugin"
-Plugins[] = "ExampleRssWidget"
-Plugins[] = "Provider"
-Plugins[] = "Feedback"
-Plugins[] = "Login"
-Plugins[] = "UsersManager"
-Plugins[] = "SitesManager"
-Plugins[] = "Installation"
-Plugins[] = "CoreUpdater"
-Plugins[] = "UserCountryMap"
-Plugins[] = "Live"
-Plugins[] = "CustomVariables"
-Plugins[] = "PrivacyManager"
-Plugins[] = "ImageGraph"
-Plugins[] = "DoNotTrack"
-Plugins[] = "DevicesDetection"
-Plugins[] = "Referrers"
-Plugins[] = "CoreConsole"
-Plugins[] = "CoreVisualizations"
-Plugins[] = "Morpheus"
-Plugins[] = "Contents"
+<% @plugins.each do |plugin| -%>
+Plugins[] = "<%= plugin %>"
+<% end -%>
 
 [PluginsInstalled]
-PluginsInstalled[] = "Login"
-PluginsInstalled[] = "CoreAdminHome"
-PluginsInstalled[] = "UsersManager"
-PluginsInstalled[] = "SitesManager"
-PluginsInstalled[] = "Installation"
-PluginsInstalled[] = "CorePluginsAdmin"
-PluginsInstalled[] = "CoreHome"
-PluginsInstalled[] = "Proxy"
-PluginsInstalled[] = "API"
-PluginsInstalled[] = "Widgetize"
-PluginsInstalled[] = "LanguagesManager"
-PluginsInstalled[] = "Actions"
-PluginsInstalled[] = "Dashboard"
-PluginsInstalled[] = "MultiSites"
-PluginsInstalled[] = "UserSettings"
-PluginsInstalled[] = "Goals"
-PluginsInstalled[] = "SEO"
-PluginsInstalled[] = "UserCountry"
-PluginsInstalled[] = "VisitsSummary"
-PluginsInstalled[] = "VisitFrequency"
-PluginsInstalled[] = "VisitTime"
-PluginsInstalled[] = "VisitorInterest"
-PluginsInstalled[] = "ExampleAPI"
-PluginsInstalled[] = "ExamplePlugin"
-PluginsInstalled[] = "ExampleRssWidget"
-PluginsInstalled[] = "ExampleFeedburner"
-PluginsInstalled[] = "Provider"
-PluginsInstalled[] = "Feedback"
-PluginsInstalled[] = "CoreUpdater"
-PluginsInstalled[] = "UserCountryMap"
-PluginsInstalled[] = "Live"
-PluginsInstalled[] = "CustomVariables"
-PluginsInstalled[] = "PrivacyManager"
-PluginsInstalled[] = "GeoIP"
-PluginsInstalled[] = "ImageGraph"
-PluginsInstalled[] = "DoNotTrack"
-PluginsInstalled[] = "DevicesDetection"
-PluginsInstalled[] = "CoreConsole"
-PluginsInstalled[] = "CoreVisualizations"
-PluginsInstalled[] = "Referrers"
-PluginsInstalled[] = "Morpheus"
-PluginsInstalled[] = "Contents"
+<% Dir.new("#{@directory}/plugins").reject { |f| f =~ /\./ }.sort.each do |plugin| -%>
+PluginsInstalled[] = "<%= plugin %>"
+<% end -%>
 
 [Plugins_Tracker]
 Plugins_Tracker[] = "Provider"
index 7aca0844211b5e9ce82b6b9c96a65af96b39f05b..63092565adc49fa3c2ed68645f24e403ad64f796 100644 (file)
@@ -42,6 +42,10 @@ package "libosmpbf-dev"
 package "libprotobuf-dev"
 package "osmpbf-bin"
 
+# Add planet-mirror-redirect-update dependencies
+package "php5-cli"
+package "php5-curl"
+
 directory "/opt/planet-dump-ng" do
   owner "root"
   group "root"
index 1f37ecd234cb994546c93b4442c216220a3b0125..c673998e66916e40997ebb694ecb03f00fdf7bee 100644 (file)
@@ -11,7 +11,7 @@ $_YEAR = date('Y');
 $_PLANET_FOLDER = '<%= node[:planet][:dump][:xml_directory] %>/'.$_YEAR.'/';
 $_PLANET_REGEX = "/^(planet|changesets)\-\d{6}(\-nolt)?\.osm\.(bz2|gz)$/";
 $_MIRROR = 'http://ftp.heanet.ie/mirrors/openstreetmap.org/planet/'.$_YEAR.'/';
-$_PLANET_HTACCESS = $_PLANET_FOLDER.'../../.htaccess';
+$_PLANET_HTACCESS = realpath($_PLANET_FOLDER.'../..').'/.htaccess';
 
 function _MIRROR_FILE_SIZE($url) {
        $ch = @curl_init();
@@ -24,7 +24,7 @@ function _MIRROR_FILE_SIZE($url) {
        return ($curl_result['download_content_length']);
 }                      
 
-if (posix_getuid() !== fileowner($_PLANET_HTACCESS)) die('User ID of process does not match .htaccess owner'."\n");
+if (!is_writable($_PLANET_HTACCESS)) die('File '.$_PLANET_HTACCESS.' is not writable by current user.'."\n");
 
 if (is_dir($_PLANET_FOLDER)) {
        $htaccess_contents = file_get_contents($_PLANET_HTACCESS);
@@ -53,4 +53,3 @@ if (is_dir($_PLANET_FOLDER)) {
                fclose($htaccess_handle);
        }
 }
-?>
index 9d95de42415dcde4fb370108f8d91f2290c99b13..78f16ed0edb4d9a2fcdd58739e78238d8b341820 100644 (file)
@@ -46,6 +46,9 @@ mediawiki_site  "wiki.openstreetmap.org" do
   email_sender_name "OpenStreetMap Wiki"
 
   metanamespace "OpenStreetMap"
+
+  recaptcha_public_key "6LdFIQATAAAAAMwtHeI8KDgPqvRbXeNYSq1gujKz"
+  recaptcha_private_key passwords["recaptcha"]
   
   #site_readonly "MAINTENANCE UPDATE: WIKI READ-ONLY. ETA: Tuesday 8:00am UTC/GMT."
 
index 0a9b76f28c561cb2263a6f25fc1f12a067a9cc80..1c92502558f90ce5c49d759f330e58b86d3da6c6 100644 (file)
@@ -124,6 +124,14 @@ default_attributes(
       :jsrouting2 => {
         :repository => "git://github.com/jfirebaugh/openstreetmap-website.git",
         :revision => "routing"
+      },
+      :comments => {
+        :repository => "git://github.com/ukasiu/openstreetmap-website.git",
+        :revision => "comments_list"
+      },
+      :rails42 => {
+        :repository => "git://github.com/tomhughes/openstreetmap-website.git",
+        :revision => "rails42"
       }
     }
   },
index 3a4efee51af99cccd243f13f106e099894aa71a0..fb67c55de37bed2b0b9f08a3af348a86a1d501f4 100644 (file)
@@ -23,7 +23,7 @@ default_attributes(
     }
   },
   :squid => {
-    :cache_mem => "7500 MB",
+    :cache_mem => "6100 MB",
     :cache_dir => "coss /store/squid/coss-01 80000 block-size=8192 max-size=262144 membufs=80"
   },
   :tilecache => {
index 9e97b4a674d23fb798aa47f876216b6498c0710d..7d5a38bf78f96daaf54f0c01345e418f9e34bd3e 100644 (file)
@@ -13,7 +13,7 @@ default_attributes(
     }
   },
   :squid => {
-    :cache_mem => "32000 MB",
+    :cache_mem => "29000 MB",
     :cache_dir => "coss /store/squid/coss-01 128000 block-size=8192 max-size=262144 membufs=80"
   },
   :tilecache => {
index e3ecd1518fd2c9271f4b833a6adc68758df53008..8d1af516e6122aee3d0ea834b8bf55431fe51233 100644 (file)
@@ -83,7 +83,7 @@ default_attributes(
     :styles => {
       :default => {
         :repository => "git://github.com/gravitystorm/openstreetmap-carto.git",
-        :revision => "v2.25.0",
+        :revision => "v2.26.1",
         :max_zoom => 19
       }
     }