mccloud 0.0.19 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d3c2125a74e7e9ced5ad67344fd4a9876a2a0017
4
+ data.tar.gz: c0316c730d6ddecb541d33fb3b5f81471b44ebb1
5
+ SHA512:
6
+ metadata.gz: 10ad1af8d9e4ad7912ad9bddac9dea49b2030f7417fa1e4ad1cea8ac38928ef8e9f67fe2124ed075b3287228c4b4cd9c5d8b2830cf815f7f41434ed6462e093c
7
+ data.tar.gz: bce3be34d62f499937e34694d53d8ecfea535fa55ef170262e99c62b274715f4d15d722bbcd11d187019cdd995b1f2c37e01fd97d952a50e5765cfd17cc600b9
data/.rvmrc CHANGED
@@ -1,4 +1,4 @@
1
- rvm use ruby-1.8.7
1
+ rvm use ruby-2.0
2
2
  #rvm use ruby-1.9.2
3
3
  rvm gemset use mccloud
4
4
  alias mccloud="bundle exec mccloud"
data/.travis.yml ADDED
@@ -0,0 +1,8 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.2
4
+ - 1.9.2-p320
5
+ - 1.9.3
6
+ - 2.0
7
+ notifications:
8
+ irc: "chat.freenode.net#mccloud"
data/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
  # About
4
4
  ## What the hell is mccloud?
5
5
 
6
+ [![Build Status](https://travis-ci.org/jedi4ever/mccloud.png)](https://travis-ci.org/jedi4ever/mccloud)
7
+
6
8
  Over the years I fell in love with [Vagrant](http://vagrantup.com) and wanted to have the same workflow for ec2, kvm, internal clouds etc..
7
9
 
8
10
  Therefore Mccloud aims to be the equivalent of ``vagrant`` but extending it to use providers:
data/Rakefile CHANGED
@@ -1,8 +1,8 @@
1
1
  require 'bundler/setup'
2
2
  Bundler::GemHelper.install_tasks
3
3
 
4
- #desc 'Default: run tests'
5
- #task :default => :test
4
+ desc 'Default: run tests'
5
+ task :default => :test
6
6
 
7
7
  require 'rake'
8
8
  require 'rspec/core/rake_task'
@@ -20,7 +20,7 @@ module Mccloud::Provider
20
20
  if name.start_with?(self.filter)
21
21
  unless self.filter==""
22
22
  name[self.filter]=""
23
- printf "%-10s %-12s %-20s %-20s %-15s %-8s\n",name,vm.id, vm.public_ip_address, vm.private_ip_address,vm.flavor.name,vm.state
23
+ printf "%-10s %-12s %-20s %-20s %-15s %-8s\n",name,vm.id, vm.public_ip_address, vm.private_ip_address,vm.flavor_id,vm.state
24
24
  else
25
25
  env.ui.info "Name: #{name}"
26
26
  env.ui.info "Instance Id: #{vm.id}"
@@ -6,9 +6,9 @@ module Mccloud
6
6
  module Core
7
7
  module VmCommand
8
8
 
9
- def ssh_bootstrap(command,bootstrap_options=nil)
9
+ def ssh_bootstrap(command,bootstrap_options= {})
10
10
  begin
11
- options = bootstrap_options.dup
11
+ options = Hash.new
12
12
 
13
13
  options[:port] = @port
14
14
 
@@ -34,7 +34,7 @@ module Mccloud
34
34
  rescue Net::SSH::AuthenticationFailed
35
35
  raise ::Mccloud::Error, "[#{@name}] - Authentication problem \n"
36
36
  rescue Exception => ex
37
- raise ::Mccloud::Error, "[#{@name}] - Error uploading file #{full_scriptname} #{ex.to_s}\n"
37
+ raise ::Mccloud::Error, "[#{@name}] - Error uploading file #{full_scriptname} #{ex.inspect}\n"
38
38
  end
39
39
  env.ui.info "[#{@name}] - Enabling the bootstrap code to run"
40
40
  result=self.execute("chmod +x /tmp/bootstrap.sh && #{self.sudo_string("/tmp/bootstrap.sh",options)}",options)
@@ -44,6 +44,7 @@ module Mccloud
44
44
  @name ="chef_solo"
45
45
  @log_level="info"
46
46
  @cookbooks_path = []
47
+ @run_list = []
47
48
  @clean_after_run = true
48
49
  end
49
50
 
@@ -80,12 +81,14 @@ module Mccloud
80
81
  #JSON.parse result = Hash
81
82
  #.to_json = String containing JSON formatting of Hash
82
83
 
83
- json=JSON.parse(result).to_json
84
+ @json.merge!(JSON.parse(result))
84
85
 
85
86
  else
86
- json=@json.to_json
87
87
  end
88
88
 
89
+ @json.merge!({:run_list => @run_list })
90
+ json=@json.to_json
91
+
89
92
  cooks=Array.new
90
93
  @cookbooks_path.each do |cook|
91
94
  cooks << File.join("/tmp/"+File.basename(cook))
@@ -178,17 +181,13 @@ module Mccloud
178
181
  def run_list
179
182
  json[:run_list] ||= []
180
183
  end
181
- # Sets the run list to the specified value
182
- def run_list=(value)
183
- json[:run_list] = value
184
- end
185
184
  def add_role(name)
186
185
  name = "role[#{name}]" unless name =~ /^role\[(.+?)\]$/
187
- run_list << name
186
+ @run_list << name
188
187
  end
189
188
  def add_recipe(name)
190
189
  name = "recipe[#{name}]" unless name =~ /^recipe\[(.+?)\]$/
191
- run_list << name
190
+ @run_list << name
192
191
  end
193
192
 
194
193
  def setup_config(template, filename, template_vars)
@@ -2,5 +2,5 @@ module Mccloud
2
2
  end
3
3
 
4
4
  unless defined?(Mccloud::VERSION)
5
- ::Mccloud::VERSION = "0.0.19"
5
+ ::Mccloud::VERSION = "0.0.20"
6
6
  end
data/mccloud.gemspec CHANGED
@@ -14,10 +14,11 @@ Gem::Specification.new do |s|
14
14
  s.required_rubygems_version = ">= 1.3.6"
15
15
  s.rubyforge_project = "mccloud"
16
16
 
17
- s.add_dependency "net-ssh", "~> 2.2.2"
17
+ s.add_dependency "net-ssh", ">= 2.2.2"
18
18
  #s.add_dependency "sshkey"
19
19
  s.add_dependency "net-scp"
20
- s.add_dependency "fog", ">= 1.1.0"
20
+ s.add_dependency "fog", "~> 1.9.0"
21
+ s.add_dependency "excon", "0.24.0"
21
22
 
22
23
  s.add_dependency "json"
23
24
  s.add_dependency "ansi"
metadata CHANGED
@@ -1,248 +1,237 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: mccloud
3
- version: !ruby/object:Gem::Version
4
- hash: 57
5
- prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 19
10
- version: 0.0.19
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.20
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Patrick Debois
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2013-05-29 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
11
+ date: 2014-01-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
21
14
  name: net-ssh
22
- version_requirements: &id001 !ruby/object:Gem::Requirement
23
- none: false
24
- requirements:
25
- - - ~>
26
- - !ruby/object:Gem::Version
27
- hash: 3
28
- segments:
29
- - 2
30
- - 2
31
- - 2
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
32
19
  version: 2.2.2
33
- prerelease: false
34
20
  type: :runtime
35
- requirement: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: net-scp
38
- version_requirements: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
47
21
  prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 2.2.2
27
+ - !ruby/object:Gem::Dependency
28
+ name: net-scp
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
48
34
  type: :runtime
49
- requirement: *id002
50
- - !ruby/object:Gem::Dependency
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
51
42
  name: fog
52
- version_requirements: &id003 !ruby/object:Gem::Requirement
53
- none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 19
58
- segments:
59
- - 1
60
- - 1
61
- - 0
62
- version: 1.1.0
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 1.9.0
48
+ type: :runtime
63
49
  prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 1.9.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: excon
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '='
60
+ - !ruby/object:Gem::Version
61
+ version: 0.24.0
64
62
  type: :runtime
65
- requirement: *id003
66
- - !ruby/object:Gem::Dependency
67
- name: json
68
- version_requirements: &id004 !ruby/object:Gem::Requirement
69
- none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- hash: 3
74
- segments:
75
- - 0
76
- version: "0"
77
63
  prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 0.24.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: json
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
78
76
  type: :runtime
79
- requirement: *id004
80
- - !ruby/object:Gem::Dependency
81
- name: ansi
82
- version_requirements: &id005 !ruby/object:Gem::Requirement
83
- none: false
84
- requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- hash: 3
88
- segments:
89
- - 0
90
- version: "0"
91
77
  prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: ansi
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
92
90
  type: :runtime
93
- requirement: *id005
94
- - !ruby/object:Gem::Dependency
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
95
98
  name: popen4
96
- version_requirements: &id006 !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
99
101
  - - ~>
100
- - !ruby/object:Gem::Version
101
- hash: 31
102
- segments:
103
- - 0
104
- - 1
105
- - 2
102
+ - !ruby/object:Gem::Version
106
103
  version: 0.1.2
107
- prerelease: false
108
104
  type: :runtime
109
- requirement: *id006
110
- - !ruby/object:Gem::Dependency
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ~>
109
+ - !ruby/object:Gem::Version
110
+ version: 0.1.2
111
+ - !ruby/object:Gem::Dependency
111
112
  name: thor
112
- version_requirements: &id007 !ruby/object:Gem::Requirement
113
- none: false
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- hash: 43
118
- segments:
119
- - 0
120
- - 14
121
- - 6
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
122
117
  version: 0.14.6
123
- prerelease: false
124
118
  type: :runtime
125
- requirement: *id007
126
- - !ruby/object:Gem::Dependency
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '>='
123
+ - !ruby/object:Gem::Version
124
+ version: 0.14.6
125
+ - !ruby/object:Gem::Dependency
127
126
  name: highline
128
- version_requirements: &id008 !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
131
129
  - - ~>
132
- - !ruby/object:Gem::Version
133
- hash: 13
134
- segments:
135
- - 1
136
- - 6
137
- - 1
130
+ - !ruby/object:Gem::Version
138
131
  version: 1.6.1
139
- prerelease: false
140
132
  type: :runtime
141
- requirement: *id008
142
- - !ruby/object:Gem::Dependency
143
- name: net-ssh-multi
144
- version_requirements: &id009 !ruby/object:Gem::Requirement
145
- none: false
146
- requirements:
147
- - - ">="
148
- - !ruby/object:Gem::Version
149
- hash: 3
150
- segments:
151
- - 0
152
- version: "0"
153
133
  prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ~>
137
+ - !ruby/object:Gem::Version
138
+ version: 1.6.1
139
+ - !ruby/object:Gem::Dependency
140
+ name: net-ssh-multi
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '>='
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
154
146
  type: :runtime
155
- requirement: *id009
156
- - !ruby/object:Gem::Dependency
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
157
154
  name: bundler
158
- version_requirements: &id010 !ruby/object:Gem::Requirement
159
- none: false
160
- requirements:
161
- - - ">="
162
- - !ruby/object:Gem::Version
163
- hash: 23
164
- segments:
165
- - 1
166
- - 0
167
- - 0
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - '>='
158
+ - !ruby/object:Gem::Version
168
159
  version: 1.0.0
169
- prerelease: false
170
160
  type: :development
171
- requirement: *id010
172
- - !ruby/object:Gem::Dependency
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - '>='
165
+ - !ruby/object:Gem::Version
166
+ version: 1.0.0
167
+ - !ruby/object:Gem::Dependency
173
168
  name: ruby-libvirt
174
- version_requirements: &id011 !ruby/object:Gem::Requirement
175
- none: false
176
- requirements:
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
177
171
  - - ~>
178
- - !ruby/object:Gem::Version
179
- hash: 15
180
- segments:
181
- - 0
182
- - 4
183
- - 0
172
+ - !ruby/object:Gem::Version
184
173
  version: 0.4.0
185
- prerelease: false
186
174
  type: :development
187
- requirement: *id011
188
- - !ruby/object:Gem::Dependency
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ~>
179
+ - !ruby/object:Gem::Version
180
+ version: 0.4.0
181
+ - !ruby/object:Gem::Dependency
189
182
  name: vagrant
190
- version_requirements: &id012 !ruby/object:Gem::Requirement
191
- none: false
192
- requirements:
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
193
185
  - - ~>
194
- - !ruby/object:Gem::Version
195
- hash: 61
196
- segments:
197
- - 0
198
- - 8
199
- - 1
186
+ - !ruby/object:Gem::Version
200
187
  version: 0.8.1
201
- prerelease: false
202
188
  type: :development
203
- requirement: *id012
204
- - !ruby/object:Gem::Dependency
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ~>
193
+ - !ruby/object:Gem::Version
194
+ version: 0.8.1
195
+ - !ruby/object:Gem::Dependency
205
196
  name: rake
206
- version_requirements: &id013 !ruby/object:Gem::Requirement
207
- none: false
208
- requirements:
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
209
199
  - - ~>
210
- - !ruby/object:Gem::Version
211
- hash: 25
212
- segments:
213
- - 0
214
- - 9
215
- version: "0.9"
216
- prerelease: false
200
+ - !ruby/object:Gem::Version
201
+ version: '0.9'
217
202
  type: :development
218
- requirement: *id013
219
- - !ruby/object:Gem::Dependency
220
- name: i18n
221
- version_requirements: &id014 !ruby/object:Gem::Requirement
222
- none: false
223
- requirements:
224
- - - ">="
225
- - !ruby/object:Gem::Version
226
- hash: 3
227
- segments:
228
- - 0
229
- version: "0"
230
203
  prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ~>
207
+ - !ruby/object:Gem::Version
208
+ version: '0.9'
209
+ - !ruby/object:Gem::Dependency
210
+ name: i18n
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - '>='
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
231
216
  type: :runtime
232
- requirement: *id014
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - '>='
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
233
223
  description: Use the same simple commandline api to manage cloud interfaces
234
- email:
224
+ email:
235
225
  - patrick.debois@jedi.be
236
- executables:
226
+ executables:
237
227
  - mccloud
238
228
  - mccloud_old
239
229
  extensions: []
240
-
241
230
  extra_rdoc_files: []
242
-
243
- files:
231
+ files:
244
232
  - .gitignore
245
233
  - .rvmrc
234
+ - .travis.yml
246
235
  - Gemfile
247
236
  - Guardfile
248
237
  - README.md
@@ -449,38 +438,25 @@ files:
449
438
  - templates/ubuntu-10.10-server-amd64/mccloud.erb
450
439
  homepage: http://github.com/jedi4ever/mccloud/
451
440
  licenses: []
452
-
441
+ metadata: {}
453
442
  post_install_message:
454
443
  rdoc_options: []
455
-
456
- require_paths:
444
+ require_paths:
457
445
  - lib
458
- required_ruby_version: !ruby/object:Gem::Requirement
459
- none: false
460
- requirements:
461
- - - ">="
462
- - !ruby/object:Gem::Version
463
- hash: 3
464
- segments:
465
- - 0
466
- version: "0"
467
- required_rubygems_version: !ruby/object:Gem::Requirement
468
- none: false
469
- requirements:
470
- - - ">="
471
- - !ruby/object:Gem::Version
472
- hash: 23
473
- segments:
474
- - 1
475
- - 3
476
- - 6
446
+ required_ruby_version: !ruby/object:Gem::Requirement
447
+ requirements:
448
+ - - '>='
449
+ - !ruby/object:Gem::Version
450
+ version: '0'
451
+ required_rubygems_version: !ruby/object:Gem::Requirement
452
+ requirements:
453
+ - - '>='
454
+ - !ruby/object:Gem::Version
477
455
  version: 1.3.6
478
456
  requirements: []
479
-
480
457
  rubyforge_project: mccloud
481
- rubygems_version: 1.8.25
458
+ rubygems_version: 2.0.6
482
459
  signing_key:
483
- specification_version: 3
460
+ specification_version: 4
484
461
  summary: Cloud integration vagrant style
485
462
  test_files: []
486
-