2013-08-07 1 views
1

처음으로 카피 스트라 노와 함께한 첫날, 나는 루비 멍청 아. 내가 cap production deploy를 실행할 때 내가 얻을 : (아래 보시 절반 방법에 대해 "캡이 중단!")배포 도중 카피 스트라노가 중단되는 이유는 무엇입니까?

DEBUG Uploading /tmp/git-ssh.sh 0.0% 
INFO Uploading /tmp/git-ssh.sh 100.0% 
INFO [a4358a68] Running /usr/bin/env chmod +x /tmp/git-ssh.sh on 205.149.129.67 
DEBUG [a4358a68] Command: /usr/bin/env chmod +x /tmp/git-ssh.sh 
INFO [a4358a68] Finished in 0.094 seconds command successful. 
INFO [7e2d6b30] Running /usr/bin/env git ls-remote [email protected]:johnnyfreeman/ng-phrases-node.git on 205.149.129.67 
DEBUG [7e2d6b30] Command: (GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/git-ssh.sh /usr/bin/env git ls-remote [email protected]:johnnyfreeman/ng-phrases-node.git) 
DEBUG [7e2d6b30] 870ca21b256ec53ffba50da1d8ecf7cb4c36e561 
DEBUG [7e2d6b30]   
DEBUG [7e2d6b30] HEAD 
DEBUG [7e2d6b30]  
DEBUG [7e2d6b30] 870ca21b256ec53ffba50da1d8ecf7cb4c36e561 
DEBUG [7e2d6b30]   
DEBUG [7e2d6b30] refs/heads/master 
DEBUG [7e2d6b30]  
INFO [7e2d6b30] Finished in 2.289 seconds command successful. 
INFO [982c4c8c] Running /usr/bin/env mkdir -pv /home/deploy/ng-phrases-node/shared /home/deploy/ng-phrases-node/releases on 205.149.129.67 
DEBUG [982c4c8c] Command: /usr/bin/env mkdir -pv /home/deploy/ng-phrases-node/shared /home/deploy/ng-phrases-node/releases 
INFO [982c4c8c] Finished in 1.084 seconds command successful. 
DEBUG [b52bf507] Running /usr/bin/env [ -f /home/deploy/ng-phrases-node/repo/HEAD ] on 205.149.129.67 
DEBUG [b52bf507] Command: [ -f /home/deploy/ng-phrases-node/repo/HEAD ] 
DEBUG [b52bf507] Finished in 1.151 seconds command successful. 
INFO The repository mirror is at /home/deploy/ng-phrases-node/repo 
DEBUG [5a6d473a] Running /usr/bin/env if test ! -d /home/deploy/ng-phrases-node/repo; then echo "Directory does not exist '/home/deploy/ng-phrases-node/repo'" 1>&2; false; fi on 205.149.129.67 
DEBUG [5a6d473a] Command: if test ! -d /home/deploy/ng-phrases-node/repo; then echo "Directory does not exist '/home/deploy/ng-phrases-node/repo'" 1>&2; false; fi 
DEBUG [5a6d473a] Finished in 1.022 seconds command successful. 
INFO [ebde0a3b] Running /usr/bin/env git remote update on 205.149.129.67 
DEBUG [ebde0a3b] Command: cd /home/deploy/ng-phrases-node/repo && /usr/bin/env git remote update 
DEBUG [ebde0a3b] Fetching origin 
DEBUG [ebde0a3b]  
INFO [ebde0a3b] Finished in 1.485 seconds command successful. 
DEBUG [42faf760] Running /usr/bin/env if test ! -d /home/deploy/ng-phrases-node/repo; then echo "Directory does not exist '/home/deploy/ng-phrases-node/repo'" 1>&2; false; fi on 205.149.129.67 
DEBUG [42faf760] Command: if test ! -d /home/deploy/ng-phrases-node/repo; then echo "Directory does not exist '/home/deploy/ng-phrases-node/repo'" 1>&2; false; fi 
DEBUG [42faf760] Finished in 1.195 seconds command successful. 
INFO [7c34b6a2] Running /usr/bin/env git clone --branch master --depth 1 --recursive --no-hardlinks /home/deploy/ng-phrases-node/repo /home/deploy/ng-phrases-node/releases/20130807190743 on 205.149.129.67 
DEBUG [7c34b6a2] Command: cd /home/deploy/ng-phrases-node/repo && (GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/git-ssh.sh /usr/bin/env git clone --branch master --depth 1 --recursive --no-hardlinks /home/deploy/ng-phrases-node/repo /home/deploy/ng-phrases-node/releases/20130807190743) 
DEBUG [7c34b6a2] warning: --depth is ignored in local clones; use file:// instead. 
DEBUG [7c34b6a2]  
DEBUG [7c34b6a2] Cloning into '/home/deploy/ng-phrases-node/releases/20130807190743'... 
DEBUG [7c34b6a2]  
DEBUG [7c34b6a2] done. 
DEBUG [7c34b6a2]  
INFO [7c34b6a2] Finished in 0.259 seconds command successful. 
INFO [e945e1c7] Running /usr/bin/env rm -rf /home/deploy/ng-phrases-node/current on 205.149.129.67 
DEBUG [e945e1c7] Command: /usr/bin/env rm -rf /home/deploy/ng-phrases-node/current 
INFO [e945e1c7] Finished in 1.062 seconds command successful. 
INFO [51d6629e] Running /usr/bin/env ln -s /home/deploy/ng-phrases-node/releases/20130807190743 /home/deploy/ng-phrases-node/current on 205.149.129.67 
DEBUG [51d6629e] Command: /usr/bin/env ln -s /home/deploy/ng-phrases-node/releases/20130807190743 /home/deploy/ng-phrases-node/current 
INFO [51d6629e] Finished in 0.074 seconds command successful. 
cap aborted! 
Your filter `(no filter)` would remove all matching servers 
/home/johnny/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0.pre14/lib/capistrano/configuration/servers.rb:73:in `filtered_servers' 
/home/johnny/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0.pre14/lib/capistrano/configuration/servers.rb:53:in `filter' 
/home/johnny/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0.pre14/lib/capistrano/configuration/servers.rb:48:in `fetch_roles' 
/home/johnny/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0.pre14/lib/capistrano/configuration/servers.rb:17:in `roles_for' 
/home/johnny/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0.pre14/lib/capistrano/configuration.rb:41:in `roles_for' 
/home/johnny/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0.pre14/lib/capistrano/dsl/env.rb:39:in `roles' 
/home/johnny/Projects/ng-phrases-node/Capfile:30:in `block (2 levels) in <top (required)>' 
/home/johnny/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0.pre14/lib/capistrano/dsl.rb:14:in `invoke' 
/home/johnny/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0.pre14/lib/capistrano/tasks/deploy.rake:18:in `block (2 levels) in <top (required)>' 
/home/johnny/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0.pre14/lib/capistrano/dsl.rb:14:in `invoke' 
/home/johnny/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0.pre14/lib/capistrano/tasks/framework.rake:66:in `block (2 levels) in <top (required)>' 
/home/johnny/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0.pre14/lib/capistrano/tasks/framework.rake:65:in `each' 
/home/johnny/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0.pre14/lib/capistrano/tasks/framework.rake:65:in `block in <top (required)>' 
/home/johnny/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0.pre14/lib/capistrano/application.rb:12:in `run' 
/home/johnny/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0.pre14/bin/cap:3:in `<top (required)>' 
/home/johnny/.rvm/gems/ruby-2.0.0-p247/bin/cap:23:in `load' 
/home/johnny/.rvm/gems/ruby-2.0.0-p247/bin/cap:23:in `<main>' 
/home/johnny/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval' 
/home/johnny/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>' 
Tasks: TOP => deploy:restart 
(See full trace by running task with --trace) 

난 정말 문제가 여기 모르겠어요 그리고 내가 아무것도 표시되지 않습니다 Capistrano 및 필터에 관한 문서.

다른 정보가 여기에 관련되어 있을지 확실하지 않으므로 무엇이든지 남겨두면 알려주세요.

감사합니다.

답변

0

Capistrano 3의 배포 작업은 deploy : restart라는 작업에 따라 다릅니다. 기본 배포 흐름의 다른 작업과 달리 deploy : restart의 동작은 미리 정의되어 있지 않습니다. 사용하는 응용 프로그램 서버에 따라 사용자 정의해야합니다. cap install을 실행할 때 이와 비슷한 모양의 Capfile에서 편집 할 수있는 스켈레톤 작업이 만들어집니다.

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') 
    end 
end 

on roles(:app) 당신이 설정에서 응용 프로그램 역할을 준 서버에이 방법을 실행하기 위해 카피 스트라 노를 알려줍니다// production.rb를 배포합니다. 제 생각에는 어떤 서버에도이 역할을 할당하지 않았기 때문에 카피 스트라 노는이 작업을 실행할 위치가 없다고 불평하고 있습니다. 이제이 작업을 수정하여 다른 역할로 실행할 수 있습니다. 그러나 링크 된 파일 및 디렉토리와 관련된 미리 정의 된 작업은 앱 역할을 참조하기 때문에이를 사용하면 (예 : database.yml) capistrano가이 오류를 다시 발생시킵니다. 따라서 더 나은 선택은 서버에 앱 역할을 부여하는 것입니다.

관련 문제