From: Tom Hughes Date: Sat, 17 Jan 2015 12:23:08 +0000 (+0000) Subject: Merge remote-tracking branch 'zerebubuth/add-tile-log-analysis' X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/979e98164cc9a6d7216197f01febc918c9a152b9?hp=78e18cf714772d64efd23aa4391352c8f55e6f34 Merge remote-tracking branch 'zerebubuth/add-tile-log-analysis' --- diff --git a/cookbooks/foundation/recipes/board.rb b/cookbooks/foundation/recipes/board.rb index 02d1461fe..8c2708881 100644 --- a/cookbooks/foundation/recipes/board.rb +++ b/cookbooks/foundation/recipes/board.rb @@ -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 diff --git a/cookbooks/foundation/recipes/wiki.rb b/cookbooks/foundation/recipes/wiki.rb index f5347ee42..5d54b5426 100644 --- a/cookbooks/foundation/recipes/wiki.rb +++ b/cookbooks/foundation/recipes/wiki.rb @@ -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 diff --git a/cookbooks/mediawiki/definitions/mediawiki_extension.rb b/cookbooks/mediawiki/definitions/mediawiki_extension.rb index 91c311656..37c93e41d 100644 --- a/cookbooks/mediawiki/definitions/mediawiki_extension.rb +++ b/cookbooks/mediawiki/definitions/mediawiki_extension.rb @@ -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 diff --git a/cookbooks/mediawiki/definitions/mediawiki_site.rb b/cookbooks/mediawiki/definitions/mediawiki_site.rb index 3e427b249..f8f03c18e 100644 --- a/cookbooks/mediawiki/definitions/mediawiki_site.rb +++ b/cookbooks/mediawiki/definitions/mediawiki_site.rb @@ -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 diff --git a/cookbooks/mediawiki/templates/default/mw-ext-ConfirmEdit.inc.php.erb b/cookbooks/mediawiki/templates/default/mw-ext-ConfirmEdit.inc.php.erb index e2759a02f..0bb3b91ff 100644 --- a/cookbooks/mediawiki/templates/default/mw-ext-ConfirmEdit.inc.php.erb +++ b/cookbooks/mediawiki/templates/default/mw-ext-ConfirmEdit.inc.php.erb @@ -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; diff --git a/cookbooks/otrs/templates/default/backup.cron.erb b/cookbooks/otrs/templates/default/backup.cron.erb index 4be1ce99f..ccbb3c2d5 100644 --- a/cookbooks/otrs/templates/default/backup.cron.erb +++ b/cookbooks/otrs/templates/default/backup.cron.erb @@ -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" diff --git a/cookbooks/piwik/attributes/default.rb b/cookbooks/piwik/attributes/default.rb index f20a3a55f..b044d41db 100644 --- a/cookbooks/piwik/attributes/default.rb +++ b/cookbooks/piwik/attributes/default.rb @@ -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" +] diff --git a/cookbooks/piwik/recipes/default.rb b/cookbooks/piwik/recipes/default.rb index 376b96e4f..1366d72c9 100644 --- a/cookbooks/piwik/recipes/default.rb +++ b/cookbooks/piwik/recipes/default.rb @@ -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 diff --git a/cookbooks/piwik/templates/default/config.erb b/cookbooks/piwik/templates/default/config.erb index cea82b6b0..744f7cd77 100644 --- a/cookbooks/piwik/templates/default/config.erb +++ b/cookbooks/piwik/templates/default/config.erb @@ -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" diff --git a/cookbooks/planet/recipes/dump.rb b/cookbooks/planet/recipes/dump.rb index 7aca08442..63092565a 100644 --- a/cookbooks/planet/recipes/dump.rb +++ b/cookbooks/planet/recipes/dump.rb @@ -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" diff --git a/cookbooks/planet/templates/default/planet-mirror-redirect-update.erb b/cookbooks/planet/templates/default/planet-mirror-redirect-update.erb index 1f37ecd23..c673998e6 100644 --- a/cookbooks/planet/templates/default/planet-mirror-redirect-update.erb +++ b/cookbooks/planet/templates/default/planet-mirror-redirect-update.erb @@ -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); } } -?> diff --git a/cookbooks/wiki/recipes/default.rb b/cookbooks/wiki/recipes/default.rb index 9d95de424..78f16ed0e 100644 --- a/cookbooks/wiki/recipes/default.rb +++ b/cookbooks/wiki/recipes/default.rb @@ -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." diff --git a/roles/dev.rb b/roles/dev.rb index 0a9b76f28..1c9250255 100644 --- a/roles/dev.rb +++ b/roles/dev.rb @@ -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" } } }, diff --git a/roles/saphira.rb b/roles/saphira.rb index 3a4efee51..fb67c55de 100644 --- a/roles/saphira.rb +++ b/roles/saphira.rb @@ -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 => { diff --git a/roles/stormfly-02.rb b/roles/stormfly-02.rb index 9e97b4a67..7d5a38bf7 100644 --- a/roles/stormfly-02.rb +++ b/roles/stormfly-02.rb @@ -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 => { diff --git a/roles/tile.rb b/roles/tile.rb index e3ecd1518..8d1af516e 100644 --- a/roles/tile.rb +++ b/roles/tile.rb @@ -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 } }