I am using the Rubber gem to deploy on Amazon ec2.
It deploys and configures the ubuntu instance well but I need to install additional modules (not ruby modules) on the server. how can I run additional scripts using rubber during the deployment?
A code sample would be appreciated since This is the first time I am doing this kind of thing.
I am using the Rubber gem to deploy on Amazon ec2. It deploys and
Share
I had a similar issue with wanting to install the NewRelic server monitor on all of my EC2 instances. I ended up creating a new role (‘newrelic’) and adding it to all of my servers.
Making a custom role is straightforward:
config/rubber/deploy-[rolename].rb(by copying an existing one):install,:bootstrap, and:start/:stop/:restarttasks as required for your moduleconfig/rubber/rubber-[rolename].rbconfig/rubber/role/[rolename]directory and add any required files (such as[rolename]-upstart.conf)cap rubber:add_roleIt’s easiest to start by copying an existing role and tweaking it to do what you want.
Jury is still out on whether a custom role is the right way to do this. It makes some sense for newrelic, since that installs a daemon that needs to get monitored, but it feels very heavyweight for most custom configuration.