toquen 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -0
- data/lib/toquen/aws.rb +6 -0
- data/lib/toquen/version.rb +1 -1
- data/toquen.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4898328afa8282ce9598ca1aad43ac4604bd416
|
4
|
+
data.tar.gz: ecdab549c9ac27456733f248d9c1af9b375cb6e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90c4bcf4c1d15d72aa98442840be6687f755647eed46bf83ec5663ceaa14741c72fd297c354eec34d03492727d50a231c121c2f3027117da5988e28feeb85cb4
|
7
|
+
data.tar.gz: 708639a30d3457121cfa55adda961d8df0ff52e361dc7e2f19486e22fe4b7b2a782354958ca81dd56ec54a7d0cc225b5d71d1c2cbd3aeb85299cb1a8aa866124
|
data/README.md
CHANGED
@@ -169,6 +169,29 @@ This happens on every cook, and can be run separately as:
|
|
169
169
|
cap <role name> update_appconfig
|
170
170
|
```
|
171
171
|
|
172
|
+
## External Capistrano Integration
|
173
|
+
If you have applications that are deployed via capistrano, you can use Toquen to dynamically configure where these applications are deployed based on their roles. This way, you don't have to keep editing your *config/deploy/production.rb* file every time a server is added or removed.
|
174
|
+
|
175
|
+
For example, let's say we have an application that should be deployed to all servers with a role of "web". A *config/deploy/production.rb* file could look like this:
|
176
|
+
|
177
|
+
```ruby
|
178
|
+
require 'toquen'
|
179
|
+
|
180
|
+
set :aws_access_key_id, "AKEYAKEY"
|
181
|
+
set :aws_secret_access_key, "AKEYID"
|
182
|
+
set :aws_regions, ['us-east-1']
|
183
|
+
|
184
|
+
Toquen.servers_with_role('web').each do | details|
|
185
|
+
server details[:external_ip], roles: %w{web app db}
|
186
|
+
end
|
187
|
+
|
188
|
+
set :applicationdir, "/home/deploy/webapp"
|
189
|
+
set :rails_env, "production"
|
190
|
+
set :branch, 'master'
|
191
|
+
...
|
192
|
+
```
|
193
|
+
|
194
|
+
Just make sure to add the toquen gem to your Gemfile, and then you can use capistrano per usual to deploy.
|
172
195
|
|
173
196
|
## Additional Cap Tasks
|
174
197
|
There are a few other helper cap tasks as well - to see them, run:
|
data/lib/toquen/aws.rb
CHANGED
data/lib/toquen/version.rb
CHANGED
data/toquen.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ["lib"]
|
19
|
-
gem.add_dependency('capistrano', '
|
19
|
+
gem.add_dependency('capistrano', '>= 3.0.1')
|
20
20
|
gem.add_dependency('aws-sdk')
|
21
21
|
gem.add_dependency('terminal-table')
|
22
22
|
gem.add_dependency('term-ansicolor')
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toquen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Muller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.0.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.0.1
|
27
27
|
- !ruby/object:Gem::Dependency
|