skyed 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/skyed.rb +1 -1
- data/lib/skyed/commands.rb +3 -0
- data/lib/skyed/run.rb +16 -4
- 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: 131382b709e80832ad9b2c1ab13ed243f4b05fa3
|
4
|
+
data.tar.gz: b5c59a7ebae270bdc93967f2aa018d55f43a4788
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30d08fa187786a4aa52d625fcc38e5f8b93e3ed93d510d93019ed29e0c122d7e742a8a1af6e1ffeea455c4ebf1b30d14354c23f4d5a8c5c04fb6699f3e9ed16a
|
7
|
+
data.tar.gz: 1e09f08c65263731d121d1838f5ae76b1e63e979897b0dacc2016f235a45983371b6efd0f9334e8954a7160c1c2ac689d0768f76055e892dec5ce4a7b3f74c83
|
data/lib/skyed.rb
CHANGED
data/lib/skyed/commands.rb
CHANGED
@@ -34,6 +34,9 @@ command :run do |cmd|
|
|
34
34
|
cmd.flag [:w, :wait_interval], default_value: 30,
|
35
35
|
type: Integer,
|
36
36
|
desc: 'Time to wait for AWS responses'
|
37
|
+
cmd.flag [:j, :custom_json], default_value: '',
|
38
|
+
type: String,
|
39
|
+
desc: 'Custom JSON to pass to OW'
|
37
40
|
cmd.action do |global_options, options, args|
|
38
41
|
Skyed::Run.execute(global_options, options, args)
|
39
42
|
end
|
data/lib/skyed/run.rb
CHANGED
@@ -20,7 +20,7 @@ module Skyed
|
|
20
20
|
instances = running_instances(ow, Skyed::Settings.layer_id)
|
21
21
|
update_custom_cookbooks(ow, Skyed::Settings.stack_id, instances,
|
22
22
|
options[:wait_interval])
|
23
|
-
execute_recipes(ow, args, instances, options
|
23
|
+
execute_recipes(ow, args, instances, options)
|
24
24
|
end
|
25
25
|
|
26
26
|
def deploy_status(ow, id)
|
@@ -103,12 +103,24 @@ module Skyed
|
|
103
103
|
recipes
|
104
104
|
end
|
105
105
|
|
106
|
-
def execute_recipes(
|
106
|
+
def execute_recipes(
|
107
|
+
ow,
|
108
|
+
recipes,
|
109
|
+
instances = nil,
|
110
|
+
options = {})
|
111
|
+
options[:wait_interval] ||= 0
|
112
|
+
options[:custom_json] ||= ''
|
113
|
+
deploy_id = ow.create_deployment(
|
114
|
+
execute_params(recipes, instances, options[:custom_json]))
|
115
|
+
wait_for_deploy(ow, deploy_id, options[:wait_interval])
|
116
|
+
end
|
117
|
+
|
118
|
+
def execute_params(recipes, instances, custom_json)
|
107
119
|
command = { name: 'execute_recipes', args: { recipes: recipes } }
|
108
120
|
deploy_params = { stack_id: Skyed::Settings.stack_id, command: command }
|
121
|
+
deploy_params[:custom_json] = custom_json unless custom_json.empty?
|
109
122
|
deploy_params[:instance_ids] = instances unless instances.nil?
|
110
|
-
|
111
|
-
wait_for_deploy(ow, deploy_id, wait)
|
123
|
+
deploy_params
|
112
124
|
end
|
113
125
|
|
114
126
|
def recipe_in_cookbook(recipe)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skyed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ignasi Fosch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|