ops_tasks 0.3.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ops_tasks/deployment.rb +13 -0
- data/lib/ops_tasks/rake_helper.rb +11 -6
- data/lib/ops_tasks/version.rb +1 -1
- data/lib/tasks/ops_tasks.rake +7 -0
- 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: 3f33d3e4561e7709945ac0962af52f1e107ebe96
|
4
|
+
data.tar.gz: 92fb7c2300e91c82917c5621af76db96139d8028
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 533220c274290c6668d60174f6cabfb3713f34da76b69290c999c12dc8d3616c8ad9f484689450f085f2bcfea60f01365f2e89f6f2d92413a2f764ec39559f8d
|
7
|
+
data.tar.gz: c1c51571e9c5ee6428c383cba66356f863f3b90baaea0cd41e9eab78ba061ffe5b1a65d09a6a5d9f868f897d78848ffa4086c46ac3e60852fb5db982b6d63299
|
data/lib/ops_tasks/deployment.rb
CHANGED
@@ -32,6 +32,19 @@ module OpsTasks
|
|
32
32
|
return id
|
33
33
|
end
|
34
34
|
|
35
|
+
def setup
|
36
|
+
print "#{@project}: Preparing setup... "
|
37
|
+
id = @client.create_deployment(
|
38
|
+
:stack_id => @stack_id,
|
39
|
+
:instance_ids => instance_ids,
|
40
|
+
:command => {
|
41
|
+
name: "setup"
|
42
|
+
}
|
43
|
+
)[:deployment_id]
|
44
|
+
puts "successful"
|
45
|
+
return id
|
46
|
+
end
|
47
|
+
|
35
48
|
def update_cookbooks
|
36
49
|
print "#{@project}: Preparing cookbook update... "
|
37
50
|
|
@@ -17,14 +17,19 @@ module OpsTasks
|
|
17
17
|
|
18
18
|
def self.select_server_type
|
19
19
|
check_for_env_vars
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
20
|
+
if servers.size > 1
|
21
|
+
@server_type = nil
|
22
|
+
say("\nSelect a server...")
|
23
|
+
choose do |menu|
|
24
|
+
servers.each do |server|
|
25
|
+
menu.choice server do @server_type = server end
|
26
|
+
end
|
27
|
+
menu.choice "quit" do exit end
|
25
28
|
end
|
26
|
-
|
29
|
+
else
|
30
|
+
@server_type = servers.first
|
27
31
|
end
|
32
|
+
|
28
33
|
return @server_type
|
29
34
|
end
|
30
35
|
|
data/lib/ops_tasks/version.rb
CHANGED
data/lib/tasks/ops_tasks.rake
CHANGED
@@ -17,4 +17,11 @@ namespace :ops_tasks do
|
|
17
17
|
deploy_id = deployment.update_cookbooks
|
18
18
|
deployment.wait_for_completion(deploy_id, "update cookbooks")
|
19
19
|
end
|
20
|
+
|
21
|
+
desc "run setup recipe"
|
22
|
+
task :setup => :environment do
|
23
|
+
deployment = OpsTasks::RakeHelper.create_deployment
|
24
|
+
deploy_id = deployment.setup
|
25
|
+
deployment.wait_for_completion(deploy_id, "setup")
|
26
|
+
end
|
20
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ops_tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Prokesch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|