rundock-plugin-hook-serverspec 0.1.0 → 0.2.1
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 +4 -4
- data/README.md +44 -19
- data/lib/rundock/plugin/hook/serverspec.rb +2 -1
- data/lib/rundock/plugin/hook/serverspec/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3f633135dec8d5f5a11dd9204e8ebe8128d60ef
|
4
|
+
data.tar.gz: d782af52cf9f77d30d4769ff20286b344737fa30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 550c10bc5842bba18ce97bbeabbcb2340c1d910de282eee088dc01afe2ae33b39a44a866329375b407c876f7da0121aa56068408dfa5b82459944968169cf49d
|
7
|
+
data.tar.gz: 55d6e536bd49285e18977f8318adcb2e9ec2473adaa054f76acca9616d41d36f2f3748c09bb9976214ec7dc0062e277009af6c29ff5ca3455c021bfffd782963
|
data/README.md
CHANGED
@@ -1,39 +1,64 @@
|
|
1
1
|
# Rundock::Plugin::Hook::Serverspec
|
2
|
+
[](http://badge.fury.io/rb/rundock-plugin-hook-serverspec) [](https://circleci.com/gh/hiracy/rundock-plugin-hook-serverspec/tree/master)
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
4
|
+
[Rundock](https://github.com/hiracy/rundock) plugin for [serverspec](http://serverspec.org) hook.
|
6
5
|
|
7
6
|
## Installation
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem 'rundock-plugin-hook-serverspec'
|
8
|
+
```
|
9
|
+
$ gem install rundock
|
13
10
|
```
|
14
11
|
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
```
|
13
|
+
$ gem install rundock-plugin-hook-serverspec
|
14
|
+
```
|
18
15
|
|
19
|
-
|
16
|
+
## Usage
|
20
17
|
|
21
|
-
|
18
|
+
Edit your operation scenario to hooks.yml like this sample.
|
22
19
|
|
23
|
-
|
20
|
+
```
|
21
|
+
serverspec_test_1: # hook name
|
22
|
+
hook_type: serverspec # hook_type(always specify 'serverspec')
|
23
|
+
pattern: /path/to/serverspec_test_1_spec.rb # serverspec codes file pattern
|
24
|
+
host_properties: /path/to/properties.yml # host specific properties(http://serverspec.org/advanced_tips.html
|
25
|
+
serverspec_test_2:
|
26
|
+
hook_type: serverspec
|
27
|
+
pattern: /path/to/serverspec_test_2_spec.rb
|
28
|
+
```
|
24
29
|
|
25
|
-
|
30
|
+
And edit your operation scenario to "[scenario.yml](https://github.com/hiracy/rundock/blob/master/scenario_sample.yml)" like this sample.
|
26
31
|
|
27
|
-
|
32
|
+
```
|
33
|
+
- node: anyhost-01
|
34
|
+
deploy:
|
35
|
+
- src: /path/to/great/middleware/conf_src.rb # deploy source file from localhost
|
36
|
+
dst: /path/to/great/middleware/conf_dst.rb # deploy destination file to remotehost
|
37
|
+
command:
|
38
|
+
- /etc/init.d/great_middleware start
|
39
|
+
hook:
|
40
|
+
- serverspec_test-1 # enable hook(hooks.yml/serverspec_test_1)
|
41
|
+
- serverspec_test-2
|
42
|
+
---
|
43
|
+
anyhost-01: # see rundock options(https://github.com/hiracy/rundock/blob/master/README.md)
|
44
|
+
host: 192.168.10.11
|
45
|
+
ssh_opts:
|
46
|
+
port: 22
|
47
|
+
user: anyuser
|
48
|
+
key: ~/.ssh/id_rsa
|
49
|
+
```
|
28
50
|
|
29
|
-
|
51
|
+
and execute rundock.
|
30
52
|
|
31
|
-
|
53
|
+
$ rundock do /path/to/your-dir/scenario.yml -k /path/to/your-dir/hooks.yml
|
32
54
|
|
33
55
|
## Contributing
|
34
56
|
|
35
|
-
|
36
|
-
|
57
|
+
1. Fork it ( https://github.com/[my-github-username]/rundock-plugin-operation-itamae/fork )
|
58
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
59
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
60
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
61
|
+
5. Create a new Pull Request
|
37
62
|
|
38
63
|
## License
|
39
64
|
|
@@ -47,7 +47,8 @@ module Rundock
|
|
47
47
|
# anykey2: value2
|
48
48
|
|
49
49
|
class Serverspec < Base
|
50
|
-
def hook(
|
50
|
+
def hook(node_attributes, log_buffer)
|
51
|
+
node_info = node_attributes[0][:nodeinfo]
|
51
52
|
setenv(node_info, @contents)
|
52
53
|
load "#{::File.expand_path(::File.dirname(__FILE__))}/../../../../Rakefile"
|
53
54
|
Logger.info("serverspec started: #{node_info[:nodename]}(#{node_info[:host]})")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rundock-plugin-hook-serverspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hiracy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|