Commit cda5a86d

mo khan <mo@mokhan.ca>
2014-05-29 04:37:04
remove old capistrano recipes that have been moved to chef.
1 parent 82cd935
config/recipes/templates/monit/delayed_job.erb
@@ -1,3 +0,0 @@
-check process delayed_job with pidfile <%= delayed_job_pid %>
-  start program = "/etc/init.d/delayed_job_<%= application %> start"
-  stop program = "/etc/init.d/delayed_job_<%= application %> stop"
config/recipes/templates/monit/nginx.erb
@@ -1,5 +0,0 @@
-check process nginx with pidfile /var/run/nginx.pid
-  start program = "/etc/init.d/nginx start"
-  stop program = "/etc/init.d/nginx stop"
-  if children > 250 then restart
-  if 5 restarts within 5 cycles then timeout
config/recipes/templates/monit/postgresql.erb
@@ -1,5 +0,0 @@
-check process postgresql with pidfile <%= postgresql_pid %>
-  start program = "/etc/init.d/postgresql start"
-  stop program = "/etc/init.d/postgresql stop"
-  if failed host localhost port 5432 protocol pgsql then restart
-  if 5 restarts within 5 cycles then timeout
config/recipes/templates/monit/unicorn.erb
@@ -1,15 +0,0 @@
-check process <%= application %>_unicorn with pidfile <%= unicorn_pid %>
-  start program = "/etc/init.d/unicorn_<%= application %> start"
-  stop program = "/etc/init.d/unicorn_<%= application %> stop"
-
-<% unicorn_workers.times do |n| %>
-  <% pid = unicorn_pid.sub(".pid", ".#{n}.pid") %>
-  check process <%= application %>_unicorn_worker_<%= n %> with pidfile <%= pid %>
-    start program = "/bin/true"
-    stop program = "/usr/bin/test -s <%= pid %> && /bin/kill -QUIT `cat <%= pid  %>`"
-    if mem > 200.0 MB for 1 cycle then restart
-    if cpu > 50% for 3 cycles then restart
-    if 5 restarts within 5 cycles then timeout
-    alert mo@mokhan.ca only on { pid }
-    if changed pid 2 times within 60 cycles then alert
-<% end %>
config/recipes/templates/ssl/cakeside.csr
@@ -1,17 +0,0 @@
------BEGIN CERTIFICATE REQUEST-----
-MIICpDCCAYwCAQAwXzELMAkGA1UEBhMCQ0ExEDAOBgNVBAgTB0FsYmVydGExEDAO
-BgNVBAcTB0NhbGdhcnkxETAPB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wyxdA4yhOlKfbRAvfBPCVAQJARGOj
-AZ0Y1dz0bSiO0BIjjAwSKe8Nz+xPiSn/xjf/g0ufmCazi9SDZwQ5TyJjjfxDJ/7p
-KhQWzwbGnN2FUW9r2QJADT7SMkMHb9bOgUJnLehLQY0sONrfAMJ7NieJk24PyX83
-bBV1YGbhWentkyZBkgcvYqVlxGTPvIao1x69xSJhOw==
------END RSA PRIVATE KEY-----
config/recipes/templates/delayed_job_init.erb
@@ -1,39 +0,0 @@
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides:          delayed_job
-# Required-Start:    $all
-# Required-Stop:
-# Default-Start:     2 3 4 5
-# Default-Stop:
-### END INIT INFO
-set -e
-
-N=/etc/init.d/delayed_job_<%= application %>
-app_root=<%= current_path %>
-user=<%= user %>
-service="delayed_job"
-
-usage() {
-  echo "Usage: $N {start|stop|status|restart|force-reload} <environment>" >&2
-  exit 1
-}
-
-interact() {
-    op="$1"
-    echo "$1ing $service"
-    su - -c "cd $app_root; RAILS_ENV=<%= rails_env %> bundle exec script/delayed_job $op" $user
-}
-
-case "$1" in
-    start|stop|status)
-        interact "$1"
-        ;;
-    reload|restart|force-reload)
-        interact restart
-        ;;
-    *)
-        usage
-        ;;
-esac
-
-exit 0
config/recipes/templates/logrotate.erb
@@ -1,10 +0,0 @@
-<%= shared_path %>/log/*.log {
-  daily
-  missingok
-  rotate 52
-  compress
-  delaycompress
-  notifempty
-  copytruncate
-  dateext
-}
config/recipes/templates/nginx_unicorn.erb
@@ -1,45 +0,0 @@
-upstream unicorn {
-  server unix:<%= shared_path %>/sockets/unicorn.sock fail_timeout=0;
-}
-
-client_max_body_size 4G;
-
-server {
-  listen 80 default deferred;
-  server_name <%= domain %>;
-  rewrite        ^ https://$server_name$request_uri? permanent;
-}
-
-server {
-  listen 443;
-  server_name  <%= domain %>;
-  root         <%= current_path %>/public;
-  ssl on;
-  ssl_certificate             <%= ssl_certificate %>;
-  ssl_certificate_key         <%= ssl_certificate_key %>;
-  error_log /var/log/nginx/<%= application %>.error.log;
-  access_log /var/log/nginx/<%= application %>.access.log;
-
-  if ($host = 'cakeside.com' ) {
-    rewrite  ^/(.*)$  https://<%= domain %>/$1  permanent;
-  }
-
-  try_files $uri/index.html $uri @unicorn;
-  location ^~ /assets/ {
-    gzip_static on;
-    expires max;
-    add_header Cache-Control public;
-  }
-
-  location @unicorn {
-    proxy_set_header X_FORWARDED_PROTO https;
-    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-    proxy_set_header HOST $http_host;
-    proxy_set_header  X-Url-Scheme $scheme;
-    proxy_redirect off;
-    proxy_pass http://unicorn;
-  }
-
-  error_page 500 502 503 504 /500.html;
-  keepalive_timeout 10;
-}
config/recipes/templates/postgresql.yml.erb
@@ -1,8 +0,0 @@
-<%= rails_env %>:
-  adapter: postgresql
-  encoding: unicode
-  database: <%= postgresql_database %>
-  pool: 5
-  username: <%= postgresql_user %>
-  password: <%= postgresql_password %>
-  host: <%= postgresql_host %>
config/recipes/templates/unicorn.rb.erb
@@ -1,33 +0,0 @@
-working_directory "<%= current_path %>"
-pid "<%= unicorn_pid %>"
-stderr_path "<%= unicorn_log %>"
-stdout_path "<%= unicorn_log %>"
-
-listen "<%= shared_path %>/sockets/unicorn.sock"
-worker_processes <%= unicorn_workers %>
-timeout 30
-
-preload_app true
-
-before_fork do |server, worker|
-  if defined? ActiveRecord::Base
-    ActiveRecord::Base.connection.disconnect!
-  end
-
-  old_pid = "#{server.config[:pid]}.oldbin"
-  if File.exists?(old_pid) && server.pid != old_pid
-    begin
-      Process.kill("QUIT", File.read(old_pid).to_i)
-    rescue Errno::ENOENT, Errno::ESRCH
-      # someone else killed it
-    end
-  end
-end
-
-after_fork do |server, worker|
-  if defined? ActiveRecord::Base
-    ActiveRecord::Base.establish_connection
-  end
-  child_pid = server.config[:pid].sub(".pid", ".#{worker.nr}.pid")
-  system("echo #{Process.pid} > #{child_pid}")
-end
config/recipes/templates/unicorn_init.erb
@@ -1,84 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides:          unicorn
-# Required-Start:    $remote_fs $syslog
-# Required-Stop:     $remote_fs $syslog
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Manage unicorn server
-# Description:       Start, stop, restart unicorn server for a specific application.
-### END INIT INFO
-set -e
-
-# Feel free to change any of the following variables for your app:
-TIMEOUT=${TIMEOUT-60}
-APP_ROOT=<%= current_path %>
-PID=<%= unicorn_pid %>
-CMD="cd <%= current_path %>; bundle exec unicorn -E <%= rails_env %> -D -c <%= unicorn_config %>"
-AS_USER=<%= unicorn_user %>
-set -u
-
-OLD_PIN="$PID.oldbin"
-
-sig () {
-  test -s "$PID" && kill -$1 `cat $PID`
-}
-
-oldsig () {
-  test -s $OLD_PIN && kill -$1 `cat $OLD_PIN`
-}
-
-run () {
-  if [ "$(id -un)" = "$AS_USER" ]; then
-    eval $1
-  else
-    su -c "$1" - $AS_USER
-  fi
-}
-
-case "$1" in
-start)
-  sig 0 && echo >&2 "Already running" && exit 0
-  run "$CMD"
-  ;;
-stop)
-  sig QUIT && exit 0
-  echo >&2 "Not running"
-  ;;
-force-stop)
-  sig TERM && exit 0
-  echo >&2 "Not running"
-  ;;
-restart|reload)
-  sig USR2 && echo reloaded OK && exit 0
-  echo >&2 "Couldn't reload, starting '$CMD' instead"
-  run "$CMD"
-  ;;
-upgrade)
-  if sig USR2 && sleep 2 && sig 0 && oldsig QUIT
-  then
-    n=$TIMEOUT
-    while test -s $OLD_PIN && test $n -ge 0
-    do
-      printf '.' && sleep 1 && n=$(( $n - 1 ))
-    done
-    echo
-
-    if test $n -lt 0 && test -s $OLD_PIN
-    then
-      echo >&2 "$OLD_PIN still exists after $TIMEOUT seconds"
-      exit 1
-    fi
-    exit 0
-  fi
-  echo >&2 "Couldn't upgrade, starting '$CMD' instead"
-  run "$CMD"
-  ;;
-reopen-logs)
-  sig USR1
-  ;;
-*)
-  echo >&2 "Usage: $0 <start|stop|restart|upgrade|force-stop|reopen-logs>"
-  exit 1
-  ;;
-esac
config/recipes/base.rb
@@ -6,22 +6,3 @@ end
 def set_default(name, *args, &block)
   set(name, *args, &block) unless exists?(name)
 end
-
-namespace :deploy do
-  desc "install all the things"
-  task :install do
-    run "#{sudo} apt-get -y update", :shell => :bash
-    run "#{sudo} apt-get -y install curl git-core python-software-properties imagemagick libmagickwand-dev memcached", :shell => :bash
-    run "#{sudo} apt-get -y install build-essential", :shell => :bash
-    # Packages required for compilation of some stdlib modules
-    run "#{sudo} apt-get -y install tklib", :shell => :bash
-    # Extras for RubyGems and Rails:
-    run "#{sudo} apt-get -y install zlib1g-dev libssl-dev", :shell => :bash
-    # Readline Dev on Ubuntu 12.04 LTS:
-    run "#{sudo} apt-get -y install libreadline-gplv2-dev", :shell => :bash
-    # Install some nokogiri dependencies:
-    run "#{sudo} apt-get -y install libxml2 libxml2-dev libxslt1-dev", :shell => :bash
-    run "#{sudo} apt-get -y install gawk libreadline6-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev", :shell => :bash
-    run "#{sudo} apt-get -y autoremove", :shell => :bash
-  end
-end
config/recipes/delayed_job.rb
@@ -1,15 +1,4 @@
-set_default(:delayed_job_pid) { "#{shared_path}/pids/delayed_job.pid" }
-
 namespace :delayed_job do 
-  desc "setup delayed job"
-  task :setup, roles: :app do
-    template "delayed_job_init.erb", "/tmp/delayed_job_init"
-    run "chmod +x /tmp/delayed_job_init"
-    run "#{sudo} mv /tmp/delayed_job_init /etc/init.d/delayed_job_#{application}"
-    run "#{sudo} update-rc.d -f delayed_job_#{application} defaults"
-  end
-  after "deploy:setup", "delayed_job:setup"
-
   %w[start stop restart status].each do |command|
     desc "#{command} delayed_job"
     task command, roles: :app do
config/recipes/logrotate.rb
@@ -1,8 +0,0 @@
-namespace :logrotate do
-  desc "setup logrotate configuration"
-  task :setup do
-    template "logrotate.erb", "/tmp/logrotate_conf"
-    run "#{sudo} mv /tmp/logrotate_conf /etc/logrotate.d/#{application}"
-  end
-  after "deploy:setup", "logrotate:setup"
-end
config/recipes/monit.rb
@@ -1,27 +1,4 @@
 namespace :monit do
-  desc "install monit"
-  task :install do
-    run "#{sudo} apt-get -y install monit"
-  end
-  after "deploy:install", "monit:install"
-
-  desc "setup monit config"
-  task :setup do
-    monit_config "monitrc", "/etc/monit/monitrc"
-    nginx
-    postgresql
-    unicorn
-    delayed_job
-    syntax
-    reload
-  end
-  after "deploy:setup", "monit:setup"
-
-  task(:nginx, roles: :web) { monit_config "nginx" }
-  task(:postgresql, roles: :db) { monit_config "postgresql" }
-  task(:unicorn, roles: :app) { monit_config "unicorn" }
-  task(:delayed_job, roles: :app) { monit_config "delayed_job" }
-
   %w[start stop restart syntax reload status].each do |command|
     desc "run monit #{command} script"
     task command do
@@ -33,11 +10,3 @@ namespace :monit do
     run "#{sudo} service monit -V"
   end
 end
-
-def monit_config(name, destination = nil)
-  destination ||= "/etc/monit/conf.d/#{name}.conf"
-  template "monit/#{name}.erb", "/tmp/monit_#{name}"
-  run "#{sudo} mv /tmp/monit_#{name} #{destination}"
-  run "#{sudo} chown root #{destination}"
-  run "#{sudo} chmod 600 #{destination}"
-end
config/recipes/nginx.rb
@@ -1,30 +1,4 @@
 namespace :nginx do
-  desc "Install latest stable release of nginx"
-  task :install, roles: :web do
-    run "#{sudo} add-apt-repository -y ppa:nginx/stable"
-    run "#{sudo} apt-get -y update"
-    run "#{sudo} apt-get -y install nginx"
-  end
-  after "deploy:install", "nginx:install"
-
-  desc "setup nginx configuration"
-  task :setup, roles: :web do
-    run "#{sudo} rm -f /tmp/nginx_conf"
-    run "#{sudo} rm -f /etc/nginx/sites-available/#{application}"
-    run "#{sudo} rm -f /etc/nginx/sites-enabled/#{application}"
-
-    template "nginx_unicorn.erb", "/tmp/nginx_conf"
-    run "#{sudo} mv /tmp/nginx_conf /etc/nginx/sites-available/#{application}"
-    run "#{sudo} ln -s /etc/nginx/sites-available/#{application} /etc/nginx/sites-enabled/#{application}"
-    run "#{sudo} rm -f /etc/nginx/sites-enabled/default"
-
-    template "500.sh.erb", "/tmp/nginx.drop.lasso"
-    run "#{sudo} mv /tmp/nginx.drop.lasso /etc/cron.daily/#{application}"
-    run "#{sudo} chmod +x /etc/cron.daily/#{application}"
-    run "#{sudo} chown root:root /etc/cron.daily/#{application}"
-  end
-  after "deploy:setup", "nginx:setup"
-
   %w[start stop restart].each do |command|
     desc "#{command} nginx"
     task command, roles: :web do
config/recipes/nodejs.rb
@@ -1,9 +0,0 @@
-namespace :nodejs do
-  desc "install node.js"
-  task :install, roles: :app do
-    run "#{sudo} add-apt-repository -y ppa:chris-lea/node.js"
-    run "#{sudo} apt-get -y update"
-    run "#{sudo} apt-get -y install nodejs"
-  end
-  after "deploy:install", "nodejs:install"
-end
config/recipes/postgresql.rb
@@ -5,14 +5,6 @@ set_default(:postgresql_database) { "#{application}_#{rails_env}" }
 set_default(:postgresql_pid) { "/var/run/postgresql/9.2-main.pid" }
 
 namespace :postgresql do
-  desc "install the latest release or postgresql"
-  task :install, roles: :db, only: { primary: true } do
-    run "#{sudo} add-apt-repository -y ppa:pitti/postgresql"
-    run "#{sudo} apt-get -y update"
-    run "#{sudo} apt-get -y install postgresql-9.2 libpq-dev"
-  end
-  after "deploy:install", "postgresql:install"
-
   desc "create a database"
   task :create_database, roles: :db, only: { primary: true } do
     run %Q{#{sudo} -u postgres psql -c "create user #{postgresql_user} with password '#{postgresql_password}';"}
@@ -20,13 +12,6 @@ namespace :postgresql do
   end
   after "deploy:setup", "postgresql:create_database"
 
-  desc "generate database.yml"
-  task :setup, roles: :app do
-    run "mkdir -p #{shared_path}/config"
-    template "postgresql.yml.erb", "#{shared_path}/config/database.yml"
-  end
-  after "deploy:setup", "postgresql:setup"
-
   desc "symlink the database.yml file into the latest release"
   task :symlink, roles: :app do
     run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
config/recipes/rbenv.rb
@@ -1,40 +0,0 @@
-set_default :ruby_version, "2.1.2"
-
-namespace :rbenv do
-  desc "install rbenv"
-  task :install, roles: :app do
-    # Install development tools:
-    run "#{sudo} apt-get -y install build-essential"
-    # Packages required for compilation of some stdlib modules
-    run "#{sudo} apt-get -y install tklib"
-    # Extras for RubyGems and Rails:
-    run "#{sudo} apt-get -y install zlib1g-dev libssl-dev"
-    # Readline Dev on Ubuntu 12.04 LTS:
-    run "#{sudo} apt-get -y install libreadline-gplv2-dev"
-    # Install some nokogiri dependencies:
-    run "#{sudo} apt-get -y install libxml2 libxml2-dev libxslt1-dev"
-
-    run "curl -L https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash"
-    bashrc = <<-BASHRC
-if [ -d $HOME/.rbenv ]; then
-  export PATH="$HOME/.rbenv/bin:$PATH"
-  eval "$(rbenv init -)"
-fi
-BASHRC
-    put bashrc, "/tmp/rbenvrc"
-    run "cat /tmp/rbenvrc ~/.bashrc > ~/.bashrc.tmp"
-    run "mv ~/.bashrc.tmp ~/.bashrc"
-    run %q{export PATH="$HOME/.rbenv/bin:$PATH"}
-    run %q{eval "$(rbenv init -)"}
-  end
-  after "deploy:install", "rbenv:install"
-
-  desc "setup rbenv with ruby and bundler"
-  task :setup, roles: :web do
-    run "rbenv install #{ruby_version}"
-    run "rbenv global #{ruby_version}"
-    run "gem install bundler --no-ri --no-rdoc"
-    run "rbenv rehash"
-  end
-  after "deploy:setup", "rbenv:setup"
-end
config/recipes/rvm.rb
@@ -1,8 +0,0 @@
-require "rvm/capistrano"
-set :rvm_ruby_string, :local
-set :rvm_autolibs_flag, :enable
-set :rvm_type, :user
-set :default_shell, :bash
-
-after "deploy:install", "rvm:install_rvm"
-after "deploy:install", "rvm:install_ruby"
config/recipes/unicorn.rb
@@ -1,22 +1,4 @@
-set_default(:unicorn_user) { user }
-set_default(:unicorn_pid) { "#{shared_path}/pids/unicorn.pid" }
-set_default(:unicorn_config) { "#{shared_path}/config/unicorn.rb" }
-set_default(:unicorn_log) { "#{shared_path}/log/unicorn.log" }
-set_default(:unicorn_workers, 2)
-
 namespace :unicorn do
-  desc "setup unicorn"
-  task :setup, roles: :app do
-    run "mkdir -p #{shared_path}/config"
-    run "mkdir -p #{shared_path}/sockets"
-    template "unicorn.rb.erb", unicorn_config
-    template "unicorn_init.erb", "/tmp/unicorn_init"
-    run "chmod +x /tmp/unicorn_init"
-    run "#{sudo} mv /tmp/unicorn_init /etc/init.d/unicorn_#{application}"
-    run "#{sudo} update-rc.d -f unicorn_#{application} defaults"
-  end
-  after "deploy:setup", "unicorn:setup"
-
   %w[start stop restart].each do |command|
     desc "#{command} unicorn"
     task command, roles: :app do
config/deploy.rb
@@ -6,12 +6,8 @@ load "config/recipes/base"
 load "config/recipes/nginx"
 load "config/recipes/unicorn"
 load "config/recipes/postgresql"
-load "config/recipes/nodejs"
 load "config/recipes/delayed_job"
-#load "config/recipes/rvm"
-load "config/recipes/rbenv"
 load "config/recipes/monit"
-load "config/recipes/logrotate"
 load "config/tasks/utility"
 load "config/tasks/rails"