]> git.openstreetmap.org Git - chef.git/commitdiff
imagery: fix titiler image format selection master
authorGrant Slater <github@firefishy.com>
Thu, 30 Jan 2025 16:10:19 +0000 (16:10 +0000)
committerGrant Slater <github@firefishy.com>
Thu, 30 Jan 2025 16:10:19 +0000 (16:10 +0000)
34 files changed:
README.md
cookbooks/community/recipes/default.rb
cookbooks/dev/README.md
cookbooks/dev/recipes/default.rb
cookbooks/dhcpd/README.md
cookbooks/dns/recipes/default.rb
cookbooks/exim/templates/default/exim4.conf.erb
cookbooks/imagery/recipes/au_agri.rb
cookbooks/imagery/recipes/tiler.rb
cookbooks/imagery/resources/site.rb
cookbooks/imagery/templates/default/mapserver.map.erb
cookbooks/imagery/templates/default/nginx_imagery_layer_fragment.conf.erb
cookbooks/mediawiki/recipes/default.rb
cookbooks/mediawiki/resources/site.rb
cookbooks/mediawiki/templates/default/mw-ext-QuickInstantCommons.inc.php.erb [new file with mode: 0644]
cookbooks/planet/files/default/replication-bin/replicate-changesets
cookbooks/podman/resources/service.rb
cookbooks/prometheus/recipes/smokeping.rb
cookbooks/taginfo/recipes/default.rb
cookbooks/vectortile/recipes/default.rb
cookbooks/vectortile/templates/default/import-planet.erb
cookbooks/vectortile/templates/default/tiles-rerender.erb
cookbooks/vectortile/templates/default/vector-update-notile.erb
cookbooks/vectortile/templates/default/vector-update-tile.erb
cookbooks/wiki/recipes/default.rb
roles/aarnet.rb [deleted file]
roles/balerion.rb [deleted file]
roles/bowser.rb [deleted file]
roles/equinix-dub.rb
roles/fafnir.rb
roles/naga.rb
roles/ovh.rb [deleted file]
roles/scorch.rb [deleted file]
roles/wiki.rb

index 86145db1765475d9ed7c6d07bcd1fa0c4750f76e..6b6304834a74c475269d3c9c76095855b9a30229 100644 (file)
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
 
 This repository manages the configuration of all the servers run by the
 OpenStreetMap Foundation's Operations Working Group. We use
-[Chef](https://www.chef.io/) to automated the configuration of all of our
+[Chef](https://www.chef.io/) to automate the configuration of all of our
 servers.
 
 [OSMF Operations Working Group](https://operations.osmfoundation.org/)
@@ -14,20 +14,20 @@ servers.
 
 We make extensive use of roles to configure the servers. In general we have:
 
-## Server-specific roles (e.g. [faffy.rb](roles/faffy.rb))
+## Server-specific roles (e.g., [faffy.rb](roles/faffy.rb))
 
 These deal with particular setup or quirks of a server, such as its IP address. They also include roles representing the service they are performing, and the location they are in and any particular hardware they have that needs configuration.
 All our servers are [named after dragons](https://wiki.openstreetmap.org/wiki/Servers/Name_Ideas).
 
-## Hardware-specific roles (e.g. [hp-g9.rb](roles/hp-g9.rb))
+## Hardware-specific roles (e.g., [hp-g9.rb](roles/hp-g9.rb))
 
 Covers anything specific to a certain piece of hardware, like a motherboard, that could apply to multiple machines.
 
-## Location-specific roles (e.g. [equinix-dub.rb](roles/equinix-dub.rb))
+## Location-specific roles (e.g., [equinix-dub.rb](roles/equinix-dub.rb))
 
 These form a hierarchy of datacentres, organisations, and countries where our servers are located.
 
-## Service-specific roles (e.g. [web-frontend](roles/web-frontend.rb))
+## Service-specific roles (e.g., [web-frontend](roles/web-frontend.rb))
 
 These cover the services that the server is running, and will include the recipes required for that service along with any specific configurations and other cascading roles.
 
index 000a57a7e00cac990e9ebafa1c9e4aba3ec37deb..51c4624eac89ebe2643a6659c88ae8c966ddc89f 100644 (file)
@@ -62,9 +62,8 @@ end
 git "/srv/community.openstreetmap.org/docker" do
   action :sync
   repository "https://github.com/discourse/discourse_docker.git"
-  # Revision pin not possible as launch wrapper automatically updates git repo.
-  revision "main"
-  depth 1
+  # DANGER launch wrapper automatically updates git repo if rebuild method used: https://github.com/discourse/discourse_docker/blob/107ffb40fe8b1ea40e00814468db974a4f3f8e8f/launcher#L799
+  revision "136c63890674b95df1327d24270c55e4ef8e87a8"
   user "root"
   group "root"
   notifies :run, "notify_group[discourse_container_new_data]"
@@ -122,18 +121,24 @@ notify_group "discourse_container_new_web_only" do
   notifies :run, "execute[discourse_container_data_start]", :immediately # noop if site up
   notifies :run, "execute[discourse_container_web_only_bootstrap]", :immediately # site up but runs in parallel. Slow
   notifies :run, "execute[discourse_container_web_only_destroy]", :immediately # site down
-  notifies :run, "execute[discourse_container_data_rebuild]", :immediately # site down
+  notifies :run, "execute[discourse_container_data_destroy]", :immediately # site down
+  notifies :run, "execute[discourse_container_data_bootstrap]", :immediately # site down
+  notifies :run, "execute[discourse_container_data_start]", :immediately # site down
   notifies :run, "execute[discourse_container_web_only_start]", :immediately # site restore
 end
 
 notify_group "discourse_container_new_data" do
   notifies :run, "execute[discourse_container_web_only_destroy]", :immediately # site down
-  notifies :run, "execute[discourse_container_data_rebuild]", :immediately # site down
+  notifies :run, "execute[discourse_container_data_destroy]", :immediately # site down
+  notifies :run, "execute[discourse_container_data_bootstrap]", :immediately # site down
+  notifies :run, "execute[discourse_container_data_start]", :immediately # site down
   notifies :run, "execute[discourse_container_web_only_start]", :immediately # site restore
 end
 
 notify_group "discourse_container_new_mail_receiver" do
-  notifies :run, "execute[discourse_container_mail_receiver_rebuild]", :immediately
+  notifies :run, "execute[discourse_container_mail_receiver_destroy]", :immediately
+  notifies :run, "execute[discourse_container_mail_receiver_bootstrap]", :immediately
+  notifies :run, "execute[discourse_container_mail_receiver_start]", :immediately
 end
 
 # Attempt at a failsafe to ensure all containers are running
@@ -144,17 +149,25 @@ notify_group "discourse_container_ensure_all_running" do
   notifies :run, "execute[discourse_container_mail_receiver_start]", :delayed
 end
 
-execute "discourse_container_data_start" do
+execute "discourse_container_data_bootstrap" do
   action :nothing
-  command "./launcher start data"
+  command "./launcher bootstrap data"
+  cwd "/srv/community.openstreetmap.org/docker/"
+  user "root"
+  group "root"
+end
+
+execute "discourse_container_data_destroy" do
+  action :nothing
+  command "./launcher destroy data"
   cwd "/srv/community.openstreetmap.org/docker/"
   user "root"
   group "root"
 end
 
-execute "discourse_container_data_rebuild" do
+execute "discourse_container_data_start" do
   action :nothing
-  command "./launcher rebuild data"
+  command "./launcher start data"
   cwd "/srv/community.openstreetmap.org/docker/"
   user "root"
   group "root"
@@ -184,10 +197,17 @@ execute "discourse_container_web_only_start" do
   group "root"
 end
 
-# Rebuild: Stop Destroy Bootstap Start
-execute "discourse_container_mail_receiver_rebuild" do
+execute "discourse_container_mail_receiver_bootstrap" do
+  action :nothing
+  command "./launcher bootstrap mail-receiver"
+  cwd "/srv/community.openstreetmap.org/docker/"
+  user "root"
+  group "root"
+end
+
+execute "discourse_container_mail_receiver_destroy" do
   action :nothing
-  command "./launcher rebuild mail-receiver"
+  command "./launcher destroy mail-receiver"
   cwd "/srv/community.openstreetmap.org/docker/"
   user "root"
   group "root"
index 0253da49b2831c177a4847ee9aea6f063407fe45..3918d375bc568c9f9e679797d3a1a98f7fd63a32 100644 (file)
@@ -2,4 +2,4 @@
 
 This cookbook configures development servers, such as dev.openstreetmap.org. It
 installs packages required by the users and configures apache for the various
-user and api developement sites.
+user and api development sites.
index 073bb3e132feec3a85a09b84b07a94733d65c700..0d6790f46308a675e8383ff304ae180ed2f9816f 100644 (file)
@@ -61,6 +61,7 @@ package %w[
   gnuplot-nox
   golang
   graphviz
+  htop
   irssi
   jq
   libargon2-dev
@@ -95,6 +96,7 @@ package %w[
   lzip
   lzop
   mailutils
+  moreutils
   make
   nano
   ncftp
@@ -103,7 +105,6 @@ package %w[
   osmium-tool
   osmosis
   pandoc
-  pandoc
   pbzip2
   php-apcu
   php-cgi
@@ -149,6 +150,7 @@ package %w[
   unrar
   unzip
   whois
+  xxd
   zip
   zlib1g-dev
 ]
index 3d2a00c7c733dd0b883ff726fa504bac97625a70..f95dbb0d063d9f40fce33213f72a334008fd1903 100644 (file)
@@ -1,3 +1,3 @@
 # dhcpd Cookbook
 
-Configures the dhcpd service, which used for the internal network at UCL.
+Configures the dhcpd service, which is used for our internal networks.
index d1b3d159e619132edefc54498e5d82f9d6dd2f7d..3a19d8a91662cfd83f7dd1bcbcb281e0bd532798 100644 (file)
@@ -42,7 +42,7 @@ package %w[
 
 cache_dir = Chef::Config[:file_cache_path]
 
-dnscontrol_version = "4.15.1"
+dnscontrol_version = "4.15.5"
 
 dnscontrol_arch = if arm?
                     "arm64"
index ffc8be609f4d9f2f360cd37dd9015a063db908ee..3558af884317b3907656de655d1b105ad2d9a2d4 100644 (file)
@@ -753,6 +753,9 @@ signed_smtp:
   multi_domain = false
   hosts_try_dane =
   tls_require_ciphers = <%= node[:ssl][:gnutls_ciphers] %>:%LATEST_RECORD_VERSION
+<% if node[:exim][:external_interface] -%>
+  interface = <%= node[:exim][:external_interface] %>
+<% end -%>
 
 
 # This transport is used for handling pipe deliveries generated by alias or
index 931ecf3f1b31b005b7d7bba6a549ed4e66c42f7d..fb011c111113dc376d661c21b56fe191a62b76eb 100644 (file)
@@ -33,7 +33,7 @@ imagery_layer "au_ga_agri" do
   copyright "Commonwealth of Australia (Geoscience Australia) - Creative Commons Attribution 4.0 International Licence"
   background_colour "0 0 0" # Black
   projection "EPSG:3857"
-  source "/store/imagery/au/agri/combine.vrt"
+  source "/store/imagery/au/agri/combine-cutline-cog.tif"
   max_zoom 17
-  revision 1
+  revision 3
 end
index ec7daa835ebc5594e27751f756e7369e375e13b4..319cb5794a749e11a70fc90665def050786b8f11 100644 (file)
@@ -39,9 +39,7 @@ podman_service "titiler" do
   image container_image
   volume :"/store/imagery"       => "/store/imagery",
          :"/srv/imagery/sockets" => "/sockets"
-  environment :BIND                                => "unix:/sockets/titiler.sock",
-              :WORKERS_PER_CORE                    => 1,
-              :GDAL_CACHEMAX                       => 200,
+  environment :GDAL_CACHEMAX                       => 200,
               :GDAL_BAND_BLOCK_CACHE               => "HASHSET",
               :GDAL_DISABLE_READDIR_ON_OPEN        => "EMPTY_DIR",
               :GDAL_INGESTED_BYTES_AT_OPEN         => 32768,
@@ -52,6 +50,7 @@ podman_service "titiler" do
               :VSI_CACHE_SIZE                      => 5000000,
               :TITILER_API_ROOT_PATH               => "/api/v1/titiler",
               :FORWARDED_ALLOW_IPS                 => "*" # https://docs.gunicorn.org/en/latest/settings.html#forwarded-allow-ips
+  command "gunicorn -k uvicorn.workers.UvicornWorker titiler.application.main:app --bind unix:/sockets/titiler.sock --workers #{node.cpu_cores}"
 end
 
 systemd_service "titiler-restart" do
index 5ce7d2b88f6c77ba222a73b14860939f2a868243..5eddb448c47d6a6356297cf75367b5171d482926 100644 (file)
@@ -107,7 +107,8 @@ action :create do
                 "MS_ERRORFILE" => "stderr",
                 "GDAL_CACHEMAX" => "128"
     limit_nofile 16384
-    memory_max "4G"
+    memory_high "12G"
+    memory_max "12G"
     user "imagery"
     group "imagery"
     exec_start "/usr/bin/multiwatch -f 8 --signal=TERM -- /usr/lib/cgi-bin/mapserv"
index c918ca9f1f6b2c99a52f50fb99ff1c9e71d5efa4..728723fcc6c2ab856ca985634ec547a3bda7e532 100644 (file)
@@ -64,6 +64,5 @@ MAP
     STATUS       DEFAULT
     TYPE         RASTER
     PROCESSING   "RESAMPLE=AVERAGE"
-    PROCESSING   "CLOSE_CONNECTION=DEFER"
   END # layer
 END
index c85dd87bb53653eb07b2d18e9aaadc5984f9969a..97f411a181ba799b5b41635260ff3e2040ed8718 100644 (file)
@@ -1,11 +1,9 @@
 <% require 'uri' %>
 # DO NOT EDIT - This file is being maintained by Chef
-location ~* "^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" {
+location ~* "^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.(jpg|jpeg|png|webp)$" {
 <% if @uses_tiler -%>
   set $args "";
-  rewrite ^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.jpg /mosaicjson/tiles/WebMercatorQuad/$1/$2/$3@1x?url=<%= URI.encode_www_form_component(@source) %>&pixel_selection=first&tile_format=jpeg break;
-  rewrite ^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.jpeg /mosaicjson/tiles/WebMercatorQuad/$1/$2/$3@1x?url=<%= URI.encode_www_form_component(@source) %>&pixel_selection=first&tile_format=jpeg break;
-  rewrite ^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.png /mosaicjson/tiles/WebMercatorQuad/$1/$2/$3@1x?url=<%= URI.encode_www_form_component(@source) %>&pixel_selection=first&tile_format=png break;
+  rewrite ^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.(jpg|jpeg|png|webp) /mosaicjson/tiles/WebMercatorQuad/$1/$2/$3@1x.$4?url=<%= URI.encode_www_form_component(@source) %>&pixel_selection=first break;
   proxy_pass http://<%= @site %>_tiler_backend;
   proxy_set_header Host $host;
   proxy_set_header Referer $http_referer;
@@ -17,7 +15,7 @@ location ~* "^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" {
   proxy_set_header Cache-Control "";
   proxy_set_header Pragma "";
   proxy_redirect off;
-  proxy_cache_key "<%= @layer %><%= @revision %> $request_method $1 $2 $3";
+  proxy_cache_key "<%= @layer %><%= @revision %> $request_method $1 $2 $3 $4";
   proxy_cache proxy_cache_zone;
   proxy_cache_valid 200 204 180d;
   proxy_cache_use_stale error timeout updating http_502 http_503 http_504;
@@ -77,8 +75,8 @@ location ~* "^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" {
 }
 
 <% if @root_layer -%>
-rewrite "^/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" "/layer/<%= @layer %>/$1/$2/$3.$4" last;
+rewrite "^/(\d+)/(\d+)/(\d+)\.(jpg|jpeg|png|webp)$" "/layer/<%= @layer %>/$1/$2/$3.$4" last;
 <% end -%>
 <% @url_aliases.each do |url| -%>
-rewrite "^<%= url %>/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" "/layer/<%= @layer %>/$1/$2/$3.$4" last;
+rewrite "^<%= url %>/(\d+)/(\d+)/(\d+)\.(jpg|jpeg|png|webp)$" "/layer/<%= @layer %>/$1/$2/$3.$4" last;
 <% end -%>
index c7249e8facfebb58845bbcacd24f9eb1c2a82242..d784e7b7fd1505a4963d3fb36273242a46c6c8b1 100644 (file)
@@ -41,6 +41,7 @@ package %w[
   composer
   unzip
   ffmpeg
+  firejail
 ]
 
 # Mediawiki enhanced difference engine
index 0bbddfe8174e2e3c869450f775afe99f28e768df..096484a9903cd960240c29d6e1a590b512de7a22 100644 (file)
@@ -425,6 +425,7 @@ action :create do
   if new_resource.commons
     mediawiki_extension "QuickInstantCommons" do
       site new_resource.site
+      template "mw-ext-QuickInstantCommons.inc.php.erb"
       update_site false
     end
   else
diff --git a/cookbooks/mediawiki/templates/default/mw-ext-QuickInstantCommons.inc.php.erb b/cookbooks/mediawiki/templates/default/mw-ext-QuickInstantCommons.inc.php.erb
new file mode 100644 (file)
index 0000000..06151ed
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+# DO NOT EDIT - This file is being maintained by Chef
+wfLoadExtension( 'QuickInstantCommons' );
+$wgUseQuickInstantCommons = false; // Disable as we manually set via wgForeignFileRepos
+$wgForeignFileRepos[] = [
+       'class' => '\MediaWiki\Extension\QuickInstantCommons\Repo',
+       'name' => 'wikimediacommons',
+       'directory' => $wgUploadDirectory,
+       'apibase' => 'https://commons.wikimedia.org/w/api.php',
+       'hashLevels' => 2,
+       'thumbUrl' => 'https://upload.wikimedia.org/wikipedia/commons/thumb',
+       'fetchDescription' => true,
+       'descriptionCacheExpiry' => 60*60*24*30,
+       'transformVia404' => true,
+       'abbrvThreshold' => 160,
+       'apiMetadataExpiry' => 60*60*24*30,
+       'disabledMediaHandlers' => [TiffHandler::class]
+];
index 0c53856d984f1aae58f754cc10a135ba8db27d83..bb4544f68f2eeba005634632f1d1f605665bf4cf 100755 (executable)
@@ -96,7 +96,7 @@ class ChangesetBuilder
 
   def add_comments(xml, cs)
     # grab the visible changeset comments as well
-    res = @conn.exec("select cc.author_id, u.display_name as author, cc.body, cc.created_at from changeset_comments cc join users u on cc.author_id=u.id where cc.changeset_id=#{cs.id} and cc.visible order by cc.created_at asc")
+    res = @conn.exec("select cc.id, cc.author_id, u.display_name as author, cc.body, (cc.created_at at time zone 'utc') as created_at from changeset_comments cc join users u on cc.author_id=u.id where cc.changeset_id=#{cs.id} and cc.visible order by cc.created_at asc")
     xml["comments_count"] = res.num_tuples.to_s
 
     # early return if there aren't any comments
@@ -105,6 +105,7 @@ class ChangesetBuilder
     discussion = XML::Node.new("discussion")
     res.each do |row|
       comment = XML::Node.new("comment")
+      comment["id"] = row["id"]
       comment["uid"] = row["author_id"]
       comment["user"] = xml_sanitize(row["author"])
       comment["date"] = Time.parse(row["created_at"]).getutc.xmlschema
@@ -127,7 +128,7 @@ end
 # sync a directory to guarantee it's on disk. have to recurse to the root
 # to guarantee sync for newly created directories.
 def fdirsync(d)
-  while d != "/"
+  while d != "/" && d != "."
     fsync(d)
     d = File.dirname(d)
   end
@@ -139,7 +140,7 @@ end
 class Replicator
   def initialize(config)
     @config = YAML.safe_load(File.read(config))
-    @state = YAML.safe_load(File.read(@config["state_file"]), [Time])
+    @state = YAML.safe_load(File.read(@config["state_file"]), :permitted_classes => [Time], :fallback => {})
     @conn = PG::Connection.connect(@config["db"])
     # get current time from the database rather than the current system
     @now = @conn.exec("select now() as now").map { |row| Time.parse(row["now"]) }[0]
@@ -153,7 +154,7 @@ class Replicator
     # for us to look at anything that was closed recently, and filter from
     # there.
     changesets = @conn
-                 .exec("select id, created_at, closed_at, num_changes from changesets where closed_at > ((now() at time zone 'utc') - '1 hour'::interval)")
+                 .exec("select id, (created_at at time zone 'utc') as created_at, (closed_at at time zone 'utc') as closed_at, num_changes from changesets where (closed_at at time zone 'utc') > ((now() at time zone 'utc') - '1 hour'::interval)")
                  .map { |row| Changeset.new(row) }
                  .select { |cs| cs.activity_between?(last_run, @now) }
 
@@ -162,13 +163,13 @@ class Replicator
 
     # but also add any changesets which have new comments
     new_ids = @conn
-              .exec("select distinct changeset_id from changeset_comments where created_at >= '#{last_run}' and created_at < '#{@now}' and visible")
+              .exec("select distinct changeset_id from changeset_comments where (created_at at time zone 'utc') >= '#{last_run}' and (created_at at time zone 'utc') < '#{@now}' and visible")
               .map { |row| row["changeset_id"].to_i }
               .reject { |c_id| cs_ids.include?(c_id) }
 
     new_ids.each do |id|
       @conn
-        .exec("select id, created_at, closed_at, num_changes from changesets where id=#{id}")
+        .exec("select id, (created_at at time zone 'utc') as created_at, (closed_at at time zone 'utc') as closed_at, num_changes from changesets where id=#{id}")
         .map { |row| Changeset.new(row) }
         .each { |cs| changesets << cs }
     end
index 5ef0b5885f2d90476fc75103ed86572ae2d32d97..d9a328192eb6d86b24a596a0a6a704ed2715c406 100644 (file)
@@ -27,6 +27,7 @@ property :image, String, :required => true
 property :ports, Hash, :default => {}
 property :environment, Hash, :default => {}
 property :volume, Hash, :default => {}
+property :command, String, :default => ""
 
 action :create do
   systemd_service new_resource.service do
@@ -35,7 +36,11 @@ action :create do
     notify_access "all"
     environment "PODMAN_SYSTEMD_UNIT" => "%n"
     exec_start_pre "/bin/rm --force %t/%n.ctr-id"
-    exec_start "/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --userns=auto --label=io.containers.autoupdate=registry --pids-limit=-1 #{publish_options} #{environment_options} #{volume_options} --rm --sdnotify=conmon --detach --replace --name=%N #{new_resource.image}"
+    exec_start "/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon "\
+               "--userns=auto --label=io.containers.autoupdate=registry "\
+               "--pids-limit=-1 #{publish_options} #{environment_options} "\
+               "#{volume_options} --rm --sdnotify=conmon --detach --replace "\
+               "--name=%N #{new_resource.image} #{new_resource.command}"
     exec_stop "/usr/bin/podman stop --ignore --time=10 --cidfile=%t/%n.ctr-id"
     exec_stop_post "/usr/bin/podman rm --force --ignore --cidfile=%t/%n.ctr-id"
     timeout_start_sec 180
index 27b0c6dd66f5b1cc191af7ad4996926ff47d1bc1..c626eb37cf91e04cf4b6061181d2c101c7ca7097 100644 (file)
@@ -39,6 +39,7 @@ end
 
 prometheus_exporter "smokeping" do
   port 9374
+  environment "GOMAXPROCS" => "1"
   options "--config.file=/etc/prometheus/exporters/smokeping.yml"
   capability_bounding_set "CAP_NET_RAW"
   ambient_capabilities "CAP_NET_RAW"
index 080d119241af8a96647d670f2971d5900d73053a..e4a6da00fe0867304cf5700a3389689aa0218d6d 100644 (file)
@@ -163,7 +163,7 @@ node[:taginfo][:sites].each do |site|
     settings["opensearch"]["contact"] = "webmaster@openstreetmap.org"
     settings["paths"]["bin_dir"] = "#{directory}/build/src"
     settings["sources"]["download"] = ""
-    settings["sources"]["create"] = "db languages projects wiki wikidata chronology"
+    settings["sources"]["create"] = "db languages projects wiki wikidata chronology sw"
     settings["sources"]["db"]["planetfile"] = "/var/lib/planet/planet.osh.pbf"
     settings["sources"]["chronology"]["osm_history_file"] = "/var/lib/planet/planet.osh.pbf"
     settings["tagstats"]["geodistribution"] = "DenseMmapArray"
index 48b60f3c80bb1add7c8b89938a528c533f103813..a8a78044c18fa72e3375f3a0bb4c35b8aac04012 100644 (file)
@@ -250,7 +250,7 @@ template "/usr/local/bin/vector-update" do
   owner "root"
   group "root"
   mode "755"
-  variables :tilekiln_bin => "#{tilekiln_directory}/bin/tilekiln", :source_database => "spirit", :config_path => "#{shortbread_config}", :diff_size => "1000", :tiles_file => "/srv/vector.openstreetmap.org/data/tiles.txt", :post_processing => "/usr/local/bin/tiles-rerender"
+  variables :tilekiln_bin => "#{tilekiln_directory}/bin/tilekiln", :source_database => "spirit", :config_path => "#{shortbread_config}", :diff_size => "1000", :expiry_dir => "/srv/vector.openstreetmap.org/data/", :post_processing => "/usr/local/bin/tiles-rerender"
 end
 
 template "/usr/local/bin/tiles-rerender" do
@@ -258,7 +258,7 @@ template "/usr/local/bin/tiles-rerender" do
   owner "root"
   group "root"
   mode "755"
-  variables :tilekiln_bin => "#{tilekiln_directory}/bin/tilekiln", :source_database => "spirit", :storage_database => "tiles", :config_path => "#{shortbread_config}", :tiles_file => "/srv/vector.openstreetmap.org/data/tiles.txt", :update_threads => 4
+  variables :tilekiln_bin => "#{tilekiln_directory}/bin/tilekiln", :source_database => "spirit", :storage_database => "tiles", :config_path => "#{shortbread_config}", :expiry_dir => "/srv/vector.openstreetmap.org/data/", :update_threads => 4
 end
 
 systemd_service "replicate" do
index bffa34a3a5df0df40e545221fc78326196987e2b..3d6110181d18589ade657116f6c5752e8bf34901 100644 (file)
@@ -7,7 +7,7 @@
 
 set -e
 
-export LUA_PATH='/srv/vector.openstreetmap.org/osm2pgsql-themepark/lua/?.lua;/srv/vector.openstreetmap.org/spirit/?.lua;;'
+export LUA_PATH='/srv/vector.openstreetmap.org/osm2pgsql-themepark/lua/?.lua;;'
 
 # Import the osm2pgsql file specified as an argument, using the locations for spirit
 osm2pgsql \
index f46b6f1f616a7ae8029a3a61ead1234ea7abb481..6c01b27f6f4a7fec493fd2704e09ffc2b5bb3456 100644 (file)
@@ -1,7 +1,11 @@
 #!/bin/sh
 set -eu
-<%= @tilekiln_bin %> generate tiles \
+
+cd "<%= @expiry_dir %>"
+
+wc -l z*.txt
+cat z*.txt | <%= @tilekiln_bin %> generate tiles \
 --source-dbname "<%= @source_database %>" \
 --storage-dbname "<%= @storage_database %>" \
 --num-threads "<%= node[:vectortile][:replication][:threads] %>" \
---config <%= @config_path %> < <%= @tiles_file %>
+--config <%= @config_path %>
index cd718789ca58b3aeecb93df11b54415f5c665abb..844d9d4faa0f64fa264cf79fea97da6473d61806 100644 (file)
@@ -1,12 +1,13 @@
 #!/bin/sh
 
 # Usage
-# sudo -u tilekiln vector-update
+# sudo -u tileupdate vector-update
 
 set -eu
 
-export LUA_PATH='/srv/vector.openstreetmap.org/osm2pgsql-themepark/lua/?.lua;/srv/vector.openstreetmap.org/spirit/?.lua;;'
+export LUA_PATH='/srv/vector.openstreetmap.org/osm2pgsql-themepark/lua/?.lua;;'
 
+cd "<%= @expiry_dir %>"
 osm2pgsql-replication update \
   -d "<%= @source_database %>" \
   --max-diff-size "<%= @diff_size %>"
index e59923b27ed00a20d069b28302443c679bac5dd6..ba708c9b836690dbdcdd74ff551742c4dff2715d 100644 (file)
@@ -5,11 +5,10 @@
 
 set -eu
 
-export LUA_PATH='/srv/vector.openstreetmap.org/osm2pgsql-themepark/lua/?.lua;/srv/vector.openstreetmap.org/spirit/?.lua;;'
+export LUA_PATH='/srv/vector.openstreetmap.org/osm2pgsql-themepark/lua/?.lua;;'
 
+cd "<%= @expiry_dir %>"
 osm2pgsql-replication update \
   -d "<%= @source_database %>" \
   --max-diff-size "<%= @diff_size %>" \
-  --post-processing "<%= @post_processing %>" \
-  -- --expire-tiles=10-14 \
-  --expire-output="<%= @tiles_file %>"
+  --post-processing "<%= @post_processing %>"
index e7a2b3e57b5ea6067bd41b3347baae9d695e89c1..74e96d2cce223a2a3ed5e02986bc2eb69d257e11 100644 (file)
@@ -28,9 +28,7 @@ apache_site "default" do
 end
 
 mediawiki_site "wiki.openstreetmap.org" do
-  aliases ["wiki.osm.org", "wiki.openstreetmap.com", "wiki.openstreetmap.net",
-           "wiki.openstreetmap.ca", "wiki.openstreetmap.eu",
-           "wiki.openstreetmap.pro", "wiki.openstreetmaps.org",
+  aliases ["wiki.osm.org", "wiki.openstreetmap.com", "wiki.openstreetmaps.org",
            "osm.wiki", "www.osm.wiki", "wiki.osm.wiki"]
 
   fpm_max_children 200
@@ -153,6 +151,7 @@ systemd_service "wiki-dump" do
   exec_start "/usr/bin/php w/maintenance/dumpBackup.php --full --quiet --output=gzip:dump/dump.xml.gz"
   working_directory "/srv/wiki.openstreetmap.org"
   user "wiki"
+  nice 19
   sandbox :enable_network => true
   memory_deny_write_execute false
   restrict_address_families "AF_UNIX"
@@ -161,7 +160,7 @@ end
 
 systemd_timer "wiki-dump" do
   description "Wiki dump"
-  on_calendar "02:00"
+  on_calendar "Sun 02:30"
 end
 
 service "wiki-dump.timer" do
diff --git a/roles/aarnet.rb b/roles/aarnet.rb
deleted file mode 100644 (file)
index 8cab0ea..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-name "aarnet"
-description "Role applied to all servers at AARNet"
-
-default_attributes(
-  :accounts => {
-    :users => {
-      :chm => { :status => :administrator },
-      :bclifford => { :status => :administrator }
-    }
-  },
-  :hosted_by => "AARNet",
-  :location => "Carlton, Victoria, Australia",
-  :timezone => "Australia/Melbourne"
-)
-
-override_attributes(
-  :networking => {
-    :nameservers => ["202.158.207.1", "202.158.207.2"]
-  },
-  :ntp => {
-    :servers => ["0.au.pool.ntp.org", "1.au.pool.ntp.org", "oceania.pool.ntp.org"]
-  }
-)
-
-run_list(
-  "role[au]"
-)
diff --git a/roles/balerion.rb b/roles/balerion.rb
deleted file mode 100644 (file)
index 4aef19a..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-name "balerion"
-description "Master role applied to balerion"
-
-default_attributes(
-  :networking => {
-    :interfaces => {
-      :external => {
-        :interface => "bond0",
-        :role => :external,
-        :inet => {
-          :address => "138.44.68.134",
-          :prefix => "30",
-          :gateway => "138.44.68.133"
-        },
-        :bond => {
-          :slaves => %w[ens14f0np0 ens14f1np1]
-        }
-      }
-    }
-  },
-  :postgresql => {
-    :settings => {
-      :defaults => {
-        :effective_cache_size => "16GB"
-      }
-    }
-  },
-  :sysctl => {
-    :postgres => {
-      :comment => "Increase shared memory for postgres",
-      :parameters => {
-        "kernel.shmmax" => 9 * 1024 * 1024 * 1024,
-        "kernel.shmall" => 9 * 1024 * 1024 * 1024 / 4096
-      }
-    }
-  },
-  :tile => {
-    :database => {
-      :cluster => "16/main",
-      :postgis => "3"
-    },
-    :mapnik => "3.1",
-    :replication => {
-      :directory => "/store/replication"
-    },
-    :styles => {
-      :default => {
-        :tile_directories => [
-          { :name => "/store/tiles/default", :min_zoom => 0, :max_zoom => 19 }
-        ]
-      }
-    }
-  }
-)
-
-run_list(
-  "role[aarnet]",
-  "role[geodns]",
-  "role[tile]"
-)
diff --git a/roles/bowser.rb b/roles/bowser.rb
deleted file mode 100644 (file)
index eca0fa2..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-name "bowser"
-description "Master role applied to bowser"
-
-default_attributes(
-  :networking => {
-    :interfaces => {
-      :external => {
-        :interface => "bond0",
-        :role => :external,
-        :inet => {
-          :address => "138.44.68.106",
-          :prefix => "30",
-          :gateway => "138.44.68.105"
-        },
-        :bond => {
-          :slaves => %w[ens14f0np0 ens14f1np1]
-        }
-      }
-    }
-  },
-  :postgresql => {
-    :settings => {
-      :defaults => {
-        :effective_cache_size => "16GB"
-      }
-    }
-  },
-  :sysctl => {
-    :postgres => {
-      :comment => "Increase shared memory for postgres",
-      :parameters => {
-        "kernel.shmmax" => 9 * 1024 * 1024 * 1024,
-        "kernel.shmall" => 9 * 1024 * 1024 * 1024 / 4096
-      }
-    }
-  },
-  :tile => {
-    :database => {
-      :cluster => "16/main",
-      :postgis => "3"
-    },
-    :mapnik => "3.1",
-    :replication => {
-      :directory => "/store/replication"
-    },
-    :styles => {
-      :default => {
-        :tile_directories => [
-          { :name => "/store/tiles/default", :min_zoom => 0, :max_zoom => 19 }
-        ]
-      }
-    }
-  }
-)
-
-run_list(
-  "role[aarnet]",
-  "role[tile]"
-)
index 6561d30193bec5aa45adad36296b8234de8e223e..9652c2c8c19485bc2f13b304f2da5204706cb99a 100644 (file)
@@ -24,6 +24,13 @@ default_attributes(
       },
       :external => {
         :zone => "dub",
+        :inet => {
+          :rules => [
+            { :to => "10.0.0.0/8", :table => "main", :priority => 50 },
+            { :to => "172.16.0.0/12", :table => "main", :priority => 50 },
+            { :to => "192.168.0.0/16", :table => "main", :priority => 50 }
+          ]
+        },
         :inet6 => {
           :rules => [
             { :to => "2600:9000::/28", :table => 150, :priority => 100 }
index bb6b7b667e4a9928015d9e545e8b07a6fd1288f7..7ca7094bc505779dd581478f7edfd388a8a83c73 100644 (file)
@@ -7,6 +7,7 @@ default_attributes(
     :last_address => "10.0.79.254"
   },
   :exim => {
+    :external_interface => "<;${if <{${randint:100}}{75} {184.104.226.98;2001:470:1:b3b::2}{87.252.214.98;2001:4d78:fe03:1c::2}}",
     :routes => {
       :openstreetmap => {
         :comment => "openstreetmap.org",
index d212b66807c3cdfa0e8d970a3209bc035ec4f982..5bb605112f523604d056d298c299781ccb79fe7a 100644 (file)
@@ -38,7 +38,7 @@ default_attributes(
         :metric => 150,
         :source_route_table => 150,
         :inet => {
-          :address => "87.252.214.101",
+          :address => "87.252.214.104",
           :prefix => "27",
           :gateway => "87.252.214.97"
         },
diff --git a/roles/ovh.rb b/roles/ovh.rb
deleted file mode 100644 (file)
index f8391a2..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-name "ovh"
-description "Role applied to all servers at OVH"
-
-default_attributes(
-  :hosted_by => "OVH",
-  :location => "Roubaix, France"
-)
-
-override_attributes(
-  :networking => {
-    :nameservers => ["213.186.33.99"]
-  },
-  :ntp => {
-    :servers => ["0.fr.pool.ntp.org", "1.fr.pool.ntp.org", "europe.pool.ntp.org"]
-  }
-)
-
-run_list(
-  "role[fr]"
-)
diff --git a/roles/scorch.rb b/roles/scorch.rb
deleted file mode 100644 (file)
index 0649374..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-name "scorch"
-description "Master role applied to scorch"
-
-default_attributes(
-  :devices => {
-    :ssd_system => {
-      :comment => "Tune scheduler for system disk",
-      :type => "block",
-      :bus => "scsi",
-      :serial => "3600605b009bbf5601fc3206407a43546",
-      :attrs => {
-        "queue/scheduler" => "noop",
-        "queue/nr_requests" => "256",
-        "queue/read_ahead_kb" => "2048"
-      }
-    }
-  },
-  :networking => {
-    :interfaces => {
-      :external => {
-        :interface => "eth0",
-        :role => :external,
-        :inet => {
-          :address => "176.31.235.79",
-          :prefix => "24",
-          :gateway => "176.31.235.254"
-        },
-        :inet6 => {
-          :address => "2001:41d0:2:fc4f::1",
-          :prefix => "64",
-          :gateway => "2001:41d0:2:fcff:ff:ff:ff:ff"
-        }
-      }
-    }
-  }
-)
-
-run_list(
-  "role[ovh]"
-)
index 0c83be4c5ed6e4f16c7093e339e46fa66e91c3a7..19a31e3dbf55ad583b6f832405fe0ef42870636d 100644 (file)
@@ -17,7 +17,7 @@ default_attributes(
       :max_connections_per_child => 10000
     },
     :evasive => {
-      :page_count => 250,
+      :page_count => 400,
       :site_count => 500
     }
   },