I'm working on building a rubber cluster with the 1.0.2 gem. I've
built a staging instance with ROLES=web,app,db:primary=true without a
problem, but I'm running in to an issue building the real thing. I'm
trying to build two instances, one web,app (as webapp01), and one
db:primary=true (as db01).
When bootstrapping, I ran in to the following error:
* executing "sudo -p 'sudo password: ' sh -c 'cd
/mnt/app-production/releases/20091002203700 &&
FILE=\"role/mysql_master|role/db/my.cnf\" RUBBER_ENV=\"production\"
rake rubber:config'"
servers: ["db01.mydomain.com"]
[db01.mydomain.com] executing command
** [out :: db01.mydomain.com] (in /mnt/app-production/releases/20091002203700)
** [out :: db01.mydomain.com] Instance not found for host: db01
command finished
failed: "sh -c 'sudo -p '\\''sudo password: '\\'' sh -c '\\''cd
/mnt/app-production/releases/20091002203700 &&
FILE=\"role/mysql_master|role/db/my.cnf\" RUBBER_ENV=\"production\"
rake rubber:config'\\'''" on db01.mydomain.com
From looking at the rubber:config task, it tries to get the instance
from Rubber::Configuration, which loads the instances from
config/deploy/instance-production.yml on the server. Since I'm
deploying from git, that file does not exist. The temporary solution
is to add & push instance-production.yml after cap rubber:create and
before cap rubber:bootstrap.
A better solution may be to scp instance-production.yml to /tmp on the
server, then have ConfigHolder#initialize check there as well. If that
sounds good to you, I'll fork and add that, then send you the pull
request.
Tobias