capistrano-storm 0.1.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 +7 -0
- data/.editorconfig +19 -0
- data/.gitignore +17 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +51 -0
- data/Rakefile +1 -0
- data/capistrano-storm.gemspec +25 -0
- data/lib/capistrano/storm.rb +1 -0
- data/lib/capistrano/tasks/storm.rake +34 -0
- data/lib/capistrano-storm.rb +0 -0
- metadata +98 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 309f086ef9dd61005e2a1760361bf4ac46c0a35d
|
4
|
+
data.tar.gz: 205891a1f57864f6a6414bbaf9fdcf9b4905fd4c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fae5cb425ba574e182ad3f56c759ce83936d9b812de1bb0ca84140a5ccb64c110736fb627efb8a73ec1ba9a650a68e9154800e4cb2ab7164d4d7feac38e163e6
|
7
|
+
data.tar.gz: 8dd9444e3a5a2a7487aa239f80a2dc248a58e934a44aa62f438facccc7291b0351b8ad5abaad4493aa8ed1f444e6c7e4dc7bee426ce0bfe8fb45ce4a6f0c7407
|
data/.editorconfig
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
; EditorConfig is awesome: http://EditorConfig.org
|
2
|
+
|
3
|
+
root = true
|
4
|
+
|
5
|
+
; UTF-8 charset
|
6
|
+
; Unix-style newlines with a newline ending every file
|
7
|
+
; 2 space indent
|
8
|
+
; Trim trailing whitespace
|
9
|
+
[*]
|
10
|
+
indent_style = space
|
11
|
+
indent_size = 2
|
12
|
+
end_of_line = lf
|
13
|
+
charset = utf-8
|
14
|
+
trim_trailing_whitespace = true
|
15
|
+
insert_final_newline = true
|
16
|
+
|
17
|
+
[*.md]
|
18
|
+
indent_size = 4
|
19
|
+
trim_trailing_whitespace = false
|
data/.gitignore
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 EverTrue
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# Capistrano::Storm
|
2
|
+
|
3
|
+
This gem provides support in Capistrano 3.x for handling the deployment of a Storm Topology.
|
4
|
+
|
5
|
+
Plays nicely with [capistrano-scm-jenkins](https://github.com/lidaobing/capistrano-scm-jenkins).
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'capistrano-storm'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
```bash
|
18
|
+
$ bundle
|
19
|
+
```
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
This Gem requires that your deploy user have *passwordless sudo rights* to run
|
24
|
+
`storm kill` and `storm jar`. See [Capistrano’s Authorisation docs](http://capistranorb.com/documentation/getting-started/authentication-and-authorisation/#toc_8)
|
25
|
+
for a simple example.
|
26
|
+
|
27
|
+
In `Capfile`:
|
28
|
+
```ruby
|
29
|
+
require 'capistrano/storm'
|
30
|
+
```
|
31
|
+
|
32
|
+
In your `config/deploy.rb`:
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
# Storm Topology to deploy from the current_path
|
36
|
+
set :deployed_artifact_filename, 'storm-topology.jar'
|
37
|
+
|
38
|
+
set :topology_class_name, 'com.et.contacts.storm.topology.ContactNotifyTopology'
|
39
|
+
set :topology_name, 'contact-change'
|
40
|
+
|
41
|
+
# Any additional arguments you want to pass to `storm jar`
|
42
|
+
set :topology_args, '5 4 4 5'
|
43
|
+
```
|
44
|
+
|
45
|
+
## Contributing
|
46
|
+
|
47
|
+
1. Fork it ( http://github.com/evertrue/capistrano-storm/fork )
|
48
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
49
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
50
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
51
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
|
4
|
+
Gem::Specification.new do |spec|
|
5
|
+
spec.name = 'capistrano-storm'
|
6
|
+
spec.version = '0.1.0'
|
7
|
+
spec.authors = ['Jeff Byrnes']
|
8
|
+
spec.email = ['jeff@evertrue.com']
|
9
|
+
spec.summary = %q{Capistrano 3 plugin for handling Storm topologies.}
|
10
|
+
spec.description = %q{
|
11
|
+
Capistrano 3 plugin that handles updating & deploying a Storm topology.
|
12
|
+
}
|
13
|
+
spec.homepage = "https://github.com/evertrue/#{spec.name}"
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_dependency 'capistrano', '~> 3.1'
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.5'
|
24
|
+
spec.add_development_dependency 'rake'
|
25
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path('../tasks/storm.rake', __FILE__)
|
@@ -0,0 +1,34 @@
|
|
1
|
+
namespace :storm do
|
2
|
+
desc 'Kill the current topology'
|
3
|
+
task :kill do
|
4
|
+
on roles(:app) do
|
5
|
+
execute(
|
6
|
+
:sudo,
|
7
|
+
'/opt/storm/current/bin/storm',
|
8
|
+
'kill',
|
9
|
+
'-w 0',
|
10
|
+
fetch(:topology_name)
|
11
|
+
)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
desc 'Update the Storm topology with the new one'
|
16
|
+
task :update do
|
17
|
+
on roles(:app) do
|
18
|
+
within release_path do
|
19
|
+
execute(
|
20
|
+
:sudo,
|
21
|
+
'/opt/storm/current/bin/storm',
|
22
|
+
'jar',
|
23
|
+
fetch(:deployed_artifact_filename),
|
24
|
+
fetch(:topology_class_name),
|
25
|
+
fetch(:topology_name),
|
26
|
+
fetch(:topology_args)
|
27
|
+
)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
after 'deploy:publishing', 'storm:kill'
|
34
|
+
after 'storm:kill', 'storm:update'
|
File without changes
|
metadata
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-storm
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jeff Byrnes
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-11-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: capistrano
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.5'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.5'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: "\nCapistrano 3 plugin that handles updating & deploying a Storm topology.\n
|
56
|
+
\ "
|
57
|
+
email:
|
58
|
+
- jeff@evertrue.com
|
59
|
+
executables: []
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- ".editorconfig"
|
64
|
+
- ".gitignore"
|
65
|
+
- CHANGELOG.md
|
66
|
+
- Gemfile
|
67
|
+
- LICENSE.txt
|
68
|
+
- README.md
|
69
|
+
- Rakefile
|
70
|
+
- capistrano-storm.gemspec
|
71
|
+
- lib/capistrano-storm.rb
|
72
|
+
- lib/capistrano/storm.rb
|
73
|
+
- lib/capistrano/tasks/storm.rake
|
74
|
+
homepage: https://github.com/evertrue/capistrano-storm
|
75
|
+
licenses:
|
76
|
+
- MIT
|
77
|
+
metadata: {}
|
78
|
+
post_install_message:
|
79
|
+
rdoc_options: []
|
80
|
+
require_paths:
|
81
|
+
- lib
|
82
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
requirements: []
|
93
|
+
rubyforge_project:
|
94
|
+
rubygems_version: 2.2.2
|
95
|
+
signing_key:
|
96
|
+
specification_version: 4
|
97
|
+
summary: Capistrano 3 plugin for handling Storm topologies.
|
98
|
+
test_files: []
|