Nothing happens after Capistrano deploy command
up vote
0
down vote
favorite
I am using Capistrano gem for deploy management of my Ruby on Rails app. Its connected with AWS server, EC2, MySQL Redis. While I am putting my command "cap production deploy" or "cap staging deploy" nothing happens. I just got stuck there.
To add here my SSH key is properly added. And in my AWS security groups, only the authorized IPs are added to have the permission of deploying. My IPs are also added.
But when I add open ports 0.0.0.0/0 in all security groups it allows me to deploy. But I shouldn't add open ports for the sace of application security.
What can be the reason and how to solve these?
screenshot of my console, nothing happens
Below is my deploy.rb file:
SSHKit.config.command_map[:rake] = 'bundle exec rake'
# config valid only for current version of Capistrano
lock '3.8.1'
set :application, 'my_app'
set :repo_url, 'git@gitlab.com:_____'
set :deploy_via, :remote_cache
set :rvm_roles, [:app, :web]
set :rvm_type, :user
set :rvm_ruby_version, 'ruby-2.4.0'
set :log_level, :debug
set :pty, false
set :linked_files, %wconfig/application.yml config/database.yml
set :linked_dirs, %wlog tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/assets public/uploads
set :keep_releases, 10
set :whenever_roles, [:web, :app,:db]
set :whenever_identifier, "#fetch(:application)_#fetch(:stage)"
namespace :deploy do
desc 'restart (upgrade) unicorn server'
task :restart do
invoke 'unicorn:restart'
end
after :finishing, 'deploy:cleanup'
after 'deploy:publishing', 'deploy:restart'
after :restart, :clear_cache do
on roles(:web), in: :groups, limit: 3, wait: 10 do
within release_path do
execute :rake, 'tmp:cache:clear'
end
end
end
end
namespace :delayed_job do
desc 'List of running delayed job workers'
task :list do
on roles(:all) do |host|
execute :ps, 'aux | grep delayed_job'
end
end
desc 'Stop delayed_job workers forcefully'
task :kill do
on roles(:all) do |host|
execute :kill, "-9 $(ps aux | grep delayed_job | awk 'print $2')"
end
end
end
task :upload_secret_files do
on roles(:all) do |host|
begin
execute "mkdir -p #shared_path/config"
rescue
end
upload! 'config/application.yml', "#shared_path/config/application.yml"
upload! 'config/database.yml', "#shared_path/config/database.yml"
end
end
task :log do
on roles(:all) do |host|
execute "tail -f #current_path/log/#fetch(:rails_env).log"
end
end
desc 'Invoke a rake command on the remote server'
task :invoke, [:command] => 'deploy:set_rails_env' do |task, args|
on primary(:app) do
within current_path do
with rails_env: fetch(:rails_env) do
rake args[:command]
end
end
end
end
ruby-on-rails amazon-web-services deployment rubygems capistrano
New contributor
|
show 1 more comment
up vote
0
down vote
favorite
I am using Capistrano gem for deploy management of my Ruby on Rails app. Its connected with AWS server, EC2, MySQL Redis. While I am putting my command "cap production deploy" or "cap staging deploy" nothing happens. I just got stuck there.
To add here my SSH key is properly added. And in my AWS security groups, only the authorized IPs are added to have the permission of deploying. My IPs are also added.
But when I add open ports 0.0.0.0/0 in all security groups it allows me to deploy. But I shouldn't add open ports for the sace of application security.
What can be the reason and how to solve these?
screenshot of my console, nothing happens
Below is my deploy.rb file:
SSHKit.config.command_map[:rake] = 'bundle exec rake'
# config valid only for current version of Capistrano
lock '3.8.1'
set :application, 'my_app'
set :repo_url, 'git@gitlab.com:_____'
set :deploy_via, :remote_cache
set :rvm_roles, [:app, :web]
set :rvm_type, :user
set :rvm_ruby_version, 'ruby-2.4.0'
set :log_level, :debug
set :pty, false
set :linked_files, %wconfig/application.yml config/database.yml
set :linked_dirs, %wlog tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/assets public/uploads
set :keep_releases, 10
set :whenever_roles, [:web, :app,:db]
set :whenever_identifier, "#fetch(:application)_#fetch(:stage)"
namespace :deploy do
desc 'restart (upgrade) unicorn server'
task :restart do
invoke 'unicorn:restart'
end
after :finishing, 'deploy:cleanup'
after 'deploy:publishing', 'deploy:restart'
after :restart, :clear_cache do
on roles(:web), in: :groups, limit: 3, wait: 10 do
within release_path do
execute :rake, 'tmp:cache:clear'
end
end
end
end
namespace :delayed_job do
desc 'List of running delayed job workers'
task :list do
on roles(:all) do |host|
execute :ps, 'aux | grep delayed_job'
end
end
desc 'Stop delayed_job workers forcefully'
task :kill do
on roles(:all) do |host|
execute :kill, "-9 $(ps aux | grep delayed_job | awk 'print $2')"
end
end
end
task :upload_secret_files do
on roles(:all) do |host|
begin
execute "mkdir -p #shared_path/config"
rescue
end
upload! 'config/application.yml', "#shared_path/config/application.yml"
upload! 'config/database.yml', "#shared_path/config/database.yml"
end
end
task :log do
on roles(:all) do |host|
execute "tail -f #current_path/log/#fetch(:rails_env).log"
end
end
desc 'Invoke a rake command on the remote server'
task :invoke, [:command] => 'deploy:set_rails_env' do |task, args|
on primary(:app) do
within current_path do
with rails_env: fetch(:rails_env) do
rake args[:command]
end
end
end
end
ruby-on-rails amazon-web-services deployment rubygems capistrano
New contributor
check your capistrano log file (on your app's logs folder), maybe there's something on the file
– arieljuod
Nov 10 at 17:31
Please post your deploy.rb code here.
– Mohit Kumar
Nov 10 at 20:02
@MohitKumar deploy.rb code is added above just below my post.
– Shakil Mahmood
Nov 10 at 21:20
@arieljuod checked my log file. Nothing unusual there..
– Shakil Mahmood
Nov 10 at 21:21
Did you get any timeout message ?
– Mohit Kumar
Nov 10 at 23:13
|
show 1 more comment
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am using Capistrano gem for deploy management of my Ruby on Rails app. Its connected with AWS server, EC2, MySQL Redis. While I am putting my command "cap production deploy" or "cap staging deploy" nothing happens. I just got stuck there.
To add here my SSH key is properly added. And in my AWS security groups, only the authorized IPs are added to have the permission of deploying. My IPs are also added.
But when I add open ports 0.0.0.0/0 in all security groups it allows me to deploy. But I shouldn't add open ports for the sace of application security.
What can be the reason and how to solve these?
screenshot of my console, nothing happens
Below is my deploy.rb file:
SSHKit.config.command_map[:rake] = 'bundle exec rake'
# config valid only for current version of Capistrano
lock '3.8.1'
set :application, 'my_app'
set :repo_url, 'git@gitlab.com:_____'
set :deploy_via, :remote_cache
set :rvm_roles, [:app, :web]
set :rvm_type, :user
set :rvm_ruby_version, 'ruby-2.4.0'
set :log_level, :debug
set :pty, false
set :linked_files, %wconfig/application.yml config/database.yml
set :linked_dirs, %wlog tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/assets public/uploads
set :keep_releases, 10
set :whenever_roles, [:web, :app,:db]
set :whenever_identifier, "#fetch(:application)_#fetch(:stage)"
namespace :deploy do
desc 'restart (upgrade) unicorn server'
task :restart do
invoke 'unicorn:restart'
end
after :finishing, 'deploy:cleanup'
after 'deploy:publishing', 'deploy:restart'
after :restart, :clear_cache do
on roles(:web), in: :groups, limit: 3, wait: 10 do
within release_path do
execute :rake, 'tmp:cache:clear'
end
end
end
end
namespace :delayed_job do
desc 'List of running delayed job workers'
task :list do
on roles(:all) do |host|
execute :ps, 'aux | grep delayed_job'
end
end
desc 'Stop delayed_job workers forcefully'
task :kill do
on roles(:all) do |host|
execute :kill, "-9 $(ps aux | grep delayed_job | awk 'print $2')"
end
end
end
task :upload_secret_files do
on roles(:all) do |host|
begin
execute "mkdir -p #shared_path/config"
rescue
end
upload! 'config/application.yml', "#shared_path/config/application.yml"
upload! 'config/database.yml', "#shared_path/config/database.yml"
end
end
task :log do
on roles(:all) do |host|
execute "tail -f #current_path/log/#fetch(:rails_env).log"
end
end
desc 'Invoke a rake command on the remote server'
task :invoke, [:command] => 'deploy:set_rails_env' do |task, args|
on primary(:app) do
within current_path do
with rails_env: fetch(:rails_env) do
rake args[:command]
end
end
end
end
ruby-on-rails amazon-web-services deployment rubygems capistrano
New contributor
I am using Capistrano gem for deploy management of my Ruby on Rails app. Its connected with AWS server, EC2, MySQL Redis. While I am putting my command "cap production deploy" or "cap staging deploy" nothing happens. I just got stuck there.
To add here my SSH key is properly added. And in my AWS security groups, only the authorized IPs are added to have the permission of deploying. My IPs are also added.
But when I add open ports 0.0.0.0/0 in all security groups it allows me to deploy. But I shouldn't add open ports for the sace of application security.
What can be the reason and how to solve these?
screenshot of my console, nothing happens
Below is my deploy.rb file:
SSHKit.config.command_map[:rake] = 'bundle exec rake'
# config valid only for current version of Capistrano
lock '3.8.1'
set :application, 'my_app'
set :repo_url, 'git@gitlab.com:_____'
set :deploy_via, :remote_cache
set :rvm_roles, [:app, :web]
set :rvm_type, :user
set :rvm_ruby_version, 'ruby-2.4.0'
set :log_level, :debug
set :pty, false
set :linked_files, %wconfig/application.yml config/database.yml
set :linked_dirs, %wlog tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/assets public/uploads
set :keep_releases, 10
set :whenever_roles, [:web, :app,:db]
set :whenever_identifier, "#fetch(:application)_#fetch(:stage)"
namespace :deploy do
desc 'restart (upgrade) unicorn server'
task :restart do
invoke 'unicorn:restart'
end
after :finishing, 'deploy:cleanup'
after 'deploy:publishing', 'deploy:restart'
after :restart, :clear_cache do
on roles(:web), in: :groups, limit: 3, wait: 10 do
within release_path do
execute :rake, 'tmp:cache:clear'
end
end
end
end
namespace :delayed_job do
desc 'List of running delayed job workers'
task :list do
on roles(:all) do |host|
execute :ps, 'aux | grep delayed_job'
end
end
desc 'Stop delayed_job workers forcefully'
task :kill do
on roles(:all) do |host|
execute :kill, "-9 $(ps aux | grep delayed_job | awk 'print $2')"
end
end
end
task :upload_secret_files do
on roles(:all) do |host|
begin
execute "mkdir -p #shared_path/config"
rescue
end
upload! 'config/application.yml', "#shared_path/config/application.yml"
upload! 'config/database.yml', "#shared_path/config/database.yml"
end
end
task :log do
on roles(:all) do |host|
execute "tail -f #current_path/log/#fetch(:rails_env).log"
end
end
desc 'Invoke a rake command on the remote server'
task :invoke, [:command] => 'deploy:set_rails_env' do |task, args|
on primary(:app) do
within current_path do
with rails_env: fetch(:rails_env) do
rake args[:command]
end
end
end
end
ruby-on-rails amazon-web-services deployment rubygems capistrano
ruby-on-rails amazon-web-services deployment rubygems capistrano
New contributor
New contributor
edited Nov 10 at 21:20
New contributor
asked Nov 10 at 15:08
Shakil Mahmood
13
13
New contributor
New contributor
check your capistrano log file (on your app's logs folder), maybe there's something on the file
– arieljuod
Nov 10 at 17:31
Please post your deploy.rb code here.
– Mohit Kumar
Nov 10 at 20:02
@MohitKumar deploy.rb code is added above just below my post.
– Shakil Mahmood
Nov 10 at 21:20
@arieljuod checked my log file. Nothing unusual there..
– Shakil Mahmood
Nov 10 at 21:21
Did you get any timeout message ?
– Mohit Kumar
Nov 10 at 23:13
|
show 1 more comment
check your capistrano log file (on your app's logs folder), maybe there's something on the file
– arieljuod
Nov 10 at 17:31
Please post your deploy.rb code here.
– Mohit Kumar
Nov 10 at 20:02
@MohitKumar deploy.rb code is added above just below my post.
– Shakil Mahmood
Nov 10 at 21:20
@arieljuod checked my log file. Nothing unusual there..
– Shakil Mahmood
Nov 10 at 21:21
Did you get any timeout message ?
– Mohit Kumar
Nov 10 at 23:13
check your capistrano log file (on your app's logs folder), maybe there's something on the file
– arieljuod
Nov 10 at 17:31
check your capistrano log file (on your app's logs folder), maybe there's something on the file
– arieljuod
Nov 10 at 17:31
Please post your deploy.rb code here.
– Mohit Kumar
Nov 10 at 20:02
Please post your deploy.rb code here.
– Mohit Kumar
Nov 10 at 20:02
@MohitKumar deploy.rb code is added above just below my post.
– Shakil Mahmood
Nov 10 at 21:20
@MohitKumar deploy.rb code is added above just below my post.
– Shakil Mahmood
Nov 10 at 21:20
@arieljuod checked my log file. Nothing unusual there..
– Shakil Mahmood
Nov 10 at 21:21
@arieljuod checked my log file. Nothing unusual there..
– Shakil Mahmood
Nov 10 at 21:21
Did you get any timeout message ?
– Mohit Kumar
Nov 10 at 23:13
Did you get any timeout message ?
– Mohit Kumar
Nov 10 at 23:13
|
show 1 more comment
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Shakil Mahmood is a new contributor. Be nice, and check out our Code of Conduct.
Shakil Mahmood is a new contributor. Be nice, and check out our Code of Conduct.
Shakil Mahmood is a new contributor. Be nice, and check out our Code of Conduct.
Shakil Mahmood is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53240254%2fnothing-happens-after-capistrano-deploy-command%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
check your capistrano log file (on your app's logs folder), maybe there's something on the file
– arieljuod
Nov 10 at 17:31
Please post your deploy.rb code here.
– Mohit Kumar
Nov 10 at 20:02
@MohitKumar deploy.rb code is added above just below my post.
– Shakil Mahmood
Nov 10 at 21:20
@arieljuod checked my log file. Nothing unusual there..
– Shakil Mahmood
Nov 10 at 21:21
Did you get any timeout message ?
– Mohit Kumar
Nov 10 at 23:13