From: Tom Hughes Date: Sun, 12 Feb 2023 19:01:02 +0000 (+0000) Subject: Merge remote-tracking branch 'github/pull/573' X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/a92d5e4c564dbef801efbe791c2e6200f8c5967e?hp=80d6d380c0a01ed6e5f8f06225c2d3e3eb14f172 Merge remote-tracking branch 'github/pull/573' --- diff --git a/.github/workflows/test-kitchen.yml b/.github/workflows/test-kitchen.yml index ca58e547e..2469ab522 100644 --- a/.github/workflows/test-kitchen.yml +++ b/.github/workflows/test-kitchen.yml @@ -97,8 +97,7 @@ jobs: - spamassassin - ssl - stateofthemap - - stateofthemap-jekyll - - stateofthemap-static + - stateofthemap-container - stateofthemap-wordpress - subversion - supybot diff --git a/.kitchen.yml b/.kitchen.yml index 2e7ae9638..c867618c0 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -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 index 21e566806..000000000 --- a/cookbooks/irc/files/default/html/index.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - irc.openstreetmap.org - - - -

irc.openstreetmap.org

-
-
- - - - - - - - - - - - - -
Nickname
Channel - -
-
-
- - diff --git a/cookbooks/irc/files/default/html/style.css b/cookbooks/irc/files/default/html/style.css deleted file mode 100644 index 3a8dc0250..000000000 --- a/cookbooks/irc/files/default/html/style.css +++ /dev/null @@ -1,11 +0,0 @@ -h1 { - text-align: center; -} - -div { - display: flex; -} - -form { - margin: auto; -} diff --git a/cookbooks/irc/metadata.rb b/cookbooks/irc/metadata.rb index 6e745f6e6..755e6f9c7 100644 --- a/cookbooks/irc/metadata.rb +++ b/cookbooks/irc/metadata.rb @@ -7,3 +7,4 @@ description "Configures irc.openstreetmap.org" version "1.0.0" supports "ubuntu" depends "apache" +depends "podman" diff --git a/cookbooks/irc/recipes/default.rb b/cookbooks/irc/recipes/default.rb index 7fbc7ff74..ef6332dce 100644 --- a/cookbooks/irc/recipes/default.rb +++ b/cookbooks/irc/recipes/default.rb @@ -18,30 +18,24 @@ # 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 diff --git a/cookbooks/irc/templates/default/apache.erb b/cookbooks/irc/templates/default/apache.erb index ceb112e18..55dc39c18 100644 --- a/cookbooks/irc/templates/default/apache.erb +++ b/cookbooks/irc/templates/default/apache.erb @@ -1,17 +1,17 @@ # DO NOT EDIT - This file is being maintained by Chef - + 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 %>/ <% unless @aliases.empty? -%> @@ -22,31 +22,31 @@ <% 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 %>/ <% end -%> - + 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 %>/ - + 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" -> - Require all granted - + ProxyPass / http://localhost:<%= @docker_external_port %>/ + ProxyPreserveHost on + diff --git a/cookbooks/mediawiki/templates/default/LocalSettings.php.erb b/cookbooks/mediawiki/templates/default/LocalSettings.php.erb index 7e80f1c48..9070c0ee8 100644 --- a/cookbooks/mediawiki/templates/default/LocalSettings.php.erb +++ b/cookbooks/mediawiki/templates/default/LocalSettings.php.erb @@ -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]) -%> diff --git a/cookbooks/stateofthemap/recipes/jekyll.rb b/cookbooks/stateofthemap/recipes/container.rb similarity index 88% rename from cookbooks/stateofthemap/recipes/jekyll.rb rename to cookbooks/stateofthemap/recipes/container.rb index c4e008016..b5a7640ac 100644 --- a/cookbooks/stateofthemap/recipes/jekyll.rb +++ b/cookbooks/stateofthemap/recipes/container.rb @@ -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 index 2ed436158..000000000 --- a/cookbooks/stateofthemap/recipes/static.rb +++ /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.jekyll.erb b/cookbooks/stateofthemap/templates/default/apache.container.erb similarity index 100% rename from cookbooks/stateofthemap/templates/default/apache.jekyll.erb rename to cookbooks/stateofthemap/templates/default/apache.container.erb diff --git a/cookbooks/stateofthemap/templates/default/apache.static.erb b/cookbooks/stateofthemap/templates/default/apache.static.erb deleted file mode 100644 index 07ec18cbe..000000000 --- a/cookbooks/stateofthemap/templates/default/apache.static.erb +++ /dev/null @@ -1,51 +0,0 @@ -# DO NOT EDIT - This file is being maintained by Chef - - - 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/ - - - - 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/ - - - - 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" - - -.stateofthemap.org> - Require all granted - diff --git a/cookbooks/trac/files/default/htdocs/osm.ico b/cookbooks/trac/files/default/htdocs/osm.ico deleted file mode 100644 index 4448dd6f6..000000000 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 index abce19d16..000000000 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 index eabb60cc6..000000000 --- a/cookbooks/trac/files/default/htdocs/robots.txt +++ /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 index 6360c4a72..000000000 --- a/cookbooks/trac/files/default/templates/site.html +++ /dev/null @@ -1,47 +0,0 @@ - - -
- -

Before opening a new ticket, please:

-
    -
  1. 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: -
      -
    • Raise JOSM issues here.
    • -
    • Raise JXAPI issues here.
    • -
    -
  2. -
  3. View the list of tickets to make sure that your bug hasn't already been reported. You should also try searching.
  4. -
  5. Enter your bug descriptively. Be sure you set the 'component' field (e.g. "website" or "potlatch (Flash editor)") so that it goes to the right person
  6. -
-

You can also use this to request enhancements.

-

How to be a helpful bug reporter

-

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.

-
    -
  1. Give any pertinent details of your system (operating system and version, browser and version, etc.).
  2. -
  3. 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 OpenStreetMap).
  4. -
  5. Explain what you are doing, click-by-click.
  6. -
  7. Explain what you expect to happen.
  8. -
  9. Explain what is happening instead.
  10. -
- -
- ${select('*')} -
- - diff --git a/roles/naga.rb b/roles/naga.rb index d9c9ae464..3e01e2768 100644 --- a/roles/naga.rb +++ b/roles/naga.rb @@ -42,5 +42,5 @@ run_list( "role[munin]", "recipe[foundation::owg]", "recipe[foundation::welcome]", - "recipe[stateofthemap::jekyll]" + "recipe[stateofthemap::container]" ) diff --git a/roles/stateofthemap.rb b/roles/stateofthemap.rb index 6e1d9ab1b..512a038b4 100644 --- a/roles/stateofthemap.rb +++ b/roles/stateofthemap.rb @@ -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-jekyll/serverspec/apache_spec.rb b/test/integration/stateofthemap-container/serverspec/apache_spec.rb similarity index 100% rename from test/integration/stateofthemap-jekyll/serverspec/apache_spec.rb rename to test/integration/stateofthemap-container/serverspec/apache_spec.rb diff --git a/test/integration/stateofthemap-static/serverspec/apache_spec.rb b/test/integration/stateofthemap-static/serverspec/apache_spec.rb deleted file mode 100644 index 446d3b915..000000000 --- a/test/integration/stateofthemap-static/serverspec/apache_spec.rb +++ /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