Hello, I recently began experimenting with Capistrano. Deploying our
codebase to a single server (role :app, "ap-1") worked well, but once
I included a secondary application server to the list (role :app,
"ap-1", "ap-2"), things went sideways...
* executing `deploy:setup'
* executing "snip[...]"
servers: ["ap-1", "ap-2"]
Enter passphrase for /home/devuser/.ssh/id_dsa: Enter passphrase for /
home/devuser/.ssh/id_dsa:
You'll note the duplicate requests for a ssh-key "passphrase" in
succession. When provided, I'm prompted for it again, and again. If I
simply [enter] through the process numerous times, I receive the
following...
connection failed for: ap-1 (OpenSSL::PKey::DSAError: Neither PUB key
nor PRIV key:: nested asn1 error), ap-2 (NoMethodError: undefined
method `overwrite' for nil:NilClass)
Passphrase protected DSA keys are used to quickly log-in between all
of our servers. The "devuser" above has a public key registered as an
"authorized_key" with the "deployuser" used to deploy the application
on each server. The keys are set up appropriately and have been
verified. Again, I can successfully deploy to either server
individually using the users/keys in question, without issue, but not
both at once.
My deploy.rb file is embarrassingly simple at this point...
set :application, "appname"
set :repository, "
http://domain.com/svn/appname/"
set :user, "deployuser"
set :use_sudo, false
set :scm, :subversion
set :scm_username, "svnuser"
set :scm_password, "svnpass"
set :deploy_to, "/path/to/#{application}"
role :app, "ap-1" # <= works
role :app, "ap-2" # <= works
role :app, "ap-1", "ap-2" # <= doesn't work
Any ideas where I have gone wrong at such an early stage?
Thanks for the help.
Best,
~ jeremy