builderator 1.1.8 → 1.1.9

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: 52ba96400e257cab5d027e0660517fc8f9a441e7
4
- data.tar.gz: 96427250ed38ca68e25c15e9929688a5b8b0eabd
3
+ metadata.gz: 4be75ea4f2312a202b61cde466231fb1199ec69b
4
+ data.tar.gz: cac52d00a1baffa7f896163ea2521bf33549df17
5
5
  SHA512:
6
- metadata.gz: f805d125bf84917a960d10f53b26d34b2ba12553ee82385e45b2879ba21bfa58ce7b55d3519bf85b54ee99a060f20becda48b848d824431a402e6cde918b97b1
7
- data.tar.gz: ea3ad354a1a0a9e37e7fab78cdb8b491d5010c2db4d374c7bd821f4fb2579a119dceba437938fab90f50ecd435bb7588a9b04ead36ddacb0565318da20e36dd8
6
+ metadata.gz: 0f35cc3cdc9c58b7af961b94fb4c4c27d839808e0bed7f5b65e9c277949b31ecb6ece6cc95fa0d7029bc4355cd79c628a3a417a37c6661609d44d6f3ab2ab6de
7
+ data.tar.gz: a2e37ccb5da6048e08c9f3f078dc5ad2437aeb7dc59f07b39274b27f323813b60b1b122a498552b105910f71de6019cd5fdebd01aa4f1c94624a423b04ccc417
data/Gemfile.lock CHANGED
@@ -5,6 +5,7 @@ PATH
5
5
  aws-sdk (~> 2.0)
6
6
  berkshelf (~> 4.3)
7
7
  chef (~> 12.5)
8
+ childprocess (~> 0.5)
8
9
  dep_selector (~> 1.0)
9
10
  faraday_middleware (~> 0.10.0)
10
11
  ignorefile
@@ -15,12 +16,12 @@ GEM
15
16
  specs:
16
17
  addressable (2.4.0)
17
18
  ast (2.3.0)
18
- aws-sdk (2.3.14)
19
- aws-sdk-resources (= 2.3.14)
20
- aws-sdk-core (2.3.14)
19
+ aws-sdk (2.4.3)
20
+ aws-sdk-resources (= 2.4.3)
21
+ aws-sdk-core (2.4.3)
21
22
  jmespath (~> 1.0)
22
- aws-sdk-resources (2.3.14)
23
- aws-sdk-core (= 2.3.14)
23
+ aws-sdk-resources (2.4.3)
24
+ aws-sdk-core (= 2.4.3)
24
25
  berkshelf (4.3.5)
25
26
  addressable (~> 2.3, >= 2.3.4)
26
27
  berkshelf-api-client (~> 2.0, >= 2.0.2)
@@ -57,41 +58,43 @@ GEM
57
58
  celluloid-io (0.16.2)
58
59
  celluloid (>= 0.16.0)
59
60
  nio4r (>= 1.1.0)
60
- chef (12.7.2)
61
- chef-config (= 12.7.2)
62
- chef-zero (~> 4.5)
61
+ chef (12.5.1)
62
+ chef-config (= 12.5.1)
63
+ chef-zero (~> 4.2, >= 4.2.2)
63
64
  diff-lcs (~> 1.2, >= 1.2.4)
64
65
  erubis (~> 2.7)
65
66
  ffi-yajl (~> 2.2)
66
67
  highline (~> 1.6, >= 1.6.9)
67
- mixlib-authentication (~> 1.4)
68
+ mixlib-authentication (~> 1.3)
68
69
  mixlib-cli (~> 1.4)
69
70
  mixlib-log (~> 1.3)
70
71
  mixlib-shellout (~> 2.0)
71
- net-ssh (>= 2.9, < 4.0)
72
+ net-ssh (~> 2.6)
72
73
  net-ssh-multi (~> 1.1)
73
74
  ohai (>= 8.6.0.alpha.1, < 9)
74
75
  plist (~> 3.1.0)
75
- proxifier (~> 1.0)
76
- rspec-core (~> 3.4)
77
- rspec-expectations (~> 3.4)
78
- rspec-mocks (~> 3.4)
76
+ pry (~> 0.9)
77
+ rspec-core (~> 3.2)
78
+ rspec-expectations (~> 3.2)
79
+ rspec-mocks (~> 3.2)
79
80
  rspec_junit_formatter (~> 0.2.0)
80
81
  serverspec (~> 2.7)
81
82
  specinfra (~> 2.10)
82
83
  syslog-logger (~> 1.6)
83
- uuidtools (~> 2.1.5)
84
- chef-config (12.7.2)
84
+ chef-config (12.5.1)
85
85
  mixlib-config (~> 2.0)
86
86
  mixlib-shellout (~> 2.0)
87
- chef-zero (4.6.2)
87
+ chef-zero (4.8.0)
88
88
  ffi-yajl (~> 2.2)
89
89
  hashie (>= 2.0, < 4.0)
90
90
  mixlib-log (~> 1.3)
91
- rack
91
+ rack (< 2)
92
92
  uuidtools (~> 2.1)
93
+ childprocess (0.5.9)
94
+ ffi (~> 1.0, >= 1.0.11)
93
95
  cleanroom (1.0.0)
94
- dep-selector-libgecode (1.2.0)
96
+ coderay (1.1.1)
97
+ dep-selector-libgecode (1.3.0)
95
98
  dep_selector (1.0.3)
96
99
  dep-selector-libgecode (~> 1.0)
97
100
  ffi (~> 1.9)
@@ -101,8 +104,8 @@ GEM
101
104
  multipart-post (>= 1.2, < 3)
102
105
  faraday_middleware (0.10.0)
103
106
  faraday (>= 0.7.4, < 0.10)
104
- ffi (1.9.10)
105
- ffi-yajl (2.2.3)
107
+ ffi (1.9.14)
108
+ ffi-yajl (2.3.0)
106
109
  libyajl2 (~> 1.2)
107
110
  hashie (3.4.4)
108
111
  highline (1.7.8)
@@ -110,16 +113,16 @@ GEM
110
113
  httpclient (2.7.2)
111
114
  ignorefile (1.1.0)
112
115
  ipaddress (0.8.3)
113
- jmespath (1.2.4)
114
- json_pure (>= 1.8.1)
115
- json (1.8.3)
116
- json_pure (1.8.3)
116
+ jmespath (1.3.1)
117
+ json (2.0.2)
117
118
  libyajl2 (1.2.0)
119
+ method_source (0.8.2)
118
120
  minitar (0.5.4)
119
- mixlib-archive (0.1.0)
121
+ mixlib-archive (0.2.0)
122
+ mixlib-log
120
123
  mixlib-authentication (1.4.1)
121
124
  mixlib-log
122
- mixlib-cli (1.6.0)
125
+ mixlib-cli (1.7.0)
123
126
  mixlib-config (2.2.1)
124
127
  mixlib-log (1.6.0)
125
128
  mixlib-shellout (2.2.6)
@@ -128,7 +131,7 @@ GEM
128
131
  multipart-post (2.0.0)
129
132
  net-scp (1.2.1)
130
133
  net-ssh (>= 2.6.5)
131
- net-ssh (3.1.1)
134
+ net-ssh (2.9.4)
132
135
  net-ssh-gateway (1.2.0)
133
136
  net-ssh (>= 2.6.5)
134
137
  net-ssh-multi (1.2.1)
@@ -138,7 +141,7 @@ GEM
138
141
  nio4r (1.2.1)
139
142
  octokit (4.3.0)
140
143
  sawyer (~> 0.7.0, >= 0.5.3)
141
- ohai (8.16.0)
144
+ ohai (8.17.1)
142
145
  chef-config (>= 12.5.0.alpha.1, < 13)
143
146
  ffi (~> 1.9)
144
147
  ffi-yajl (~> 2.2)
@@ -154,12 +157,15 @@ GEM
154
157
  ast (~> 2.2)
155
158
  plist (3.1.0)
156
159
  powerpack (0.1.1)
157
- proxifier (1.0.3)
160
+ pry (0.10.4)
161
+ coderay (~> 1.1.0)
162
+ method_source (~> 0.8.1)
163
+ slop (~> 3.4)
158
164
  rack (1.6.4)
159
165
  rainbow (2.1.0)
160
166
  rake (10.5.0)
161
- retryable (2.0.3)
162
- ridley (4.5.1)
167
+ retryable (2.0.4)
168
+ ridley (4.6.0)
163
169
  addressable
164
170
  buff-config (~> 1.0)
165
171
  buff-extensions (~> 1.0)
@@ -177,27 +183,27 @@ GEM
177
183
  retryable (~> 2.0)
178
184
  semverse (~> 1.1)
179
185
  varia_model (~> 0.4.0)
180
- rspec (3.4.0)
181
- rspec-core (~> 3.4.0)
182
- rspec-expectations (~> 3.4.0)
183
- rspec-mocks (~> 3.4.0)
184
- rspec-core (3.4.4)
185
- rspec-support (~> 3.4.0)
186
- rspec-expectations (3.4.0)
186
+ rspec (3.5.0)
187
+ rspec-core (~> 3.5.0)
188
+ rspec-expectations (~> 3.5.0)
189
+ rspec-mocks (~> 3.5.0)
190
+ rspec-core (3.5.1)
191
+ rspec-support (~> 3.5.0)
192
+ rspec-expectations (3.5.0)
187
193
  diff-lcs (>= 1.2.0, < 2.0)
188
- rspec-support (~> 3.4.0)
194
+ rspec-support (~> 3.5.0)
189
195
  rspec-its (1.2.0)
190
196
  rspec-core (>= 3.0.0)
191
197
  rspec-expectations (>= 3.0.0)
192
- rspec-mocks (3.4.1)
198
+ rspec-mocks (3.5.0)
193
199
  diff-lcs (>= 1.2.0, < 2.0)
194
- rspec-support (~> 3.4.0)
195
- rspec-support (3.4.1)
200
+ rspec-support (~> 3.5.0)
201
+ rspec-support (3.5.0)
196
202
  rspec_junit_formatter (0.2.3)
197
203
  builder (< 4)
198
204
  rspec-core (>= 2, < 4, != 2.12.0)
199
- rubocop (0.40.0)
200
- parser (>= 2.3.1.0, < 3.0)
205
+ rubocop (0.42.0)
206
+ parser (>= 2.3.1.1, < 3.0)
201
207
  powerpack (~> 0.1)
202
208
  rainbow (>= 1.99.1, < 3.0)
203
209
  ruby-progressbar (~> 1.7)
@@ -213,10 +219,11 @@ GEM
213
219
  rspec-its
214
220
  specinfra (~> 2.53)
215
221
  sfl (2.2)
222
+ slop (3.6.0)
216
223
  solve (2.0.3)
217
224
  molinillo (~> 0.4.2)
218
225
  semverse (~> 1.1)
219
- specinfra (2.59.0)
226
+ specinfra (2.60.2)
220
227
  net-scp
221
228
  net-ssh (>= 2.7, < 4.0)
222
229
  net-telnet
@@ -229,7 +236,7 @@ GEM
229
236
  thor
230
237
  timers (4.0.4)
231
238
  hitimes
232
- unicode-display_width (1.0.5)
239
+ unicode-display_width (1.1.0)
233
240
  uuidtools (2.1.5)
234
241
  varia_model (0.4.1)
235
242
  buff-extensions (~> 1.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.8
1
+ 1.1.9
data/builderator.gemspec CHANGED
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
25
25
 
26
26
  spec.add_dependency 'aws-sdk', '~> 2.0'
27
27
  spec.add_dependency 'berkshelf', '~> 4.3'
28
+ spec.add_dependency 'childprocess', '~> 0.5'
28
29
  spec.add_dependency 'dep_selector', '~> 1.0'
29
30
  spec.add_dependency 'chef', '~> 12.5'
30
31
  spec.add_dependency 'faraday_middleware', '~> 0.10.0'
@@ -256,6 +256,7 @@ module Builderator
256
256
  attribute :availability_zone
257
257
  attribute :subnet_id
258
258
  attribute :private_ip_address
259
+ attribute :tags, :type => :hash
259
260
 
260
261
  attribute :instance_type
261
262
  attribute :security_groups, :type => :list
@@ -1,3 +1,5 @@
1
+ require 'bundler'
2
+ require 'childprocess'
1
3
  require 'thor/actions'
2
4
 
3
5
  require_relative '../util'
@@ -39,6 +41,46 @@ class Thor
39
41
  end
40
42
  end
41
43
 
44
+ ##
45
+ # Run an external command without bundler's injected environment variables
46
+ # (e.g. keep vagrant happy in it's own little vendor full of unicorns)
47
+ ##
48
+ def run_without_bundler(command, config = {})
49
+ destination = relative_to_original_destination_root(destination_root, false)
50
+ desc = "#{command} from #{destination.inspect}"
51
+
52
+ if config[:with]
53
+ desc = "#{File.basename(config[:with].to_s)} #{desc}"
54
+ command = "#{config[:with]} #{command}"
55
+ end
56
+
57
+ say_status :run, desc, config.fetch(:verbose, true)
58
+ return if options[:pretend]
59
+
60
+ output = config.fetch(:stdout, STDOUT)
61
+
62
+ Bundler.with_clean_env do
63
+ if config.fetch(:childprocess, false)
64
+ process = ChildProcess.build(*command.split(' '))
65
+ process.io.inherit!
66
+
67
+ process.start
68
+ process.wait
69
+ return process.exit_code
70
+ end
71
+
72
+ IO.popen(command, 'r+') do |io|
73
+ ## Stream output
74
+ loop do
75
+ break if io.eof?
76
+
77
+ output.write(io.readpartial(4096))
78
+ output.flush
79
+ end
80
+ end
81
+ end
82
+ end
83
+
42
84
  ##
43
85
  # Make `template` load from a sane path and render in the context of Config
44
86
  ##
@@ -3,6 +3,8 @@ require 'thor'
3
3
  require_relative '../interface/vagrant'
4
4
  require_relative '../patch/thor-actions'
5
5
 
6
+ require_relative './berkshelf'
7
+
6
8
  module Builderator
7
9
  module Tasks
8
10
  ##
@@ -32,7 +34,8 @@ module Builderator
32
34
  command << " up --provider=#{Config.profile.current.vagrant.local.provider} "
33
35
  command << args.join(' ')
34
36
 
35
- run command
37
+ return run(command) if Interface.vagrant.bundled?
38
+ run_without_bundler command
36
39
  end
37
40
  end
38
41
 
@@ -45,7 +48,8 @@ module Builderator
45
48
  command << " up --provider=#{Config.profile.current.vagrant.ec2.provider} "
46
49
  command << args.join(' ')
47
50
 
48
- run command
51
+ return run(command) if Interface.vagrant.bundled?
52
+ run_without_bundler command
49
53
  end
50
54
  end
51
55
 
@@ -53,11 +57,15 @@ module Builderator
53
57
  def provision(profile = :default, *args)
54
58
  invoke :configure, [profile], options
55
59
 
60
+ invoke Berkshelf, :vendor, [], options
61
+ invoke :rsync, [profile], options
62
+
56
63
  inside Interface.vagrant.directory do
57
64
  command = Interface.vagrant.command
58
65
  command << " provision #{args.join(' ')}"
59
66
 
60
- run command
67
+ return run(command) if Interface.vagrant.bundled?
68
+ run_without_bundler command
61
69
  end
62
70
  end
63
71
 
@@ -69,7 +77,8 @@ module Builderator
69
77
  command = Interface.vagrant.command
70
78
  command << " status #{args.join(' ')}"
71
79
 
72
- run command
80
+ return run(command) if Interface.vagrant.bundled?
81
+ run_without_bundler command
73
82
  end
74
83
  end
75
84
 
@@ -81,8 +90,21 @@ module Builderator
81
90
  command = Interface.vagrant.command
82
91
  command << " ssh #{args.join(' ')}"
83
92
 
84
- ## Connect to subprocesses STDIO
85
- exec(command)
93
+ return run(command) if Interface.vagrant.bundled?
94
+ run_without_bundler command, :childprocess => true
95
+ end
96
+ end
97
+
98
+ desc 'rsync [PROFILE [ARGS ...]]', 'Sync resources to Vagrant VM(s)'
99
+ def rsync(profile = :default, *args)
100
+ invoke :configure, [profile], options
101
+
102
+ inside Interface.vagrant.directory do
103
+ command = Interface.vagrant.command
104
+ command << " rsync #{args.join(' ')}"
105
+
106
+ return run(command) if Interface.vagrant.bundled?
107
+ run_without_bundler command
86
108
  end
87
109
  end
88
110
 
@@ -96,7 +118,8 @@ module Builderator
96
118
  command << " destroy #{args.join(' ')}"
97
119
  command << ' -f' if options['force']
98
120
 
99
- run command
121
+ return run(command) if Interface.vagrant.bundled?
122
+ run_without_bundler command
100
123
  end
101
124
  end
102
125
 
@@ -122,7 +145,8 @@ module Builderator
122
145
  command << " plugin install #{ pname }"
123
146
  command << " --plugin-version #{ plugin.version }" if plugin.has?(:version)
124
147
 
125
- run command
148
+ return run(command) if Interface.vagrant.bundled?
149
+ run_without_bundler command
126
150
  end
127
151
  end
128
152
  end
data/rvm.env CHANGED
@@ -1,14 +1,14 @@
1
- declare -x GEM_HOME="/home/jenkins/.rvm/gems/ruby-2.1.5@bakery-0"
2
- declare -x GEM_PATH="/home/jenkins/.rvm/gems/ruby-2.1.5@bakery-0:/home/jenkins/.rvm/gems/ruby-2.1.5@global"
1
+ declare -x GEM_HOME="/home/jenkins/.rvm/gems/ruby-2.1.5@bakery-2"
2
+ declare -x GEM_PATH="/home/jenkins/.rvm/gems/ruby-2.1.5@bakery-2:/home/jenkins/.rvm/gems/ruby-2.1.5@global"
3
3
  declare -x HOME="/home/jenkins"
4
- declare -x HUDSON_COOKIE="9f5b176e-8e17-4db0-9dd4-67911f3f1a9c"
4
+ declare -x HUDSON_COOKIE="de7bb2fb-26ab-4c83-96e0-e90cece37be6"
5
5
  declare -x IRBRC="/home/jenkins/.rvm/rubies/ruby-2.1.5/.irbrc"
6
6
  declare -x LANG="en_US.UTF-8"
7
7
  declare -x LC_ALL="en_US.UTF-8"
8
8
  declare -x MY_RUBY_HOME="/home/jenkins/.rvm/rubies/ruby-2.1.5"
9
9
  declare -x NLSPATH="/usr/dt/lib/nls/msg/%L/%N.cat"
10
10
  declare -x OLDPWD
11
- declare -x PATH="/home/jenkins/.rvm/gems/ruby-2.1.5@bakery-0/bin:/home/jenkins/.rvm/gems/ruby-2.1.5@global/bin:/home/jenkins/.rvm/rubies/ruby-2.1.5/bin:/home/jenkins/.rvm/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin"
11
+ declare -x PATH="/home/jenkins/.rvm/gems/ruby-2.1.5@bakery-2/bin:/home/jenkins/.rvm/gems/ruby-2.1.5@global/bin:/home/jenkins/.rvm/rubies/ruby-2.1.5/bin:/home/jenkins/.rvm/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin"
12
12
  declare -x PWD="/home/jenkins/workspace/gem-public-builderator-master"
13
13
  declare -x RUBY_VERSION="ruby-2.1.5"
14
14
  declare -x SHLVL="1"
@@ -48,6 +48,6 @@ declare -x rvm_sticky_flag
48
48
  declare -x rvm_system_flag
49
49
  declare -x rvm_use_flag
50
50
  declare -x rvm_user_flag
51
- declare -x rvm_version="1.26.9 (1.26.9)"
51
+ declare -x rvm_version="1.27.0 (1.27.0)"
52
52
  declare -x rvm_wrapper_name
53
53
  declare -x rvmsudo_secure_path="1"
@@ -35,6 +35,7 @@ Vagrant.configure('2') do |config|
35
35
  ec2.iam_instance_profile_arn = '<%= profile.current.vagrant.ec2.iam_instance_profile_arn %>'
36
36
 
37
37
  ec2.ami = '<%= profile.current.vagrant.ec2.source_ami %>'
38
+ ec2.tags = <%= profile.current.vagrant.ec2.tags %>
38
39
  end
39
40
 
40
41
  # config.vm.network :forwarded_port, :host => 9200, :guest => 9200
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: builderator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.8
4
+ version: 1.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Manero
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-14 00:00:00.000000000 Z
11
+ date: 2016-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '4.3'
97
+ - !ruby/object:Gem::Dependency
98
+ name: childprocess
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.5'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.5'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: dep_selector
99
113
  requirement: !ruby/object:Gem::Requirement