From 5b46398a65adc1371c81a19c280918d654ebd4ed Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 25 Aug 2016 20:16:41 +0100 Subject: [PATCH] Drop thinkup.openstreetmap.org --- .../backup/templates/default/expire.cron.erb | 2 +- cookbooks/thinkup/.foodcritic | 3 - cookbooks/thinkup/README.md | 5 - cookbooks/thinkup/metadata.rb | 9 -- cookbooks/thinkup/recipes/default.rb | 128 ------------------ .../thinkup/templates/default/apache.erb | 16 --- .../thinkup/templates/default/backup.cron.erb | 19 --- cookbooks/thinkup/templates/default/cron.erb | 1 - roles/mail.rb | 1 - roles/ridley.rb | 1 - roles/thinkup.rb | 17 --- 11 files changed, 1 insertion(+), 201 deletions(-) delete mode 100644 cookbooks/thinkup/.foodcritic delete mode 100644 cookbooks/thinkup/README.md delete mode 100644 cookbooks/thinkup/metadata.rb delete mode 100644 cookbooks/thinkup/recipes/default.rb delete mode 100644 cookbooks/thinkup/templates/default/apache.erb delete mode 100644 cookbooks/thinkup/templates/default/backup.cron.erb delete mode 100644 cookbooks/thinkup/templates/default/cron.erb delete mode 100644 roles/thinkup.rb diff --git a/cookbooks/backup/templates/default/expire.cron.erb b/cookbooks/backup/templates/default/expire.cron.erb index 38930c7c7..8b16d5c7e 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 chef-server chef-repository chef-git git lists munin osm-blog osmf-crm osmf-ledgersmb wiki-wiki.osmfoundation.org osqa otrs sotm svn switch2osm thinkup trac wiki-board.osmfoundation.org wiki-dwg.osmfoundation.org wiki-wiki.openstreetmap.org +for prefix in chef-server chef-repository chef-git git lists munin osm-blog osmf-crm osmf-ledgersmb wiki-wiki.osmfoundation.org osqa otrs sotm svn switch2osm trac wiki-board.osmfoundation.org wiki-dwg.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/thinkup/.foodcritic b/cookbooks/thinkup/.foodcritic deleted file mode 100644 index a085263c8..000000000 --- a/cookbooks/thinkup/.foodcritic +++ /dev/null @@ -1,3 +0,0 @@ -~FC001 -~FC064 -~FC065 diff --git a/cookbooks/thinkup/README.md b/cookbooks/thinkup/README.md deleted file mode 100644 index 0fc9b1f7a..000000000 --- a/cookbooks/thinkup/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# thinkup cookbook - -This cookbook installs and configures the -[thinkup.openstreetmap.org](http://thinkup.openstreetmap.org) social media -tracking website. diff --git a/cookbooks/thinkup/metadata.rb b/cookbooks/thinkup/metadata.rb deleted file mode 100644 index 580905f47..000000000 --- a/cookbooks/thinkup/metadata.rb +++ /dev/null @@ -1,9 +0,0 @@ -name "thinkup" -maintainer "OpenStreetMap Administrators" -maintainer_email "admins@openstreetmap.org" -license "Apache 2.0" -description "Installs and configures ThinkUp" -long_description IO.read(File.join(File.dirname(__FILE__), "README.md")) -version "1.0.0" -depends "apache" -depends "mysql" diff --git a/cookbooks/thinkup/recipes/default.rb b/cookbooks/thinkup/recipes/default.rb deleted file mode 100644 index ce663bee9..000000000 --- a/cookbooks/thinkup/recipes/default.rb +++ /dev/null @@ -1,128 +0,0 @@ -# -# Cookbook Name:: thinkup -# Recipe:: default -# -# Copyright 2011, 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 -# -# http://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 "apache" -include_recipe "mysql" - -passwords = data_bag_item("thinkup", "passwords") - -package "php5" -package "php5-cli" -package "php5-curl" -package "php5-mysql" -package "php5-gd" - -package "php-apc" - -apache_module "php5" - -apache_site "thinkup.openstreetmap.org" do - template "apache.erb" -end - -mysql_user "thinkup@localhost" do - password passwords["database"] -end - -mysql_database "thinkup" do - permissions "thinkup@localhost" => :all -end - -git "/srv/thinkup.openstreetmap.org" do - action :sync - repository "git://github.com/ginatrapani/ThinkUp.git" - revision "v1.2.1" - user "root" - group "root" - notifies :reload, "service[apache2]" -end - -directory "/srv/thinkup.openstreetmap.org/logs" do - owner "thinkup" - group "thinkup" - mode "0755" -end - -directory "/srv/thinkup.openstreetmap.org/logs/archive" do - owner "thinkup" - group "thinkup" - mode "0755" -end - -directory "/srv/thinkup.openstreetmap.org/webapp/data" do - owner "www-data" - group "www-data" - mode "0755" -end - -directory "/srv/thinkup.openstreetmap.org/webapp/_lib/view/compiled_view" do - owner "www-data" - group "www-data" - mode "0755" -end - -thinkup_config = edit_file "/srv/thinkup.openstreetmap.org/webapp/config.sample.inc.php" do |line| - line.gsub!(/^(\$THINKUP_CFG\['site_root_path'\] *=) '[^']*';$/, "\\1 '/';") - line.gsub!(/^(\$THINKUP_CFG\['timezone'\] *=) '[^']*';$/, "\\1 'Europe/London';") - line.gsub!(/^(\$THINKUP_CFG\['db_user'\] *=) '[^']*';$/, "\\1 'thinkup';") - line.gsub!(/^(\$THINKUP_CFG\['db_password'\] *=) '[^']*';$/, "\\1 '#{passwords['database']}';") - line.gsub!(/^(\$THINKUP_CFG\['db_name'\] *=) '[^']*';$/, "\\1 'thinkup';") - - line -end - -file "/srv/thinkup.openstreetmap.org/webapp/config.inc.php" do - owner "root" - group "root" - mode 0o644 - content thinkup_config - notifies :reload, "service[apache2]" -end - -thinkup_cron = edit_file "/srv/thinkup.openstreetmap.org/extras/cron/config.sample" do |line| - line.gsub!(/^thinkup="[^"]*"$/, "thinkup=\"/srv/thinkup.openstreetmap.org\"") - line.gsub!(/^thinkup_username="[^"]*"$/, "thinkup_username=\"openstreetmap@jonno.cix.co.uk\"") - line.gsub!(/^thinkup_password="[^"]*"$/, "thinkup_password=\"#{passwords['admin']}\"") - line.gsub!(/^php="[^"]*"$/, "php=\"/usr/bin/php\"") - line.gsub!(/^#crawl_interval=[0-9]+$/, "crawl_interval=30") - - line -end - -file "/srv/thinkup.openstreetmap.org/extras/cron/config" do - owner "root" - group "thinkup" - mode 0o640 - content thinkup_cron -end - -template "/etc/cron.d/thinkup" do - source "cron.erb" - owner "root" - group "root" - mode "0644" -end - -template "/etc/cron.daily/thinkup-backup" do - source "backup.cron.erb" - owner "root" - group "root" - mode 0o750 - variables :passwords => passwords -end diff --git a/cookbooks/thinkup/templates/default/apache.erb b/cookbooks/thinkup/templates/default/apache.erb deleted file mode 100644 index bcc935bf6..000000000 --- a/cookbooks/thinkup/templates/default/apache.erb +++ /dev/null @@ -1,16 +0,0 @@ -# DO NOT EDIT - This file is being maintained by Chef - - - ServerName thinkup.openstreetmap.org - ServerAlias thinkup.osm.org - ServerAdmin webmaster@openstreetmap.org - - CustomLog /var/log/apache2/thinkup.openstreetmap.org-access.log combined - ErrorLog /var/log/apache2/thinkup.openstreetmap.org-error.log - - DocumentRoot /srv/thinkup.openstreetmap.org/webapp - - - - Require all granted - diff --git a/cookbooks/thinkup/templates/default/backup.cron.erb b/cookbooks/thinkup/templates/default/backup.cron.erb deleted file mode 100644 index 3460cbe48..000000000 --- a/cookbooks/thinkup/templates/default/backup.cron.erb +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -# DO NOT EDIT - This file is being maintained by Chef - -T=$(mktemp -d -t -p /var/tmp thinkup.XXXXXXXXXX) -D=$(date +%Y-%m-%d) -B=thinkup-$D.tar.gz - -mkdir $T/thinkup-$D -mysqldump --user=thinkup --password=<%= @passwords["database"] %> --opt thinkup > $T/thinkup-$D/thinkup.sql -ln -s /srv/thinkup.openstreetmap.org $T/thinkup-$D/www - -export GZIP="--rsyncable -9" -export RSYNC_RSH="ssh -ax" - -nice tar --create --gzip --dereference --directory=$T --file=$T/$B thinkup-$D -nice rsync $T/$B backup::backup - -rm -rf $T diff --git a/cookbooks/thinkup/templates/default/cron.erb b/cookbooks/thinkup/templates/default/cron.erb deleted file mode 100644 index b0b4d09ae..000000000 --- a/cookbooks/thinkup/templates/default/cron.erb +++ /dev/null @@ -1 +0,0 @@ -0 * * * * thinkup /srv/thinkup.openstreetmap.org/extras/cron/cron > /srv/thinkup.openstreetmap.org/logs/crawler-$(date +\%Y\%m\%d\%H\%M\%S).log 2>&1 diff --git a/roles/mail.rb b/roles/mail.rb index cb81cb360..d6a72289d 100644 --- a/roles/mail.rb +++ b/roles/mail.rb @@ -49,7 +49,6 @@ default_attributes( "rails" => "root", "trac" => "root", "munin" => "root", - "thinkup" => "root", "www-data" => "root", "osmbackup" => "root", "noreply" => "/dev/null", diff --git a/roles/ridley.rb b/roles/ridley.rb index 0edbf7eea..6595ba2ee 100644 --- a/roles/ridley.rb +++ b/roles/ridley.rb @@ -92,7 +92,6 @@ run_list( "role[switch2osm]", "role[blog]", "role[otrs]", - "role[thinkup]", "recipe[dhcpd]", "recipe[openvpn]" ) diff --git a/roles/thinkup.rb b/roles/thinkup.rb deleted file mode 100644 index 565fc9ff9..000000000 --- a/roles/thinkup.rb +++ /dev/null @@ -1,17 +0,0 @@ -name "thinkup" -description "Role applied to all ThinkUp servers" - -default_attributes( - :accounts => { - :users => { - :thinkup => { :status => :role } - } - }, - :apache => { - :mpm => "prefork" - } -) - -run_list( - "recipe[thinkup]" -) -- 2.43.2