forward / capify-cloud Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
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.
I have the following ec2 setup:
server-1 Tag: Roles => "app"
server-2 Tag: Roles => "solr"
And have put the following in my config/deploy.rb:
cloud_roles :app, :solr
But when I execute the following command, capistrano only connects to the solr instance, not to both:
cap app solr shell
* 16:10:56 == Currently executing `app'
* 16:10:56 == Currently executing `solr'
* 16:10:56 == Currently executing `shell'
cap> date
[establishing connection(s) to <server2-ip>]
Similarly, when I reverse the order (cap solr app shell
), it connects to server-1, so it appears that the roles are overwriting each other rather than being additive.
As a workaround, I can use the following config:
cloud_roles :name => :app, :options=>{ :default => true }
cloud_roles :name => :solr, :options=>{ :default => true }
And then simply calling cap shell
works as desired, but the documentation describing this configuration has a warning about this not working with load balancers, so I'm not sure if this is the correct approach.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.