From: Tom Hughes Date: Sat, 19 Aug 2023 10:17:01 +0000 (+0100) Subject: Drop donate cookbook and role X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/8b8cae6b975ac21863d59389c27bcbb7b660f70e Drop donate cookbook and role --- diff --git a/.github/workflows/test-kitchen.yml b/.github/workflows/test-kitchen.yml index 63b741695..33af67104 100644 --- a/.github/workflows/test-kitchen.yml +++ b/.github/workflows/test-kitchen.yml @@ -34,7 +34,6 @@ jobs: - dmca - dns - docker - - donate - elasticsearch - exim - fail2ban diff --git a/.kitchen.yml b/.kitchen.yml index 6d37be49f..dd9466903 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -138,9 +138,6 @@ suites: - name: docker run_list: - recipe[docker::default] - - name: donate - run_list: - - recipe[donate::default] - name: elasticsearch run_list: - recipe[elasticsearch::default] diff --git a/cookbooks/backup/templates/default/expire.cron.erb b/cookbooks/backup/templates/default/expire.cron.erb index bcdc6aaa2..c43c6f917 100644 --- a/cookbooks/backup/templates/default/expire.cron.erb +++ b/cookbooks/backup/templates/default/expire.cron.erb @@ -2,7 +2,7 @@ # DO NOT EDIT - This file is being maintained by Chef -for prefix in blogs chef-server chef-repository chef-git community forum git lists munin osm-blog osm-donate osmf-crm osmf-ledgersmb wiki-wiki.osmfoundation.org osqa otrs prometheus sotm svn switch2osm trac wiki-board.osmfoundation.org wiki-dwg.osmfoundation.org wiki-mwg.osmfoundation.org wiki-wiki.openstreetmap.org +for prefix in blogs chef-server chef-repository chef-git community forum git lists munin osm-blog osmf-crm osmf-ledgersmb wiki-wiki.osmfoundation.org osqa otrs prometheus sotm svn switch2osm trac wiki-board.osmfoundation.org wiki-dwg.osmfoundation.org wiki-mwg.osmfoundation.org wiki-wiki.openstreetmap.org do /usr/local/bin/expire-backups --days=3 --weeks=3 --months=3 /store/backup $prefix done diff --git a/cookbooks/donate/README.md b/cookbooks/donate/README.md deleted file mode 100644 index fbe8e605b..000000000 --- a/cookbooks/donate/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Donate Cookbook - -This cookbook installs the donate.openstreetmap.org site diff --git a/cookbooks/donate/attributes/default.rb b/cookbooks/donate/attributes/default.rb deleted file mode 100644 index c6c3785d6..000000000 --- a/cookbooks/donate/attributes/default.rb +++ /dev/null @@ -1,2 +0,0 @@ -# Enable the "donate" role -default[:accounts][:users][:donate][:status] = :role diff --git a/cookbooks/donate/metadata.rb b/cookbooks/donate/metadata.rb deleted file mode 100644 index b5a2967ff..000000000 --- a/cookbooks/donate/metadata.rb +++ /dev/null @@ -1,14 +0,0 @@ -name "donate" -maintainer "OpenStreetMap Administrators" -maintainer_email "admins@openstreetmap.org" -license "Apache-2.0" -description "Installs and configures Donate Site" - -version "1.0.0" -supports "ubuntu" -depends "accounts" -depends "apache" -depends "git" -depends "mysql" -depends "php" -depends "systemd" diff --git a/cookbooks/donate/recipes/default.rb b/cookbooks/donate/recipes/default.rb deleted file mode 100644 index 49e46d78f..000000000 --- a/cookbooks/donate/recipes/default.rb +++ /dev/null @@ -1,50 +0,0 @@ -# -# Cookbook:: donate -# Recipe:: default -# -# Copyright:: 2016, 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 "accounts" -include_recipe "apache" -include_recipe "php::fpm" - -apache_module "headers" - -ssl_certificate "donate.openstreetmap.org" do - domains ["donate.openstreetmap.org", "donate.openstreetmap.com", - "donate.openstreetmap.net", "donate.osm.org"] - notifies :reload, "service[apache2]" -end - -php_fpm "donate.openstreetmap.org" do - action :delete -end - -apache_site "donate.openstreetmap.org" do - template "apache.erb" -end - -service "osmf-donate.timer" do - action [:stop, :disable] -end - -systemd_service "osmf-donate" do - action :delete -end - -file "/etc/cron.daily/osmf-donate-backup" do - action :delete -end diff --git a/cookbooks/donate/templates/default/apache.erb b/cookbooks/donate/templates/default/apache.erb deleted file mode 100644 index 8cb886e91..000000000 --- a/cookbooks/donate/templates/default/apache.erb +++ /dev/null @@ -1,30 +0,0 @@ -# DO NOT EDIT - This file is being maintained by Chef - -<% [80, 443].each do |port| -%> -> - - ServerName donate.openstreetmap.org - ServerAlias donate.openstreetmap.com - ServerAlias donate.openstreetmap.net - ServerAlias donate.osm.org - - ServerAdmin webmaster@openstreetmap.org - -<% if port == 80 -%> - RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/ - RedirectPermanent / https://supporting.openstreetmap.org/ -<% end -%> -<% if port == 443 -%> - SSLEngine on - SSLCertificateFile /etc/ssl/certs/donate.openstreetmap.org.pem - SSLCertificateKeyFile /etc/ssl/private/donate.openstreetmap.org.key - - RedirectMatch . https://supporting.openstreetmap.org/ - <% end -%> - - CustomLog /var/log/apache2/donate.openstreetmap.org-access.log combined - ErrorLog /var/log/apache2/donate.openstreetmap.org-error.log - - - -<% end -%> diff --git a/roles/donate.rb b/roles/donate.rb deleted file mode 100644 index a40547878..000000000 --- a/roles/donate.rb +++ /dev/null @@ -1,6 +0,0 @@ -name "donate" -description "Role applied to all donate servers" - -run_list( - "recipe[donate]" -) diff --git a/test/data_bags/accounts/donate.json b/test/data_bags/accounts/donate.json deleted file mode 100644 index a0fdfcc02..000000000 --- a/test/data_bags/accounts/donate.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "id": "donate", - "uid": "524", - "comment": "OSMF Donations" -} diff --git a/test/integration/donate/inspec/apache_spec.rb b/test/integration/donate/inspec/apache_spec.rb deleted file mode 100644 index 8006330b4..000000000 --- a/test/integration/donate/inspec/apache_spec.rb +++ /dev/null @@ -1,18 +0,0 @@ -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 } - its("protocols") { should cmp "tcp" } -end - -describe port(443) do - it { should be_listening } - its("protocols") { should cmp "tcp" } -end