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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1843f4bdb5bbd8d540208e8ef84d711fcf65b96b
4
- data.tar.gz: 158663fc5a4b252102ebc5752ed11f0d3f01981d
3
+ metadata.gz: 3f33d3e4561e7709945ac0962af52f1e107ebe96
4
+ data.tar.gz: 92fb7c2300e91c82917c5621af76db96139d8028
5
5
  SHA512:
6
- metadata.gz: 489f67b26443045fe896fa318d70ac1b0d25c83f625b9408e8c577683cc32cd73beb66040ec5f384b2a8b63616c7ac0fa30841b553db1668363a55dc2cec56f3
7
- data.tar.gz: 175565adba3cdb65285df6396612f26eeeafb70f8faa28b1bbc144c4727b2b863325a25133167da0d441e0ae708e7b21c542e322c1ec99bcaa9eb57e74356537
6
+ metadata.gz: 533220c274290c6668d60174f6cabfb3713f34da76b69290c999c12dc8d3616c8ad9f484689450f085f2bcfea60f01365f2e89f6f2d92413a2f764ec39559f8d
7
+ data.tar.gz: c1c51571e9c5ee6428c383cba66356f863f3b90baaea0cd41e9eab78ba061ffe5b1a65d09a6a5d9f868f897d78848ffa4086c46ac3e60852fb5db982b6d63299
@@ -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
- @server_type = nil
21
- say("\nSelect a server...")
22
- choose do |menu|
23
- servers.each do |server|
24
- menu.choice server do @server_type = server end
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
- menu.choice "quit" do exit end
29
+ else
30
+ @server_type = servers.first
27
31
  end
32
+
28
33
  return @server_type
29
34
  end
30
35
 
@@ -1,3 +1,3 @@
1
1
  module OpsTasks
2
- VERSION = "0.3.2"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -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.3.2
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-06-27 00:00:00.000000000 Z
11
+ date: 2015-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails