- spamassassin
- ssl
- stateofthemap
- - stateofthemap-jekyll
- - stateofthemap-static
+ - stateofthemap-container
- stateofthemap-wordpress
- subversion
- supybot
- 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]
#
# Cookbook:: stateofthemap
-# Recipe:: jekyll
+# Recipe:: container
#
# Copyright:: 2022, OpenStreetMap Foundation
#
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"
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
+++ /dev/null
-#
-# 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
+++ /dev/null
-# 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>
"role[blogs]",
"role[munin]",
"recipe[foundation::welcome]",
- "recipe[stateofthemap::jekyll]"
+ "recipe[stateofthemap::container]"
)
run_list(
"recipe[stateofthemap]",
- "recipe[stateofthemap::static]",
"recipe[stateofthemap::wordpress]"
)
+++ /dev/null
-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