chef-apply 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +26 -0
  3. data/Gemfile.lock +423 -0
  4. data/LICENSE +201 -0
  5. data/README.md +41 -0
  6. data/Rakefile +32 -0
  7. data/bin/chef-run +23 -0
  8. data/chef-apply.gemspec +67 -0
  9. data/i18n/en.yml +513 -0
  10. data/lib/chef_apply.rb +20 -0
  11. data/lib/chef_apply/action/base.rb +158 -0
  12. data/lib/chef_apply/action/converge_target.rb +173 -0
  13. data/lib/chef_apply/action/install_chef.rb +30 -0
  14. data/lib/chef_apply/action/install_chef/base.rb +137 -0
  15. data/lib/chef_apply/action/install_chef/linux.rb +38 -0
  16. data/lib/chef_apply/action/install_chef/windows.rb +54 -0
  17. data/lib/chef_apply/action/reporter.rb +39 -0
  18. data/lib/chef_apply/cli.rb +470 -0
  19. data/lib/chef_apply/cli_options.rb +145 -0
  20. data/lib/chef_apply/config.rb +150 -0
  21. data/lib/chef_apply/error.rb +108 -0
  22. data/lib/chef_apply/errors/ccr_failure_mapper.rb +93 -0
  23. data/lib/chef_apply/file_fetcher.rb +70 -0
  24. data/lib/chef_apply/log.rb +42 -0
  25. data/lib/chef_apply/recipe_lookup.rb +117 -0
  26. data/lib/chef_apply/startup.rb +162 -0
  27. data/lib/chef_apply/status_reporter.rb +42 -0
  28. data/lib/chef_apply/target_host.rb +233 -0
  29. data/lib/chef_apply/target_resolver.rb +202 -0
  30. data/lib/chef_apply/telemeter.rb +162 -0
  31. data/lib/chef_apply/telemeter/patch.rb +32 -0
  32. data/lib/chef_apply/telemeter/sender.rb +121 -0
  33. data/lib/chef_apply/temp_cookbook.rb +159 -0
  34. data/lib/chef_apply/text.rb +77 -0
  35. data/lib/chef_apply/ui/error_printer.rb +261 -0
  36. data/lib/chef_apply/ui/plain_text_element.rb +75 -0
  37. data/lib/chef_apply/ui/terminal.rb +94 -0
  38. data/lib/chef_apply/version.rb +20 -0
  39. metadata +376 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3a54dba100bb799ac0f8ca9be4be3ad58417503b8569e4a680253797aea1b224
4
+ data.tar.gz: 5c9a8c1b67027704995776ffdab56cf4253ce71a78dbbc9b4d2b1b44123d1234
5
+ SHA512:
6
+ metadata.gz: 03a2c835d18864aad23a3936ea2b05da1b0e7cb48dcfe0cf0adfa7373aef57a5dd56752c7b5571cb57e530642846ca208678523dfdf1996be4549decf4a1dadb
7
+ data.tar.gz: 4684c9dd0a76a42774b80634784a611ccbb189ab7a55b78496d76f1c197ef1018190a6164e6cca7f90720f8d7aa9981caacb1a0810a599dcc988397e98c69d64
data/Gemfile ADDED
@@ -0,0 +1,26 @@
1
+ #
2
+ # Copyright:: Copyright (c) 2018 Chef Software Inc.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ source "https://rubygems.org"
19
+ gemspec
20
+
21
+ # Pinning Train to 1.4.6 because newer versions cause healthcheck related build failures
22
+ gem "train", git: "https://github.com/chef/train.git", branch: "v1.4.6"
23
+
24
+ group :localdev do
25
+ gem "irbtools-more", require: "irbtools/binding"
26
+ end
@@ -0,0 +1,423 @@
1
+ GIT
2
+ remote: https://github.com/chef/train.git
3
+ revision: daefae3357bdaa903ec75da9ab6b222073f6fa07
4
+ branch: v1.4.6
5
+ specs:
6
+ train (1.4.6)
7
+ aws-sdk (~> 2)
8
+ azure_mgmt_resources (~> 0.15)
9
+ docker-api (~> 1.26)
10
+ inifile
11
+ json (>= 1.8, < 3.0)
12
+ mixlib-shellout (~> 2.0)
13
+ net-scp (~> 1.2)
14
+ net-ssh (>= 2.9, < 5.0)
15
+ winrm (~> 2.0)
16
+ winrm-fs (~> 1.0)
17
+
18
+ PATH
19
+ remote: .
20
+ specs:
21
+ chef-apply (0.1.2)
22
+ chef (>= 14.0)
23
+ chef-dk (>= 3.0)
24
+ chef-telemetry
25
+ mixlib-cli
26
+ mixlib-config
27
+ mixlib-install
28
+ mixlib-log
29
+ pastel
30
+ r18n-desktop
31
+ toml-rb
32
+ train
33
+ tty-spinner
34
+
35
+ GEM
36
+ remote: https://rubygems.org/
37
+ specs:
38
+ addressable (2.5.2)
39
+ public_suffix (>= 2.0.2, < 4.0)
40
+ ast (2.4.0)
41
+ aws-sdk (2.11.86)
42
+ aws-sdk-resources (= 2.11.86)
43
+ aws-sdk-core (2.11.86)
44
+ aws-sigv4 (~> 1.0)
45
+ jmespath (~> 1.0)
46
+ aws-sdk-resources (2.11.86)
47
+ aws-sdk-core (= 2.11.86)
48
+ aws-sigv4 (1.0.3)
49
+ azure_mgmt_resources (0.16.0)
50
+ ms_rest_azure (~> 0.10.0)
51
+ binding.repl (3.0.0)
52
+ binding_of_caller (0.8.0)
53
+ debug_inspector (>= 0.0.1)
54
+ bond (0.5.1)
55
+ builder (3.2.3)
56
+ byebug (10.0.2)
57
+ cd (1.0.1)
58
+ chef (14.3.37)
59
+ addressable
60
+ bundler (>= 1.10)
61
+ chef-config (= 14.3.37)
62
+ chef-zero (>= 13.0)
63
+ diff-lcs (~> 1.2, >= 1.2.4)
64
+ erubis (~> 2.7)
65
+ ffi (~> 1.9, >= 1.9.25)
66
+ ffi-yajl (~> 2.2)
67
+ highline (~> 1.6, >= 1.6.9)
68
+ iniparse (~> 1.4)
69
+ iso8601 (~> 0.9.1)
70
+ mixlib-archive (~> 0.4)
71
+ mixlib-authentication (~> 2.1)
72
+ mixlib-cli (~> 1.7)
73
+ mixlib-log (~> 2.0, >= 2.0.3)
74
+ mixlib-shellout (~> 2.0)
75
+ net-sftp (~> 2.1, >= 2.1.2)
76
+ net-ssh (~> 4.2)
77
+ net-ssh-multi (~> 1.2, >= 1.2.1)
78
+ ohai (~> 14.0)
79
+ plist (~> 3.2)
80
+ proxifier (~> 1.0)
81
+ rspec-core (~> 3.5)
82
+ rspec-expectations (~> 3.5)
83
+ rspec-mocks (~> 3.5)
84
+ rspec_junit_formatter (~> 0.2.0)
85
+ serverspec (~> 2.7)
86
+ specinfra (~> 2.10)
87
+ syslog-logger (~> 1.6)
88
+ uuidtools (~> 2.1.5)
89
+ chef-config (14.3.37)
90
+ addressable
91
+ fuzzyurl
92
+ mixlib-config (>= 2.2.12, < 3.0)
93
+ mixlib-shellout (~> 2.0)
94
+ tomlrb (~> 1.2)
95
+ chef-dk (3.1.0)
96
+ addressable (>= 2.3.5, < 2.6)
97
+ chef (~> 14.0)
98
+ chef-provisioning (~> 2.0)
99
+ cookbook-omnifetch (~> 0.5)
100
+ diff-lcs (~> 1.0)
101
+ ffi-yajl (>= 1.0, < 3.0)
102
+ minitar (~> 0.6)
103
+ mixlib-cli (~> 1.7)
104
+ mixlib-shellout (~> 2.0)
105
+ paint (~> 1.0)
106
+ solve (> 2.0, < 5.0)
107
+ chef-provisioning (2.7.1)
108
+ cheffish (>= 4.0, < 15.0)
109
+ inifile (>= 2.0.2)
110
+ mixlib-install (>= 1.0)
111
+ net-scp (~> 1.0)
112
+ net-ssh (>= 2.9, < 5.0)
113
+ net-ssh-gateway (> 1.2, < 3.0)
114
+ winrm (~> 2.0)
115
+ winrm-elevated (~> 1.0)
116
+ winrm-fs (~> 1.0)
117
+ chef-telemetry (0.1.0)
118
+ chef-config
119
+ concurrent-ruby (~> 1.0)
120
+ ffi-yajl (~> 2.2)
121
+ http (~> 2.2)
122
+ chef-zero (14.0.6)
123
+ ffi-yajl (~> 2.2)
124
+ hashie (>= 2.0, < 4.0)
125
+ mixlib-log (~> 2.0)
126
+ rack (~> 2.0)
127
+ uuidtools (~> 2.1)
128
+ cheffish (14.0.1)
129
+ chef-zero (~> 14.0)
130
+ net-ssh
131
+ chefstyle (0.10.0)
132
+ rubocop (= 0.55.0)
133
+ citrus (3.0.2)
134
+ clipboard (1.1.2)
135
+ code (0.9.2)
136
+ coderay (~> 1.1)
137
+ method_source (~> 0.9)
138
+ coderay (1.1.2)
139
+ concurrent-ruby (1.0.5)
140
+ cookbook-omnifetch (0.8.0)
141
+ mixlib-archive (~> 0.4)
142
+ core_docs (0.9.3)
143
+ yard (~> 0.8)
144
+ debug_inspector (0.0.3)
145
+ debugging (1.1.1)
146
+ binding.repl (~> 3.0)
147
+ paint (>= 0.9, < 3.0)
148
+ did_you_mean (1.2.1)
149
+ diff-lcs (1.3)
150
+ docile (1.3.1)
151
+ docker-api (1.34.2)
152
+ excon (>= 0.47.0)
153
+ multi_json
154
+ domain_name (0.5.20180417)
155
+ unf (>= 0.0.5, < 1.0.0)
156
+ equatable (0.5.0)
157
+ erubis (2.7.0)
158
+ every_day_irb (2.0.0)
159
+ cd (~> 1.0)
160
+ excon (0.62.0)
161
+ fancy_irb (1.1.0)
162
+ paint (>= 0.9, < 3.0)
163
+ unicode-display_width (~> 1.1)
164
+ faraday (0.15.2)
165
+ multipart-post (>= 1.2, < 3)
166
+ faraday-cookie_jar (0.0.6)
167
+ faraday (>= 0.7.4)
168
+ http-cookie (~> 1.0.0)
169
+ ffi (1.9.25)
170
+ ffi-yajl (2.3.1)
171
+ libyajl2 (~> 1.2)
172
+ fuzzyurl (0.9.0)
173
+ gssapi (1.2.0)
174
+ ffi (>= 1.0.1)
175
+ gyoku (1.3.1)
176
+ builder (>= 2.1.2)
177
+ hashie (3.5.7)
178
+ highline (1.7.10)
179
+ hirb (0.7.3)
180
+ http (2.2.2)
181
+ addressable (~> 2.3)
182
+ http-cookie (~> 1.0)
183
+ http-form_data (~> 1.0.1)
184
+ http_parser.rb (~> 0.6.0)
185
+ http-cookie (1.0.3)
186
+ domain_name (~> 0.5)
187
+ http-form_data (1.0.3)
188
+ http_parser.rb (0.6.0)
189
+ httpclient (2.8.3)
190
+ inifile (3.0.0)
191
+ iniparse (1.4.4)
192
+ instance (0.2.0)
193
+ interactive_editor (0.0.11)
194
+ spoon (>= 0.0.1)
195
+ ipaddress (0.8.3)
196
+ irbtools (2.2.1)
197
+ binding.repl (~> 3.0)
198
+ clipboard (~> 1.1)
199
+ code (~> 0.9)
200
+ coderay (~> 1.1)
201
+ debugging (~> 1.1)
202
+ every_day_irb (~> 2.0)
203
+ fancy_irb (~> 1.1)
204
+ hirb (~> 0.7, >= 0.7.3)
205
+ instance (~> 0.2)
206
+ interactive_editor (~> 0.0, >= 0.0.10)
207
+ method_locator (~> 0.0, >= 0.0.4)
208
+ methodfinder (~> 2.0)
209
+ ori (~> 0.1.0)
210
+ os
211
+ paint (>= 0.9, < 3.0)
212
+ ruby_engine (~> 1.0)
213
+ ruby_info (~> 1.0)
214
+ ruby_version (~> 1.0)
215
+ wirb (~> 2.0)
216
+ irbtools-more (2.2.1)
217
+ binding_of_caller (~> 0.7)
218
+ bond (~> 0.5)
219
+ core_docs (>= 0.9.2)
220
+ did_you_mean (~> 1.0)
221
+ irbtools (~> 2.0)
222
+ looksee (~> 4.0)
223
+ iso8601 (0.9.1)
224
+ jmespath (1.4.0)
225
+ json (2.1.0)
226
+ libyajl2 (1.2.0)
227
+ little-plugger (1.1.4)
228
+ logging (2.2.2)
229
+ little-plugger (~> 1.1)
230
+ multi_json (~> 1.10)
231
+ looksee (4.0.0)
232
+ method_locator (0.0.4)
233
+ method_source (0.9.0)
234
+ methodfinder (2.2.1)
235
+ minitar (0.6.1)
236
+ mixlib-archive (0.4.8)
237
+ mixlib-log
238
+ mixlib-authentication (2.1.1)
239
+ mixlib-cli (1.7.0)
240
+ mixlib-config (2.2.12)
241
+ tomlrb
242
+ mixlib-install (3.11.2)
243
+ mixlib-shellout
244
+ mixlib-versioning
245
+ thor
246
+ mixlib-log (2.0.4)
247
+ mixlib-shellout (2.3.2)
248
+ mixlib-versioning (1.2.2)
249
+ molinillo (0.6.5)
250
+ ms_rest (0.7.2)
251
+ concurrent-ruby (~> 1.0)
252
+ faraday (~> 0.9)
253
+ timeliness (~> 0.3)
254
+ ms_rest_azure (0.10.8)
255
+ concurrent-ruby (~> 1.0)
256
+ faraday (~> 0.9)
257
+ faraday-cookie_jar (~> 0.0.6)
258
+ ms_rest (~> 0.7.2)
259
+ multi_json (1.13.1)
260
+ multipart-post (2.0.0)
261
+ net-scp (1.2.1)
262
+ net-ssh (>= 2.6.5)
263
+ net-sftp (2.1.2)
264
+ net-ssh (>= 2.6.5)
265
+ net-ssh (4.2.0)
266
+ net-ssh-gateway (2.0.0)
267
+ net-ssh (>= 4.0.0)
268
+ net-ssh-multi (1.2.1)
269
+ net-ssh (>= 2.6.5)
270
+ net-ssh-gateway (>= 1.2.0)
271
+ net-telnet (0.1.1)
272
+ nori (2.6.0)
273
+ ohai (14.3.0)
274
+ chef-config (>= 12.8, < 15)
275
+ ffi (~> 1.9)
276
+ ffi-yajl (~> 2.2)
277
+ ipaddress
278
+ mixlib-cli
279
+ mixlib-config (~> 2.0)
280
+ mixlib-log (~> 2.0, >= 2.0.1)
281
+ mixlib-shellout (~> 2.0)
282
+ plist (~> 3.1)
283
+ systemu (~> 2.6.4)
284
+ wmi-lite (~> 1.0)
285
+ ori (0.1.0)
286
+ os (1.0.0)
287
+ paint (1.0.1)
288
+ parallel (1.12.1)
289
+ parser (2.5.1.0)
290
+ ast (~> 2.4.0)
291
+ pastel (0.7.2)
292
+ equatable (~> 0.5.0)
293
+ tty-color (~> 0.4.0)
294
+ plist (3.4.0)
295
+ powerpack (0.1.2)
296
+ proxifier (1.0.3)
297
+ pry (0.11.3)
298
+ coderay (~> 1.1.0)
299
+ method_source (~> 0.9.0)
300
+ pry-byebug (3.6.0)
301
+ byebug (~> 10.0)
302
+ pry (~> 0.10)
303
+ pry-stack_explorer (0.4.9.2)
304
+ binding_of_caller (>= 0.7)
305
+ pry (>= 0.9.11)
306
+ public_suffix (3.0.2)
307
+ r18n-core (3.0.4)
308
+ r18n-desktop (3.0.4)
309
+ r18n-core (= 3.0.4)
310
+ rack (2.0.5)
311
+ rainbow (3.0.0)
312
+ rake (12.3.1)
313
+ rspec (3.7.0)
314
+ rspec-core (~> 3.7.0)
315
+ rspec-expectations (~> 3.7.0)
316
+ rspec-mocks (~> 3.7.0)
317
+ rspec-core (3.7.1)
318
+ rspec-support (~> 3.7.0)
319
+ rspec-expectations (3.7.0)
320
+ diff-lcs (>= 1.2.0, < 2.0)
321
+ rspec-support (~> 3.7.0)
322
+ rspec-its (1.2.0)
323
+ rspec-core (>= 3.0.0)
324
+ rspec-expectations (>= 3.0.0)
325
+ rspec-mocks (3.7.0)
326
+ diff-lcs (>= 1.2.0, < 2.0)
327
+ rspec-support (~> 3.7.0)
328
+ rspec-support (3.7.1)
329
+ rspec_junit_formatter (0.2.3)
330
+ builder (< 4)
331
+ rspec-core (>= 2, < 4, != 2.12.0)
332
+ rubocop (0.55.0)
333
+ parallel (~> 1.10)
334
+ parser (>= 2.5)
335
+ powerpack (~> 0.1)
336
+ rainbow (>= 2.2.2, < 4.0)
337
+ ruby-progressbar (~> 1.7)
338
+ unicode-display_width (~> 1.0, >= 1.0.1)
339
+ ruby-progressbar (1.9.0)
340
+ ruby_engine (1.0.1)
341
+ ruby_info (1.0.1)
342
+ ruby_version (1.0.1)
343
+ rubyntlm (0.6.2)
344
+ rubyzip (1.2.1)
345
+ semverse (2.0.0)
346
+ serverspec (2.41.3)
347
+ multi_json
348
+ rspec (~> 3.0)
349
+ rspec-its
350
+ specinfra (~> 2.72)
351
+ sfl (2.3)
352
+ simplecov (0.16.1)
353
+ docile (~> 1.1)
354
+ json (>= 1.8, < 3)
355
+ simplecov-html (~> 0.10.0)
356
+ simplecov-html (0.10.2)
357
+ solve (4.0.0)
358
+ molinillo (~> 0.6)
359
+ semverse (>= 1.1, < 3.0)
360
+ specinfra (2.75.0)
361
+ net-scp
362
+ net-ssh (>= 2.7)
363
+ net-telnet
364
+ sfl
365
+ spoon (0.0.6)
366
+ ffi
367
+ syslog-logger (1.6.8)
368
+ systemu (2.6.5)
369
+ thor (0.20.0)
370
+ timeliness (0.3.8)
371
+ toml-rb (1.1.1)
372
+ citrus (~> 3.0, > 3.0)
373
+ tomlrb (1.2.7)
374
+ tty-color (0.4.2)
375
+ tty-cursor (0.5.0)
376
+ tty-spinner (0.8.0)
377
+ tty-cursor (>= 0.5.0)
378
+ unf (0.1.4)
379
+ unf_ext
380
+ unf_ext (0.0.7.5)
381
+ unicode-display_width (1.4.0)
382
+ uuidtools (2.1.5)
383
+ winrm (2.2.3)
384
+ builder (>= 2.1.2)
385
+ erubis (~> 2.7)
386
+ gssapi (~> 1.2)
387
+ gyoku (~> 1.0)
388
+ httpclient (~> 2.2, >= 2.2.0.2)
389
+ logging (>= 1.6.1, < 3.0)
390
+ nori (~> 2.0)
391
+ rubyntlm (~> 0.6.0, >= 0.6.1)
392
+ winrm-elevated (1.1.0)
393
+ winrm (~> 2.0)
394
+ winrm-fs (~> 1.0)
395
+ winrm-fs (1.2.0)
396
+ erubis (~> 2.7)
397
+ logging (>= 1.6.1, < 3.0)
398
+ rubyzip (~> 1.1)
399
+ winrm (~> 2.0)
400
+ wirb (2.1.2)
401
+ paint (>= 0.9, < 3.0)
402
+ wmi-lite (1.0.0)
403
+ yard (0.9.14)
404
+
405
+ PLATFORMS
406
+ ruby
407
+
408
+ DEPENDENCIES
409
+ bundler
410
+ chef-apply!
411
+ chefstyle
412
+ irbtools-more
413
+ pry
414
+ pry-byebug
415
+ pry-stack_explorer
416
+ rake
417
+ rspec
418
+ rspec_junit_formatter
419
+ simplecov
420
+ train!
421
+
422
+ BUNDLED WITH
423
+ 1.16.2