]> git.openstreetmap.org Git - chef.git/commitdiff
Merge remote-tracking branch 'github/pull/573'
authorTom Hughes <tom@compton.nu>
Sun, 12 Feb 2023 19:01:02 +0000 (19:01 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 12 Feb 2023 19:01:02 +0000 (19:01 +0000)
20 files changed:
.github/workflows/test-kitchen.yml
.kitchen.yml
cookbooks/irc/files/default/html/index.html [deleted file]
cookbooks/irc/files/default/html/style.css [deleted file]
cookbooks/irc/metadata.rb
cookbooks/irc/recipes/default.rb
cookbooks/irc/templates/default/apache.erb
cookbooks/mediawiki/templates/default/LocalSettings.php.erb
cookbooks/stateofthemap/recipes/container.rb [moved from cookbooks/stateofthemap/recipes/jekyll.rb with 88% similarity]
cookbooks/stateofthemap/recipes/static.rb [deleted file]
cookbooks/stateofthemap/templates/default/apache.container.erb [moved from cookbooks/stateofthemap/templates/default/apache.jekyll.erb with 100% similarity]
cookbooks/stateofthemap/templates/default/apache.static.erb [deleted file]
cookbooks/trac/files/default/htdocs/osm.ico [deleted file]
cookbooks/trac/files/default/htdocs/osm.png [deleted file]
cookbooks/trac/files/default/htdocs/robots.txt [deleted file]
cookbooks/trac/files/default/templates/site.html [deleted file]
roles/naga.rb
roles/stateofthemap.rb
test/integration/stateofthemap-container/serverspec/apache_spec.rb [moved from test/integration/stateofthemap-jekyll/serverspec/apache_spec.rb with 100% similarity]
test/integration/stateofthemap-static/serverspec/apache_spec.rb [deleted file]

index ca58e547e79f9118c3a82af7208e90ba9c464ef9..2469ab522bc67dadbf4cca6e9604e29e39610bab 100644 (file)
@@ -97,8 +97,7 @@ jobs:
           - spamassassin
           - ssl
           - stateofthemap
-          - stateofthemap-jekyll
-          - stateofthemap-static
+          - stateofthemap-container
           - stateofthemap-wordpress
           - subversion
           - supybot
index 2e7ae9638c9bc743ef105d038f23fb1c2fe1675f..c867618c0e6f93fe18e45dc4ae257e70c18416c1 100644 (file)
@@ -340,12 +340,9 @@ suites:
   - name: stateofthemap
     run_list:
       - recipe[stateofthemap::default]
-  - name: stateofthemap-static
+  - name: stateofthemap-container
     run_list:
-      - recipe[stateofthemap::static]
-  - name: stateofthemap-jekyll
-    run_list:
-      - recipe[stateofthemap::jekyll]
+      - recipe[stateofthemap::container]
   - name: stateofthemap-wordpress
     run_list:
       - recipe[stateofthemap::wordpress]
diff --git a/cookbooks/irc/files/default/html/index.html b/cookbooks/irc/files/default/html/index.html
deleted file mode 100644 (file)
index 21e5668..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <title>irc.openstreetmap.org</title>
-    <link rel="stylesheet" href="style.css" />
-  </head>
-  <body>
-    <h1>irc.openstreetmap.org</h1>
-    <div>
-      <form method="get" action="https://webchat.oftc.net/">
-        <table>
-          <tr>
-            <th>Nickname</th>
-            <td><input name="nick" type="text" /></td>
-          </tr>
-          <tr>
-            <th>Channel</th>
-            <td>
-              <select name="channels">
-                <option value="#osm">#osm</option>
-                <option value="#osm-dev">#osm-dev</option>
-                <option value="#osm-ewg">#osm-ewg</option>
-                <option value="#osm-cwg">#osm-cwg</option>
-                <option value="#osm-ar">#osm-ar</option>
-                <option value="#osm-asia">#osm-asia</option>
-                <option value="#osm-au">#osm-au</option>
-                <option value="#osm-br">#osm-br</option>
-                <option value="#osm-bw">#osm-bw</option>
-                <option value="#osm-by">#osm-by</option>
-                <option value="#osm-ca">#osm-ca</option>
-                <option value="#osm-ch">#osm-ch</option>
-                <option value="#osm-cz">#osm-cz</option>
-                <option value="#osm-de">#osm-de</option>
-                <option value="#osm-dk">#osm-dk</option>
-                <option value="#osm-es">#osm-es</option>
-                <option value="#osm-fi">#osm-fi</option>
-                <option value="#osm-fr">#osm-fr</option>
-                <option value="#osm-gb">#osm-gb</option>
-                <option value="#osm-gr">#osm-gr</option>
-                <option value="#osm-gsoc">#osm-gsoc</option>
-                <option value="#osm-ht">#osm-ht</option>
-                <option value="#osm-ie">#osm-ie</option>
-                <option value="#osm-it">#osm-it</option>
-                <option value="#osm-ke">#osm-ke</option>
-                <option value="#osm-latam">#osm-latam</option>
-                <option value="#osm-local">#osm-local</option>
-                <option value="#osm-lv">#osm-lv</option>
-                <option value="#osm-nl">#osm-nl</option>
-                <option value="#osm-no">#osm-no</option>
-                <option value="#osm-nominatim">#osm-nominatim</option>
-                <option value="#osm-pl">#osm-pl</option>
-                <option value="#osm-pt">#osm-pt</option>
-                <option value="#osm-ru">#osm-ru</option>
-                <option value="#osm.se">#osm.se</option>
-                <option value="#osm-strategic">#osm-strategic</option>
-                <option value="#osm-ua">#osm-ua</option>
-                <option value="#osm-us">#osm-us</option>
-                <option value="#osm-za">#osm-za</option>
-                <option value="#osm-zh">#osm-zh</option>
-                <option value="#osmf-gm">#osmf-gm</option>
-                <option value="#osrm">#osrm</option>
-                <option value="#openrailwaymap">#openrailwaymap</option>
-                <option value="#hot">#hot</option>
-              </select>
-            </td>
-          </tr>
-          <tr>
-            <th></th>
-            <td><input type="submit" value="Connect" /></td>
-          </tr>
-        </table>
-      </form>
-    </div>
-  </body>
-</html>
diff --git a/cookbooks/irc/files/default/html/style.css b/cookbooks/irc/files/default/html/style.css
deleted file mode 100644 (file)
index 3a8dc02..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-h1 {
-  text-align: center;
-}
-
-div {
-  display: flex;
-}
-
-form {
-  margin: auto;
-}
index 6e745f6e6c2ef9c399190f602a6eb66f3486fe61..755e6f9c750c8e01b160ccd20ff0917a8c2cc731 100644 (file)
@@ -7,3 +7,4 @@ description       "Configures irc.openstreetmap.org"
 version           "1.0.0"
 supports          "ubuntu"
 depends           "apache"
+depends           "podman"
index 7fbc7ff743d77754a8f405de5d5fa1d8b936aba8..ef6332dceeaea8c2e2b56201b3a8c42318dbc3c8 100644 (file)
 #
 
 include_recipe "apache"
+include_recipe "podman"
+
+docker_external_port = 8092
+
+podman_service "irc.openstreetmap.org" do
+  description "Container service for irc.openstreetmap.org"
+  image "ghcr.io/openstreetmap/irc:latest"
+  ports docker_external_port => "8080"
+end
 
 ssl_certificate "irc.openstreetmap.org" do
   domains ["irc.openstreetmap.org", "irc.osm.org"]
   notifies :reload, "service[apache2]"
 end
 
-directory "/srv/irc.openstreetmap.org" do
-  owner "root"
-  group "root"
-  mode "755"
-end
-
-remote_directory "/srv/irc.openstreetmap.org/html" do
-  source "html"
-  owner "root"
-  group "root"
-  mode "755"
-  files_owner "root"
-  files_group "root"
-  files_mode "644"
-end
+apache_module "proxy_http"
 
 apache_site "irc.openstreetmap.org" do
   template "apache.erb"
-  directory "/srv/irc.openstreetmap.org/html"
-  variables :aliases => ["irc.osm.org"]
+  variables :docker_external_port => docker_external_port, :aliases => ["irc.osm.org"]
 end
index ceb112e184fbbee3f9e15fa693f47c9648a28d2f..55dc39c18b1f37a6cb9448932af0b2bf18bc13ec 100644 (file)
@@ -1,17 +1,17 @@
 # DO NOT EDIT - This file is being maintained by Chef
 
-<VirtualHost *:443>
+<VirtualHost *:80>
   ServerName <%= @name %>
+<% @aliases.each do |alias_name| -%>
+  ServerAlias <%= alias_name %>
+<% end -%>
   ServerAdmin webmaster@openstreetmap.org
 
-  SSLEngine on
-  SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
-  SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
-
   CustomLog /var/log/apache2/<%= @name %>-access.log combined
   ErrorLog /var/log/apache2/<%= @name %>-error.log
 
-  DocumentRoot <%= @directory %>
+  RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
+  RedirectPermanent / https://<%= @name %>/
 </VirtualHost>
 <% unless @aliases.empty? -%>
 
 <% end -%>
   ServerAdmin webmaster@openstreetmap.org
 
+  CustomLog /var/log/apache2/<%= @name %>-access.log combined
+  ErrorLog /var/log/apache2/<%= @name %>-error.log
+
   SSLEngine on
   SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
   SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
 
-  CustomLog /var/log/apache2/<%= @name %>-access.log combined
-  ErrorLog /var/log/apache2/<%= @name %>-error.log
-
   RedirectPermanent / https://<%= @name %>/
 </VirtualHost>
 <% end -%>
 
-<VirtualHost *:80>
+<VirtualHost *:443>
   ServerName <%= @name %>
-<% @aliases.each do |alias_name| -%>
-  ServerAlias <%= alias_name %>
-<% end -%>
   ServerAdmin webmaster@openstreetmap.org
 
   CustomLog /var/log/apache2/<%= @name %>-access.log combined
   ErrorLog /var/log/apache2/<%= @name %>-error.log
 
-  RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
-  RedirectPermanent / https://<%= @name %>/
-</VirtualHost>
+  SSLEngine on
+  SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
+  SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
+
+  RequestHeader set X-Forwarded-Proto "https"
+  RequestHeader set X-Forwarded-Port "443"
 
-<Directory <%= @directory %>>
-  Require all granted
-</Directory>
+  ProxyPass / http://localhost:<%= @docker_external_port %>/
+  ProxyPreserveHost on
+</VirtualHost>
index 7e80f1c482f7b7a7c4f9bbab2d5ed6bb22a1f17c..9070c0ee8620b4a88010b2836cec58875c69dbde 100644 (file)
@@ -392,7 +392,8 @@ $wgForceUIMsgAsContentMsg = array( 'mainpage-url', 'mapfeatures-url', 'contribut
 <% end -%>
 
 <% if @name == "wiki.openstreetmap.org" -%>
-# Placeholder for the wiki.openstreetmap.org specific config
+# wiki.openstreetmap.org specific config loaded after extensions
+$wgRCWatchCategoryMembership = true;
 <% end -%>
 
 <% if not(@mediawiki[:private_accounts]) and not(@mediawiki[:private_site]) -%>
similarity index 88%
rename from cookbooks/stateofthemap/recipes/jekyll.rb
rename to cookbooks/stateofthemap/recipes/container.rb
index c4e00801656f02cc094c2971b5b74a666e5674a1..b5a7640acd8fcb112cc33e3b100e911f8f920887 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Cookbook:: stateofthemap
-# Recipe:: jekyll
+# Recipe:: container
 #
 # Copyright:: 2022, OpenStreetMap Foundation
 #
@@ -22,8 +22,8 @@ include_recipe "podman"
 
 apache_module "proxy_http"
 
-%w[2016 2017 2018 2019 2020 2021 2022].each do |year|
-  docker_external_port = 6080 + year.to_i # 8096+
+%w[2013 2016 2017 2018 2019 2020 2021 2022].each do |year|
+  docker_external_port = 6080 + year.to_i # 8093+
 
   podman_service "#{year}.stateofthemap.org" do
     description "Container service for #{year}.stateofthemap.org"
@@ -37,7 +37,7 @@ apache_module "proxy_http"
   end
 
   apache_site "#{year}.stateofthemap.org" do
-    template "apache.jekyll.erb"
+    template "apache.container.erb"
     variables :docker_external_port => docker_external_port, :aliases => ["#{year}.stateofthemap.com", "#{year}.sotm.org"]
   end
 end
diff --git a/cookbooks/stateofthemap/recipes/static.rb b/cookbooks/stateofthemap/recipes/static.rb
deleted file mode 100644 (file)
index 2ed4361..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Cookbook:: stateofthemap
-# Recipe:: static
-#
-# Copyright:: 2022, OpenStreetMap Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-include_recipe "stateofthemap"
-
-%w[2013].each do |year|
-  git "/srv/#{year}.stateofthemap.org" do
-    action :sync
-    repository "https://git.openstreetmap.org/public/stateofthemap.git"
-    revision "site-#{year}"
-    depth 1
-    user "root"
-    group "root"
-  end
-
-  ssl_certificate "#{year}.stateofthemap.org" do
-    domains ["#{year}.stateofthemap.org", "#{year}.stateofthemap.com", "#{year}.sotm.org"]
-    notifies :reload, "service[apache2]"
-  end
-
-  apache_site "#{year}.stateofthemap.org" do
-    template "apache.static.erb"
-    directory "/srv/#{year}.stateofthemap.org"
-    variables :year => year
-  end
-end
diff --git a/cookbooks/stateofthemap/templates/default/apache.static.erb b/cookbooks/stateofthemap/templates/default/apache.static.erb
deleted file mode 100644 (file)
index 07ec18c..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-# DO NOT EDIT - This file is being maintained by Chef
-
-<VirtualHost *:80>
-        ServerName <%= @year %>.stateofthemap.org
-        ServerAlias <%= @year %>.stateofthemap.com <%= @year %>.sotm.org
-        ServerAdmin webmaster@openstreetmap.org
-
-        CustomLog /var/log/apache2/<%= @year %>.stateofthemap.org-access.log combined
-        ErrorLog /var/log/apache2/<%= @year %>.stateofthemap.org-error.log
-
-        RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
-        RedirectPermanent / https://<%= @year %>.stateofthemap.org/
-</VirtualHost>
-
-<VirtualHost *:443>
-        ServerName <%= @year %>.stateofthemap.com
-        ServerAlias <%= @year %>.sotm.org
-        ServerAdmin webmaster@openstreetmap.org
-
-        CustomLog /var/log/apache2/<%= @year %>.stateofthemap.org-access.log combined
-        ErrorLog /var/log/apache2/<%= @year %>.stateofthemap.org-error.log
-
-        SSLEngine on
-        SSLCertificateFile /etc/ssl/certs/<%= @year %>.stateofthemap.org.pem
-        SSLCertificateKeyFile /etc/ssl/private/<%= @year %>.stateofthemap.org.key
-
-        RedirectPermanent / https://<%= @year %>.stateofthemap.org/
-</VirtualHost>
-
-<VirtualHost *:443>
-        ServerName <%= @year %>.stateofthemap.org
-        ServerAdmin webmaster@openstreetmap.org
-
-        CustomLog /var/log/apache2/<%= @year %>.stateofthemap.org-access.log combined
-        ErrorLog /var/log/apache2/<%= @year %>.stateofthemap.org-error.log
-
-        SSLEngine on
-        SSLCertificateFile /etc/ssl/certs/<%= @year %>.stateofthemap.org.pem
-        SSLCertificateKeyFile /etc/ssl/private/<%= @year %>.stateofthemap.org.key
-
-        DocumentRoot /srv/<%= @year %>.stateofthemap.org
-
-        ErrorDocument 404 /404.html
-
-        ExpiresActive On
-        ExpiresDefault "access plus 7 days"
-</VirtualHost>
-
-<Directory /srv/<%= @year %>.stateofthemap.org>
-        Require all granted
-</Directory>
diff --git a/cookbooks/trac/files/default/htdocs/osm.ico b/cookbooks/trac/files/default/htdocs/osm.ico
deleted file mode 100644 (file)
index 4448dd6..0000000
Binary files a/cookbooks/trac/files/default/htdocs/osm.ico and /dev/null differ
diff --git a/cookbooks/trac/files/default/htdocs/osm.png b/cookbooks/trac/files/default/htdocs/osm.png
deleted file mode 100644 (file)
index abce19d..0000000
Binary files a/cookbooks/trac/files/default/htdocs/osm.png and /dev/null differ
diff --git a/cookbooks/trac/files/default/htdocs/robots.txt b/cookbooks/trac/files/default/htdocs/robots.txt
deleted file mode 100644 (file)
index eabb60c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This trac is no more. It has ceased to be.
-User-agent: *
-Disallow: /
diff --git a/cookbooks/trac/files/default/templates/site.html b/cookbooks/trac/files/default/templates/site.html
deleted file mode 100644 (file)
index 6360c4a..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:py="http://genshi.edgewall.org/" py:strip="">
-
-  <form py:match="div[@id='content' and @class='ticket']/form" py:attrs="select('@*')">
-    <py:if test="req.environ['PATH_INFO'] == '/newticket' and (not 'preview' in req.args)">
-      <p>Before opening a new ticket, please:</p>
-      <ol>
-        <li>Check that you're in the right place. This is the bug-tracker for many OpenStreetMap related projects but not everything uses this site, so check the following list to make sure there isn't a better place to raise your issue:
-          <ul>
-            <li>Raise JOSM issues <a href="http://josm.openstreetmap.de/">here</a>.</li>
-            <li>Raise JXAPI issues <a href="https://github.com/iandees/xapi-servlet/issues">here</a>.</li>
-          </ul>
-        </li>
-        <li><a href="/report/1?sort=created&amp;asc=1">View the list of tickets</a> to make sure that your bug hasn't already been reported. You should also try <a href="/search">searching</a>.</li>
-        <li>Enter your bug descriptively. <i>Be sure you set the 'component' field (e.g. "website" or "potlatch (Flash editor)") so that it goes to the right person</i></li>
-      </ol>
-      <p>You can also use this to request enhancements.</p>
-      <h2>How to be a helpful bug reporter</h2>
-      <p>Where you can, always provide "steps to reproduce" - in other words, a series of instructions that the developers can follow to reproduce your bug. The more you can do to pinpoint the problem, the more likely it'll be fixed.</p>
-      <ol>
-        <li>Give any pertinent details of your system (operating system and version, browser and version, etc.).</li>
-        <li>If the problem is with a web page or web application, give its URL. If the problem is encountered with a particular set of data, say what (e.g. a location in <a class="wiki" href="/wiki/OpenStreetMap">OpenStreetMap</a>).</li>
-        <li>Explain what you are doing, click-by-click.</li>
-        <li>Explain what you expect to happen.</li>
-        <li>Explain what is happening instead.</li>
-      </ol>
-      <script type="text/javascript">
-        $(document).ready(function () {
-          var c = document.createElement("option");
-          $(c).attr("selected", "selected");
-          $("#field-component").prepend(c);
-
-          $("#propertyform").submit(function () {
-            if ($("#field-component").val() == "") {
-              alert("Please select a component!");
-              return false;
-            } else {
-              return true;
-            }
-          });
-        });
-      </script>
-    </py:if>
-    ${select('*')} 
-  </form>
-
-</html>
index d9c9ae464194c165e26abf1baf98b5c36c15ea02..3e01e27687385ed2049a480f60eac8533ecd8767 100644 (file)
@@ -42,5 +42,5 @@ run_list(
   "role[munin]",
   "recipe[foundation::owg]",
   "recipe[foundation::welcome]",
-  "recipe[stateofthemap::jekyll]"
+  "recipe[stateofthemap::container]"
 )
index 6e1d9ab1bb270b62a8e0e1e247001a5559832792..512a038b41dccaafadaa6211654286b20c56ee38 100644 (file)
@@ -3,6 +3,5 @@ description "Role applied to State of the Map servers"
 
 run_list(
   "recipe[stateofthemap]",
-  "recipe[stateofthemap::static]",
   "recipe[stateofthemap::wordpress]"
 )
diff --git a/test/integration/stateofthemap-static/serverspec/apache_spec.rb b/test/integration/stateofthemap-static/serverspec/apache_spec.rb
deleted file mode 100644 (file)
index 446d3b9..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-require "serverspec"
-
-# Required by serverspec
-set :backend, :exec
-
-describe package("apache2") do
-  it { should be_installed }
-end
-
-describe service("apache2") do
-  it { should be_enabled }
-  it { should be_running }
-end
-
-describe port(80) do
-  it { should be_listening.with("tcp") }
-end
-
-describe port(443) do
-  it { should be_listening.with("tcp") }
-end