capistrano-stretcher 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6eb32df62c7426e64ac97effd685d1f3ccc7e796
4
- data.tar.gz: aac0d3cf7eaba2572aebdbc812f8e4e01215dbef
3
+ metadata.gz: e8e5f3a71942a87223377de95f967dafc0c6d98a
4
+ data.tar.gz: beaf3211fa458ac234f6c29ce9e7d7279d23f7ae
5
5
  SHA512:
6
- metadata.gz: 3293cd4abe640a2a1987a00557b17f003cc679096d4c896be0809106b2d41d3281dcf13ff693cc1a255d8180e720b399d0d8ac152f84ac1b6e27b08ee6d25f5f
7
- data.tar.gz: 9e47a94761e8ef7f1124bc56c29c1df2c40b8bef9cad9a435a183630df2fa52972b7eebfb147919183b6f429ed4468cfd20edd091dd18c08cefa72971e6bfbf0
6
+ metadata.gz: 395fe44311ad2536a4feaeaf34f3ed6d717dba1b051c2bf38cd7db7bc4aac35bc636fc006f6d6e99fc351e177180c12e7d98bb5171975a9bfb4b6131a966b363
7
+ data.tar.gz: 8020d46593226d2f79b09b8a888b9f53b7b178379c8c747e70b4b96bf340033c07609c114defa4b641bac94736d26ae9e70cbef2c4a1626223ff5ff011a789a8
data/README.md CHANGED
@@ -20,7 +20,7 @@ Or install it yourself as:
20
20
 
21
21
  ## Requirements
22
22
 
23
- capistrano-stretcher requires target server for building to application assets. this server should be installed folloing packages:
23
+ capistrano-stretcher requires target server for building to application assets. This server should be installed the following packages:
24
24
 
25
25
  * git
26
26
  * rsync
@@ -31,14 +31,20 @@ capistrano-stretcher requires target server for building to application assets.
31
31
  * aws-cli
32
32
  * consul
33
33
 
34
- target server build assets, upload assets to AWS S3 and invoke `consul event` automatically. so target server can access AWS s3 via aws-cli and join your deployment consul cluster.
34
+ target server builds assets, uploads assets to AWS S3 and invokes `consul event` automatically. So target server can access AWS s3 via aws-cli and join your deployment consul cluster.
35
35
 
36
36
  ## Usage
37
37
 
38
- You need to add `require "capistrano/stretcher" to Capfile` and add `config/deploy.rb` following variables:
38
+ You need to add `require "capistrano/stretcher"` to Capfile and add `config/deploy.rb` following variables:
39
39
 
40
- ```
40
+ ```ruby
41
41
  role :build, ['your-target-server.lan'], :no_release => true
42
+
43
+ # If your build server is accessible to consul cluster, then set the same server
44
+ # If different, set a server that can access consul cluster
45
+ # just to kick consul event!
46
+ role :consul, ['your-target-server.lan'], :no_release => true
47
+
42
48
  set :application, 'your-application'
43
49
  set :deploy_to, '/var/www'
44
50
  set :deploy_roles, 'www,batch'
@@ -79,7 +85,12 @@ and invoke
79
85
  * `consul event -name deploy_www_staging s3://.../manifest_www.yml`
80
86
  * `consul event -name deploy_batch_staging s3://.../manifest_batch.yml`
81
87
 
82
- with `cap staging stretcher:deploy` command on target server. When it's invoked with `cap production stretcher:deploy`, capistrano-strecher replace suffix `staging` to `production`.
88
+ with `cap staging stretcher:deploy` command on target server. When it's invoked with `cap production stretcher:deploy`, capistrano-stretcher replace suffix `staging` to `production`.
89
+
90
+ ## Related Projects
91
+
92
+ * [capistrano-stretcher-rails](https://github.com/pepabo/capistrano-stretcher-rails)
93
+ * [capistrano-stretcher-npm](https://github.com/pepabo/capistrano-stretcher-npm)
83
94
 
84
95
  ## Development
85
96
 
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "capistrano-stretcher"
7
- spec.version = "0.1.0"
7
+ spec.version = "0.2.0"
8
8
  spec.authors = ["SHIBATA Hiroshi", "Uchio Kondo"]
9
9
  spec.email = ["hsbt@ruby-lang.org", "udzura@udzura.jp"]
10
10
 
@@ -29,6 +29,10 @@ namespace :stretcher do
29
29
  roles(fetch(:application_builder_roles, [:build]))
30
30
  end
31
31
 
32
+ def consul_roles
33
+ roles(fetch(:consul_roles, [:consul]))
34
+ end
35
+
32
36
  task :mark_deploying do
33
37
  set :deploying, true
34
38
  end
@@ -139,7 +143,7 @@ namespace :stretcher do
139
143
  desc "Kick the stretcher's deploy event via Consul"
140
144
  task :kick_stretcher do
141
145
  fetch(:deploy_roles).split(',').each do |target_role|
142
- on application_builder_roles do
146
+ on consul_roles do
143
147
  opts = ["-name deploy_#{target_role}_#{fetch(:stage)}"]
144
148
  opts << "-node #{ENV['TARGET_HOSTS']}" if ENV['TARGET_HOSTS']
145
149
  opts << "#{fetch(:manifest_path)}/manifest_#{target_role}_#{fetch(:stage)}.yml"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-stretcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - SHIBATA Hiroshi
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2015-12-10 00:00:00.000000000 Z
12
+ date: 2016-03-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -107,9 +107,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.5.0
110
+ rubygems_version: 2.2.3
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: capistrano task for stretcher.
114
114
  test_files: []
115
- has_rdoc: