forward / capify-cloud

MIT License
25 stars 6 forks source link

Improve multistage support #3

Open nickpeirson opened 12 years ago

nickpeirson commented 12 years ago

We're using capify-cloud and it's working well. We're also using multistage and we've found a way to get it working with capify-cloud:

Our stage files look like:

@capify_cloud = CapifyCloud.new(fetch(:cloud_config, 'config/cloud.production.yml'))
cloud_roles :api

This allows us to load different configs for each stage where we're then overloading the project tag with an appended stage identifier:

:cloud_providers: ['AWS']
:project_tag: "projectname-staging"

:AWS:
  :aws_access_key_id: "ACCESS_KEY"
  :aws_secret_access_key: "SECRET_KEY"
  :regions: ["us-west-1", "us-east-1"]

This works, but it would be a lot slicker if we could tag stages rather than overload the project name.

To take this one step further, it would be good to be able to not have to duplicate config, as it's only the stage that changes. Specifying this directly in the stage file rather than creating new config files would be ideal.

jmonteiro commented 12 years ago

:+1: I've being using this approach for several months now.