Drop thinkup.openstreetmap.org
authorTom Hughes <tom@compton.nu>
Thu, 25 Aug 2016 19:16:41 +0000 (20:16 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 25 Aug 2016 19:17:53 +0000 (20:17 +0100)
cookbooks/backup/templates/default/expire.cron.erb
cookbooks/thinkup/.foodcritic [deleted file]
cookbooks/thinkup/README.md [deleted file]
cookbooks/thinkup/metadata.rb [deleted file]
cookbooks/thinkup/recipes/default.rb [deleted file]
cookbooks/thinkup/templates/default/apache.erb [deleted file]
cookbooks/thinkup/templates/default/backup.cron.erb [deleted file]
cookbooks/thinkup/templates/default/cron.erb [deleted file]
roles/mail.rb
roles/ridley.rb
roles/thinkup.rb [deleted file]

index 38930c7..8b16d5c 100644 (file)
@@ -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 (file)
index a085263..0000000
+++ /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 (file)
index 0fc9b1f..0000000
+++ /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 (file)
index 580905f..0000000
+++ /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 (file)
index ce663be..0000000
+++ /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 (file)
index bcc935b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# DO NOT EDIT - This file is being maintained by Chef
-
-<VirtualHost *:80>
-       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
-</VirtualHost>
-
-<Directory /srv/thinkup.openstreetmap.org/webapp>
-       Require all granted
-</Directory>
diff --git a/cookbooks/thinkup/templates/default/backup.cron.erb b/cookbooks/thinkup/templates/default/backup.cron.erb
deleted file mode 100644 (file)
index 3460cbe..0000000
+++ /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 (file)
index b0b4d09..0000000
+++ /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
index cb81cb3..d6a7228 100644 (file)
@@ -49,7 +49,6 @@ default_attributes(
       "rails" => "root",
       "trac" => "root",
       "munin" => "root",
-      "thinkup" => "root",
       "www-data" => "root",
       "osmbackup" => "root",
       "noreply" => "/dev/null",
index 0edbf7e..6595ba2 100644 (file)
@@ -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 (file)
index 565fc9f..0000000
+++ /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]"
-)