Last active
December 28, 2015 07:59
-
-
Save kaplan/7468527 to your computer and use it in GitHub Desktop.
Trying to setup a Capistrano 3.x deployment workflow for a Rails app on a Virtual Machine (VirtualBox or VMFusion), Vagrant with Ubuntu, Nginx, Unicorn provisioned using Chef.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :application, 'deployrails.yo' | |
set :repo_url, 'http://repo.workalicio.us/deployrails1103.git' | |
set :deploy_to, '/home/vagrant/deployrails' | |
set :scm, :git | |
set :deploy_via, :copy | |
set :branch, 'master' | |
set :format, :pretty | |
set :log_level, :debug | |
set :pty, true | |
set :rails_env, 'production' | |
set :keep_releases, 5 | |
role :app, "deployrails.yo" | |
role :web, "deployrails.yo" | |
role :db, "deployrails.yo", :primary => true | |
# path to unicorn process id | |
unicorn_pid = "#{deploy_to}/shared/pids/unicorn.pid" | |
namespace :deploy do | |
desc 'Restart application' | |
task :restart do | |
on roles(:app), in: :sequence, wait: 5 do | |
# Your restart mechanism here, for example: | |
# execute :touch, release_path.join('tmp/restart.txt') | |
execute :echo, "current_path: #{current_path} - hey!!!!!!!!" | |
puts SSHKit.config.command_map[:ruby] | |
# => /usr/bin/env ruby | |
puts SSHKit.config.command_map[:kill] | |
puts SSHKit.config.command_map[:run] | |
# change the unicorn command path | |
SSHKit.config.command_map[:unicorn] = "/usr/local/bin/unicorn" | |
puts SSHKit.config.command_map[:unicorn] | |
# => /usr/local/bin/unicorn | |
# unicorn.pid display for debugging | |
execute :echo, "$(< #{unicorn_pid}) <----------------------" | |
# if you wanted to start unicorn straight away | |
# execute SSHKit.config.command_map[:unicorn], "-c /etc/unicorn/deployrails.conf.rb -E production -D" | |
# or gracefully restart with zero downtime, but I think this needs to know whether or not the unicorn process exists | |
# execute :kill, "-USR2 $(cat #{unicorn_pid})" | |
# check and see if there is a unicorn.pid, then kill or start | |
execute :echo, | |
"$( | |
if [ -f /home/vagrant/deployrails/shared/pids/unicorn.pid ]; | |
then | |
echo $(cat #{unicorn_pid}) ............................! && | |
kill -USR2 $(< #{unicorn_pid}) | |
else | |
echo 'start unicorn....................................' && | |
unicorn -c /etc/unicorn/deployrails.conf.rb -D | |
fi | |
)" | |
end | |
end | |
after :restart, :clear_cache do | |
on roles(:web), in: :groups, limit: 3, wait: 10 do | |
# Here we can do anything such as: | |
# within release_path do | |
# execute :rake, 'cache:clear' | |
# end | |
execute :echo, "$(< #{unicorn_pid}) <----------------------" | |
end | |
end | |
after :finishing, 'deploy:cleanup' | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I think my real problem might be that I keep repeatly running deploy without any changes or git pushes to my repo, why would someone do that, right? | |
This is probably the hard way to debug with my extra verbosity, but it's helping me. This gist shows the unicorn.log for each deploy, then the unicorn processes on the VM, and the releases on VM. The problem is I eventually don't get an updated unicorn.pid, and the unicorn.log message becomes the following. It looks like something is trying to run on a release no longer around? | |
I, [2013-11-13T18:37:33.777079 #41916] INFO -- : executing ["/usr/local/bin/unicorn", "-c", "/etc/unicorn/deployrails.conf.rb", "-D", {9=>#<Kgio::UNIXServer:fd 9>}] (in /home/vagrant/deployrails/releases/20131113233731) | |
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:16:in `build': /home/vagrant/deployrails/releases/20131113232540/Gemfile not found (Bundler::GemfileNotFound) | |
from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:148:in `definition' | |
from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:116:in `setup' | |
from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `<top (required)>' | |
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
E, [2013-11-13T18:37:33.816267 #40377] ERROR -- : reaped #<Process::Status: pid 41916 exit 1> exec()-ed | |
# ls releases | |
root@deployrails1103:/home/vagrant/deployrails/releases# ls -al | |
total 28 | |
drwxrwxr-x 7 kaplan kaplan 4096 Nov 13 18:37 . | |
drwxrwxr-x 5 vagrant deployers 4096 Nov 13 18:37 .. | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:28 20131113232835 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:30 20131113233027 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:34 20131113233425 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:36 20131113233613 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:37 20131113233731 | |
I'm repeatedly running `cap production deploy` in my local app directory then I watch the deploy script run and see the unicorn.pids change. Eventually the `kill -USR2 <pid>` doesn't update the unicorn.pid, but it looks like the number of releases keeps going. | |
At one point my app would completely blow up, no display in the browser, but I think that's because the current symlink'd release was no longer around. I haven't had that happen since I started trying to consisitently test. I was bouncing back and forth between deploying and manually stop and starting unicorn along with killing processes. Now what happens is the app doesn't update once the unicorn.pid is stuck on not changing without a full kill -QUIT. | |
# =============================== | |
# 1 cap production deploy locally | |
I, [2013-11-13T18:25:43.122581 #32666] INFO -- : Refreshing Gem list | |
I, [2013-11-13T18:25:44.355957 #32666] INFO -- : unlinking existing socket=/home/vagrant/deployrails/shared/sockets/unicorn.sock | |
I, [2013-11-13T18:25:44.356544 #32666] INFO -- : listening on addr=/home/vagrant/deployrails/shared/sockets/unicorn.sock fd=9 | |
I, [2013-11-13T18:25:44.368996 #32666] INFO -- : master process ready | |
I, [2013-11-13T18:25:45.532165 #32671] INFO -- : worker=1 ready | |
I, [2013-11-13T18:25:45.534951 #32674] INFO -- : worker=2 ready | |
I, [2013-11-13T18:25:45.539878 #32669] INFO -- : worker=0 ready | |
I, [2013-11-13T18:25:45.540666 #32677] INFO -- : worker=3 ready | |
# ps ax | grep unicorn | |
kaplan@deployrails1103:/home/vagrant/deployrails$ ps ax | grep unicorn | |
32666 ? Sl 0:01 unicorn master -c /etc/unicorn/deployrails.conf.rb -D | |
32669 ? Sl 0:00 unicorn worker[0] -c /etc/unicorn/deployrails.conf.rb -D | |
32671 ? Sl 0:00 unicorn worker[1] -c /etc/unicorn/deployrails.conf.rb -D | |
32674 ? Sl 0:00 unicorn worker[2] -c /etc/unicorn/deployrails.conf.rb -D | |
32677 ? Sl 0:00 unicorn worker[3] -c /etc/unicorn/deployrails.conf.rb -D | |
33083 pts/0 S+ 0:00 grep --color=auto unicorn | |
54381 pts/1 S+ 0:00 tail -f unicorn.log | |
# ls releases | |
root@deployrails1103:/home/vagrant/deployrails/releases# ls -al | |
total 28 | |
drwxrwxr-x 7 kaplan kaplan 4096 Nov 13 18:25 . | |
drwxrwxr-x 5 vagrant deployers 4096 Nov 13 18:25 .. | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 17:01 20131113220158 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 17:08 20131113220805 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 17:11 20131113221124 | |
drwxrwxr-x 13 kaplan kaplan 4096 Nov 13 18:20 20131113232023 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:25 20131113232540 | |
# =============================== | |
# 2 cap production deploy locally | |
I, [2013-11-13T18:27:15.696163 #34216] INFO -- : executing ["/usr/local/bin/unicorn", "-c", "/etc/unicorn/deployrails.conf.rb", "-D", {9=>#<Kgio::UNIXServer:/home/vagrant/deployrails/shared/sockets/unicorn.sock>}] (in /home/vagrant/deployrails/releases/20131113232713) | |
I, [2013-11-13T18:27:15.849790 #34216] INFO -- : inherited addr=/home/vagrant/deployrails/shared/sockets/unicorn.sock fd=9 | |
I, [2013-11-13T18:27:15.850342 #34216] INFO -- : Refreshing Gem list | |
I, [2013-11-13T18:27:16.913280 #34216] INFO -- : master process ready | |
I, [2013-11-13T18:27:17.198241 #32666] INFO -- : reaped #<Process::Status: pid 32671 exit 0> worker=1 | |
I, [2013-11-13T18:27:17.200567 #32666] INFO -- : reaped #<Process::Status: pid 32674 exit 0> worker=2 | |
I, [2013-11-13T18:27:17.200884 #32666] INFO -- : reaped #<Process::Status: pid 32677 exit 0> worker=3 | |
I, [2013-11-13T18:27:17.301711 #32666] INFO -- : reaped #<Process::Status: pid 32669 exit 0> worker=0 | |
I, [2013-11-13T18:27:17.302187 #32666] INFO -- : master complete | |
I, [2013-11-13T18:27:18.424261 #34223] INFO -- : worker=1 ready | |
I, [2013-11-13T18:27:18.428005 #34226] INFO -- : worker=2 ready | |
I, [2013-11-13T18:27:18.430555 #34230] INFO -- : worker=3 ready | |
I, [2013-11-13T18:27:18.432312 #34221] INFO -- : worker=0 ready | |
# ps ax | grep unicorn | |
kaplan@deployrails1103:/home/vagrant/deployrails$ ps ax | grep unicorn | |
34216 ? Sl 0:01 unicorn master -c /etc/unicorn/deployrails.conf.rb -D | |
34221 ? Sl 0:00 unicorn worker[0] -c /etc/unicorn/deployrails.conf.rb -D | |
34223 ? Sl 0:00 unicorn worker[1] -c /etc/unicorn/deployrails.conf.rb -D | |
34226 ? Sl 0:00 unicorn worker[2] -c /etc/unicorn/deployrails.conf.rb -D | |
34230 ? Sl 0:00 unicorn worker[3] -c /etc/unicorn/deployrails.conf.rb -D | |
34628 pts/0 S+ 0:00 grep --color=auto unicorn | |
54381 pts/1 S+ 0:00 tail -f unicorn.log | |
# ls releases | |
root@deployrails1103:/home/vagrant/deployrails/releases# ls -al | |
total 28 | |
drwxrwxr-x 7 kaplan kaplan 4096 Nov 13 18:27 . | |
drwxrwxr-x 5 vagrant deployers 4096 Nov 13 18:27 .. | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 17:08 20131113220805 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 17:11 20131113221124 | |
drwxrwxr-x 13 kaplan kaplan 4096 Nov 13 18:20 20131113232023 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:25 20131113232540 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:27 20131113232713 | |
# =============================== | |
# 3 cap production deploy locally | |
I, [2013-11-13T18:28:38.064761 #35758] INFO -- : executing ["/usr/local/bin/unicorn", "-c", "/etc/unicorn/deployrails.conf.rb", "-D", {9=>#<Kgio::UNIXServer:fd 9>}] (in /home/vagrant/deployrails/releases/20131113232835) | |
I, [2013-11-13T18:28:38.217530 #35758] INFO -- : inherited addr=/home/vagrant/deployrails/shared/sockets/unicorn.sock fd=9 | |
I, [2013-11-13T18:28:38.218233 #35758] INFO -- : Refreshing Gem list | |
I, [2013-11-13T18:28:39.289110 #35758] INFO -- : master process ready | |
I, [2013-11-13T18:28:39.579935 #34216] INFO -- : reaped #<Process::Status: pid 34223 exit 0> worker=1 | |
I, [2013-11-13T18:28:39.581372 #34216] INFO -- : reaped #<Process::Status: pid 34226 exit 0> worker=2 | |
I, [2013-11-13T18:28:39.581594 #34216] INFO -- : reaped #<Process::Status: pid 34230 exit 0> worker=3 | |
I, [2013-11-13T18:28:39.682206 #34216] INFO -- : reaped #<Process::Status: pid 34221 exit 0> worker=0 | |
I, [2013-11-13T18:28:39.682674 #34216] INFO -- : master complete | |
I, [2013-11-13T18:28:40.832606 #35772] INFO -- : worker=3 ready | |
I, [2013-11-13T18:28:40.833088 #35765] INFO -- : worker=1 ready | |
I, [2013-11-13T18:28:40.834111 #35768] INFO -- : worker=2 ready | |
I, [2013-11-13T18:28:40.839179 #35763] INFO -- : worker=0 ready | |
# ps ax | grep unicorn | |
kaplan@deployrails1103:/home/vagrant/deployrails$ ps ax | grep unicorn | |
35758 ? Sl 0:01 unicorn master -c /etc/unicorn/deployrails.conf.rb -D | |
35763 ? Sl 0:00 unicorn worker[0] -c /etc/unicorn/deployrails.conf.rb -D | |
35765 ? Sl 0:00 unicorn worker[1] -c /etc/unicorn/deployrails.conf.rb -D | |
35768 ? Sl 0:00 unicorn worker[2] -c /etc/unicorn/deployrails.conf.rb -D | |
35772 ? Sl 0:00 unicorn worker[3] -c /etc/unicorn/deployrails.conf.rb -D | |
36168 pts/0 S+ 0:00 grep --color=auto unicorn | |
54381 pts/1 S+ 0:00 tail -f unicorn.log | |
# ls releases | |
root@deployrails1103:/home/vagrant/deployrails/releases# ls -al | |
total 28 | |
drwxrwxr-x 7 kaplan kaplan 4096 Nov 13 18:28 . | |
drwxrwxr-x 5 vagrant deployers 4096 Nov 13 18:28 .. | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 17:11 20131113221124 | |
drwxrwxr-x 13 kaplan kaplan 4096 Nov 13 18:20 20131113232023 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:25 20131113232540 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:27 20131113232713 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:28 20131113232835 | |
# =============================== | |
# 4 cap production deploy locally | |
I, [2013-11-13T18:30:29.451365 #37298] INFO -- : executing ["/usr/local/bin/unicorn", "-c", "/etc/unicorn/deployrails.conf.rb", "-D", {9=>#<Kgio::UNIXServer:fd 9>}] (in /home/vagrant/deployrails/releases/20131113233027) | |
I, [2013-11-13T18:30:29.603609 #37298] INFO -- : inherited addr=/home/vagrant/deployrails/shared/sockets/unicorn.sock fd=9 | |
I, [2013-11-13T18:30:29.604125 #37298] INFO -- : Refreshing Gem list | |
I, [2013-11-13T18:30:30.690105 #37298] INFO -- : master process ready | |
I, [2013-11-13T18:30:30.978856 #35758] INFO -- : reaped #<Process::Status: pid 35763 exit 0> worker=0 | |
I, [2013-11-13T18:30:30.981789 #35758] INFO -- : reaped #<Process::Status: pid 35765 exit 0> worker=1 | |
I, [2013-11-13T18:30:30.982083 #35758] INFO -- : reaped #<Process::Status: pid 35768 exit 0> worker=2 | |
I, [2013-11-13T18:30:30.982350 #35758] INFO -- : reaped #<Process::Status: pid 35772 exit 0> worker=3 | |
I, [2013-11-13T18:30:30.982571 #35758] INFO -- : master complete | |
I, [2013-11-13T18:30:32.181986 #37308] INFO -- : worker=2 ready | |
I, [2013-11-13T18:30:32.188819 #37303] INFO -- : worker=0 ready | |
I, [2013-11-13T18:30:32.196802 #37305] INFO -- : worker=1 ready | |
I, [2013-11-13T18:30:32.197536 #37312] INFO -- : worker=3 ready | |
# ps ax | grep unicorn | |
kaplan@deployrails1103:/home/vagrant/deployrails$ ps ax | grep unicorn | |
37298 ? Sl 0:01 unicorn master -c /etc/unicorn/deployrails.conf.rb -D | |
37303 ? Sl 0:00 unicorn worker[0] -c /etc/unicorn/deployrails.conf.rb -D | |
37305 ? Sl 0:00 unicorn worker[1] -c /etc/unicorn/deployrails.conf.rb -D | |
37308 ? Sl 0:00 unicorn worker[2] -c /etc/unicorn/deployrails.conf.rb -D | |
37312 ? Sl 0:00 unicorn worker[3] -c /etc/unicorn/deployrails.conf.rb -D | |
37707 pts/0 S+ 0:00 grep --color=auto unicorn | |
54381 pts/1 S+ 0:00 tail -f unicorn.log | |
# ls releases | |
root@deployrails1103:/home/vagrant/deployrails/releases# ls -al | |
total 28 | |
drwxrwxr-x 7 kaplan kaplan 4096 Nov 13 18:30 . | |
drwxrwxr-x 5 vagrant deployers 4096 Nov 13 18:30 .. | |
drwxrwxr-x 13 kaplan kaplan 4096 Nov 13 18:20 20131113232023 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:25 20131113232540 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:27 20131113232713 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:28 20131113232835 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:30 20131113233027 | |
# =============================== | |
# 5 cap production deploy locally | |
I, [2013-11-13T18:34:27.924087 #38838] INFO -- : executing ["/usr/local/bin/unicorn", "-c", "/etc/unicorn/deployrails.conf.rb", "-D", {9=>#<Kgio::UNIXServer:fd 9>}] (in /home/vagrant/deployrails/releases/20131113233425) | |
I, [2013-11-13T18:34:28.081116 #38838] INFO -- : inherited addr=/home/vagrant/deployrails/shared/sockets/unicorn.sock fd=9 | |
I, [2013-11-13T18:34:28.081663 #38838] INFO -- : Refreshing Gem list | |
I, [2013-11-13T18:34:29.181808 #38838] INFO -- : master process ready | |
I, [2013-11-13T18:34:29.468604 #37298] INFO -- : reaped #<Process::Status: pid 37303 exit 0> worker=0 | |
I, [2013-11-13T18:34:29.473674 #37298] INFO -- : reaped #<Process::Status: pid 37308 exit 0> worker=2 | |
I, [2013-11-13T18:34:29.473912 #37298] INFO -- : reaped #<Process::Status: pid 37312 exit 0> worker=3 | |
I, [2013-11-13T18:34:29.575589 #37298] INFO -- : reaped #<Process::Status: pid 37305 exit 0> worker=1 | |
I, [2013-11-13T18:34:29.576043 #37298] INFO -- : master complete | |
I, [2013-11-13T18:34:30.669947 #38846] INFO -- : worker=1 ready | |
I, [2013-11-13T18:34:30.677880 #38848] INFO -- : worker=2 ready | |
I, [2013-11-13T18:34:30.682528 #38843] INFO -- : worker=0 ready | |
I, [2013-11-13T18:34:30.697806 #38852] INFO -- : worker=3 ready | |
# ps ax | grep unicorn | |
kaplan@deployrails1103:/home/vagrant/deployrails$ ps ax | grep unicorn | |
38838 ? Sl 0:01 unicorn master -c /etc/unicorn/deployrails.conf.rb -D | |
38843 ? Sl 0:00 unicorn worker[0] -c /etc/unicorn/deployrails.conf.rb -D | |
38846 ? Sl 0:00 unicorn worker[1] -c /etc/unicorn/deployrails.conf.rb -D | |
38848 ? Sl 0:00 unicorn worker[2] -c /etc/unicorn/deployrails.conf.rb -D | |
38852 ? Sl 0:00 unicorn worker[3] -c /etc/unicorn/deployrails.conf.rb -D | |
39247 pts/0 S+ 0:00 grep --color=auto unicorn | |
54381 pts/1 S+ 0:00 tail -f unicorn.log | |
# ls releases | |
root@deployrails1103:/home/vagrant/deployrails/releases# ls -al | |
total 28 | |
drwxrwxr-x 7 kaplan kaplan 4096 Nov 13 18:34 . | |
drwxrwxr-x 5 vagrant deployers 4096 Nov 13 18:34 .. | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:25 20131113232540 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:27 20131113232713 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:28 20131113232835 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:30 20131113233027 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:34 20131113233425 | |
# =============================== | |
# 6 cap production deploy locally | |
I, [2013-11-13T18:36:15.764240 #40377] INFO -- : executing ["/usr/local/bin/unicorn", "-c", "/etc/unicorn/deployrails.conf.rb", "-D", {9=>#<Kgio::UNIXServer:fd 9>}] (in /home/vagrant/deployrails/releases/20131113233613) | |
I, [2013-11-13T18:36:15.916404 #40377] INFO -- : inherited addr=/home/vagrant/deployrails/shared/sockets/unicorn.sock fd=9 | |
I, [2013-11-13T18:36:15.916927 #40377] INFO -- : Refreshing Gem list | |
I, [2013-11-13T18:36:16.997281 #40377] INFO -- : master process ready | |
I, [2013-11-13T18:36:17.288174 #38838] INFO -- : reaped #<Process::Status: pid 38843 exit 0> worker=0 | |
I, [2013-11-13T18:36:17.288684 #38838] INFO -- : reaped #<Process::Status: pid 38846 exit 0> worker=1 | |
I, [2013-11-13T18:36:17.288959 #38838] INFO -- : reaped #<Process::Status: pid 38848 exit 0> worker=2 | |
I, [2013-11-13T18:36:17.289171 #38838] INFO -- : reaped #<Process::Status: pid 38852 exit 0> worker=3 | |
I, [2013-11-13T18:36:17.289362 #38838] INFO -- : master complete | |
I, [2013-11-13T18:36:18.513034 #40384] INFO -- : worker=1 ready | |
I, [2013-11-13T18:36:18.521220 #40382] INFO -- : worker=0 ready | |
I, [2013-11-13T18:36:18.531564 #40387] INFO -- : worker=2 ready | |
I, [2013-11-13T18:36:18.548827 #40391] INFO -- : worker=3 ready | |
# ps ax | grep unicorn | |
kaplan@deployrails1103:/home/vagrant/deployrails$ ps ax | grep unicorn | |
40377 ? Sl 0:01 unicorn master -c /etc/unicorn/deployrails.conf.rb -D | |
40382 ? Sl 0:00 unicorn worker[0] -c /etc/unicorn/deployrails.conf.rb -D | |
40384 ? Sl 0:00 unicorn worker[1] -c /etc/unicorn/deployrails.conf.rb -D | |
40387 ? Sl 0:00 unicorn worker[2] -c /etc/unicorn/deployrails.conf.rb -D | |
40391 ? Sl 0:00 unicorn worker[3] -c /etc/unicorn/deployrails.conf.rb -D | |
40786 pts/0 S+ 0:00 grep --color=auto unicorn | |
54381 pts/1 S+ 0:00 tail -f unicorn.log | |
# ls releases | |
root@deployrails1103:/home/vagrant/deployrails/releases# ls -al | |
total 28 | |
drwxrwxr-x 7 kaplan kaplan 4096 Nov 13 18:36 . | |
drwxrwxr-x 5 vagrant deployers 4096 Nov 13 18:36 .. | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:27 20131113232713 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:28 20131113232835 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:30 20131113233027 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:34 20131113233425 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:36 20131113233613 | |
# =============================== | |
# 7 cap production deploy locally | |
I, [2013-11-13T18:37:33.777079 #41916] INFO -- : executing ["/usr/local/bin/unicorn", "-c", "/etc/unicorn/deployrails.conf.rb", "-D", {9=>#<Kgio::UNIXServer:fd 9>}] (in /home/vagrant/deployrails/releases/20131113233731) | |
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:16:in `build': /home/vagrant/deployrails/releases/20131113232540/Gemfile not found (Bundler::GemfileNotFound) | |
from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:148:in `definition' | |
from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:116:in `setup' | |
from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `<top (required)>' | |
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
E, [2013-11-13T18:37:33.816267 #40377] ERROR -- : reaped #<Process::Status: pid 41916 exit 1> exec()-ed | |
# ps ax | grep unicorn | |
kaplan@deployrails1103:/home/vagrant/deployrails$ ps ax | grep unicorn | |
40377 ? Sl 0:01 unicorn master -c /etc/unicorn/deployrails.conf.rb -D | |
40382 ? Sl 0:00 unicorn worker[0] -c /etc/unicorn/deployrails.conf.rb -D | |
40384 ? Sl 0:00 unicorn worker[1] -c /etc/unicorn/deployrails.conf.rb -D | |
40387 ? Sl 0:00 unicorn worker[2] -c /etc/unicorn/deployrails.conf.rb -D | |
40391 ? Sl 0:00 unicorn worker[3] -c /etc/unicorn/deployrails.conf.rb -D | |
42313 pts/0 S+ 0:00 grep --color=auto unicorn | |
54381 pts/1 S+ 0:00 tail -f unicorn.log | |
# ls releases | |
root@deployrails1103:/home/vagrant/deployrails/releases# ls -al | |
total 28 | |
drwxrwxr-x 7 kaplan kaplan 4096 Nov 13 18:37 . | |
drwxrwxr-x 5 vagrant deployers 4096 Nov 13 18:37 .. | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:28 20131113232835 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:30 20131113233027 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:34 20131113233425 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:36 20131113233613 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:37 20131113233731 | |
# =============================== | |
# 8 cap production deploy locally | |
I, [2013-11-13T18:38:53.110647 #43443] INFO -- : executing ["/usr/local/bin/unicorn", "-c", "/etc/unicorn/deployrails.conf.rb", "-D", {9=>#<Kgio::UNIXServer:fd 9>}] (in /home/vagrant/deployrails/releases/20131113233850) | |
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:16:in `build': /home/vagrant/deployrails/releases/20131113232540/Gemfile not found (Bundler::GemfileNotFound) | |
from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:148:in `definition' | |
from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:116:in `setup' | |
from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `<top (required)>' | |
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
E, [2013-11-13T18:38:53.151105 #40377] ERROR -- : reaped #<Process::Status: pid 43443 exit 1> exec()-ed | |
# ps ax | grep unicorn | |
kaplan@deployrails1103:/home/vagrant/deployrails$ ps ax | grep unicorn | |
40377 ? Sl 0:01 unicorn master -c /etc/unicorn/deployrails.conf.rb -D | |
40382 ? Sl 0:00 unicorn worker[0] -c /etc/unicorn/deployrails.conf.rb -D | |
40384 ? Sl 0:00 unicorn worker[1] -c /etc/unicorn/deployrails.conf.rb -D | |
40387 ? Sl 0:00 unicorn worker[2] -c /etc/unicorn/deployrails.conf.rb -D | |
40391 ? Sl 0:00 unicorn worker[3] -c /etc/unicorn/deployrails.conf.rb -D | |
43841 pts/0 S+ 0:00 grep --color=auto unicorn | |
54381 pts/1 S+ 0:00 tail -f unicorn.log | |
# ls releases | |
root@deployrails1103:/home/vagrant/deployrails/releases# ls -al | |
total 28 | |
drwxrwxr-x 7 kaplan kaplan 4096 Nov 13 18:38 . | |
drwxrwxr-x 5 vagrant deployers 4096 Nov 13 18:38 .. | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:30 20131113233027 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:34 20131113233425 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:36 20131113233613 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:37 20131113233731 | |
drwxrwxr-x 12 kaplan kaplan 4096 Nov 13 18:38 20131113233850 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment