kontena-cli 0.14.7 → 0.15.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -1
  3. data/VERSION +1 -1
  4. data/bin/kontena +3 -50
  5. data/examples/kontena-plugin-hello/.gitignore +9 -0
  6. data/examples/kontena-plugin-hello/Gemfile +4 -0
  7. data/examples/kontena-plugin-hello/README.md +3 -0
  8. data/examples/kontena-plugin-hello/bin/console +14 -0
  9. data/examples/kontena-plugin-hello/bin/setup +8 -0
  10. data/examples/kontena-plugin-hello/kontena-plugin-hello.gemspec +22 -0
  11. data/examples/kontena-plugin-hello/lib/kontena/plugin/hello.rb +7 -0
  12. data/examples/kontena-plugin-hello/lib/kontena/plugin/hello/world_command.rb +6 -0
  13. data/examples/kontena-plugin-hello/lib/kontena/plugin/hello_command.rb +9 -0
  14. data/examples/kontena-plugin-hello/lib/kontena_cli_plugin.rb +5 -0
  15. data/kontena-cli.gemspec +1 -3
  16. data/lib/kontena/cli/apps/build_command.rb +3 -0
  17. data/lib/kontena/cli/apps/common.rb +6 -1
  18. data/lib/kontena/cli/apps/deploy_command.rb +1 -1
  19. data/lib/kontena/cli/apps/docker_helper.rb +13 -14
  20. data/lib/kontena/cli/apps/service_generator.rb +19 -11
  21. data/lib/kontena/cli/apps/service_generator_v2.rb +1 -0
  22. data/lib/kontena/cli/apps/yaml/reader.rb +15 -0
  23. data/lib/kontena/cli/apps/yaml/service_extender.rb +28 -0
  24. data/lib/kontena/cli/apps/yaml/validations.rb +38 -24
  25. data/lib/kontena/cli/apps/yaml/validator.rb +7 -7
  26. data/lib/kontena/cli/apps/yaml/validator_v2.rb +7 -6
  27. data/lib/kontena/cli/certificate/authorize_command.rb +23 -0
  28. data/lib/kontena/cli/certificate/get_command.rb +25 -0
  29. data/lib/kontena/cli/certificate/register_command.rb +19 -0
  30. data/lib/kontena/cli/certificate_command.rb +14 -0
  31. data/lib/kontena/cli/containers/containers_helper.rb +22 -0
  32. data/lib/kontena/cli/containers/exec_command.rb +9 -2
  33. data/lib/kontena/cli/grids/logs_command.rb +14 -3
  34. data/lib/kontena/cli/master_command.rb +1 -12
  35. data/lib/kontena/cli/node_command.rb +0 -16
  36. data/lib/kontena/cli/plugin_command.rb +15 -0
  37. data/lib/kontena/cli/plugins/install_command.rb +28 -0
  38. data/lib/kontena/cli/plugins/list_command.rb +13 -0
  39. data/lib/kontena/cli/plugins/search_command.rb +29 -0
  40. data/lib/kontena/cli/plugins/uninstall_command.rb +30 -0
  41. data/lib/kontena/cli/registry/create_command.rb +1 -1
  42. data/lib/kontena/cli/services/create_command.rb +16 -0
  43. data/lib/kontena/cli/services/list_command.rb +17 -3
  44. data/lib/kontena/cli/services/logs_command.rb +63 -18
  45. data/lib/kontena/cli/services/services_helper.rb +47 -4
  46. data/lib/kontena/cli/services/update_command.rb +16 -0
  47. data/lib/kontena/cli/stack_command.rb +20 -0
  48. data/lib/kontena/cli/stacks/common.rb +39 -0
  49. data/lib/kontena/cli/stacks/create_command.rb +27 -0
  50. data/lib/kontena/cli/stacks/deploy_command.rb +26 -0
  51. data/lib/kontena/cli/stacks/list_command.rb +38 -0
  52. data/lib/kontena/cli/stacks/remove_command.rb +26 -0
  53. data/lib/kontena/cli/stacks/show_command.rb +38 -0
  54. data/lib/kontena/cli/stacks/update_command.rb +27 -0
  55. data/lib/kontena/client.rb +11 -4
  56. data/lib/kontena/command.rb +4 -0
  57. data/lib/kontena/main_command.rb +61 -0
  58. data/lib/kontena/plugin_manager.rb +38 -0
  59. data/lib/kontena/util.rb +17 -0
  60. data/lib/kontena_cli.rb +6 -0
  61. data/spec/fixtures/health.yml +26 -0
  62. data/spec/fixtures/kontena-build.yml +16 -0
  63. data/spec/fixtures/kontena_build_v2.yaml +26 -0
  64. data/spec/kontena/cli/app/build_command_spec.rb +13 -1
  65. data/spec/kontena/cli/app/common_spec.rb +11 -0
  66. data/spec/kontena/cli/app/deploy_command_spec.rb +1 -1
  67. data/spec/kontena/cli/app/docker_helper_spec.rb +45 -0
  68. data/spec/kontena/cli/app/service_generator_spec.rb +52 -1
  69. data/spec/kontena/cli/app/yaml/service_extender_spec.rb +24 -0
  70. data/spec/kontena/cli/app/yaml/validator_spec.rb +97 -14
  71. data/spec/kontena/cli/common_spec.rb +0 -5
  72. data/spec/kontena/cli/containers/containers_helper_spec.rb +16 -0
  73. data/spec/kontena/cli/services/services_helper_spec.rb +50 -1
  74. data/spec/kontena/cli/version_command_spec.rb +1 -1
  75. data/spec/kontena/client_spec.rb +156 -0
  76. data/spec/kontena/plugin_manager_spec.rb +22 -0
  77. data/spec/spec_helper.rb +1 -0
  78. metadata +54 -125
  79. data/lib/kontena/cli/master/aws/create_command.rb +0 -48
  80. data/lib/kontena/cli/master/aws_command.rb +0 -8
  81. data/lib/kontena/cli/master/azure/create_command.rb +0 -37
  82. data/lib/kontena/cli/master/azure_command.rb +0 -13
  83. data/lib/kontena/cli/master/digital_ocean/create_command.rb +0 -38
  84. data/lib/kontena/cli/master/digital_ocean_command.rb +0 -13
  85. data/lib/kontena/cli/master/packet/create_command.rb +0 -42
  86. data/lib/kontena/cli/master/packet_command.rb +0 -14
  87. data/lib/kontena/cli/master/upcloud/create_command.rb +0 -39
  88. data/lib/kontena/cli/master/upcloud_command.rb +0 -13
  89. data/lib/kontena/cli/master/vagrant/create_command.rb +0 -25
  90. data/lib/kontena/cli/master/vagrant/restart_command.rb +0 -20
  91. data/lib/kontena/cli/master/vagrant/ssh_command.rb +0 -15
  92. data/lib/kontena/cli/master/vagrant/start_command.rb +0 -20
  93. data/lib/kontena/cli/master/vagrant/stop_command.rb +0 -20
  94. data/lib/kontena/cli/master/vagrant/terminate_command.rb +0 -13
  95. data/lib/kontena/cli/master/vagrant_command.rb +0 -23
  96. data/lib/kontena/cli/nodes/aws/create_command.rb +0 -44
  97. data/lib/kontena/cli/nodes/aws/restart_command.rb +0 -29
  98. data/lib/kontena/cli/nodes/aws/terminate_command.rb +0 -21
  99. data/lib/kontena/cli/nodes/aws_command.rb +0 -15
  100. data/lib/kontena/cli/nodes/azure/create_command.rb +0 -38
  101. data/lib/kontena/cli/nodes/azure/restart_command.rb +0 -32
  102. data/lib/kontena/cli/nodes/azure/terminate_command.rb +0 -21
  103. data/lib/kontena/cli/nodes/azure_command.rb +0 -15
  104. data/lib/kontena/cli/nodes/digital_ocean/create_command.rb +0 -32
  105. data/lib/kontena/cli/nodes/digital_ocean/restart_command.rb +0 -27
  106. data/lib/kontena/cli/nodes/digital_ocean/terminate_command.rb +0 -19
  107. data/lib/kontena/cli/nodes/digital_ocean_command.rb +0 -15
  108. data/lib/kontena/cli/nodes/packet/create_command.rb +0 -35
  109. data/lib/kontena/cli/nodes/packet/restart_command.rb +0 -17
  110. data/lib/kontena/cli/nodes/packet/terminate_command.rb +0 -20
  111. data/lib/kontena/cli/nodes/packet_command.rb +0 -15
  112. data/lib/kontena/cli/nodes/upcloud/create_command.rb +0 -33
  113. data/lib/kontena/cli/nodes/upcloud/restart_command.rb +0 -20
  114. data/lib/kontena/cli/nodes/upcloud/terminate_command.rb +0 -20
  115. data/lib/kontena/cli/nodes/upcloud_command.rb +0 -15
  116. data/lib/kontena/cli/nodes/vagrant/create_command.rb +0 -27
  117. data/lib/kontena/cli/nodes/vagrant/restart_command.rb +0 -26
  118. data/lib/kontena/cli/nodes/vagrant/ssh_command.rb +0 -21
  119. data/lib/kontena/cli/nodes/vagrant/start_command.rb +0 -26
  120. data/lib/kontena/cli/nodes/vagrant/stop_command.rb +0 -26
  121. data/lib/kontena/cli/nodes/vagrant/terminate_command.rb +0 -17
  122. data/lib/kontena/cli/nodes/vagrant_command.rb +0 -21
  123. data/lib/kontena/machine/aws.rb +0 -13
  124. data/lib/kontena/machine/aws/cloudinit.yml +0 -71
  125. data/lib/kontena/machine/aws/cloudinit_master.yml +0 -118
  126. data/lib/kontena/machine/aws/common.rb +0 -58
  127. data/lib/kontena/machine/aws/master_provisioner.rb +0 -187
  128. data/lib/kontena/machine/aws/node_destroyer.rb +0 -51
  129. data/lib/kontena/machine/aws/node_provisioner.rb +0 -204
  130. data/lib/kontena/machine/azure.rb +0 -13
  131. data/lib/kontena/machine/azure/cloudinit.yml +0 -64
  132. data/lib/kontena/machine/azure/cloudinit_master.yml +0 -106
  133. data/lib/kontena/machine/azure/logger.rb +0 -27
  134. data/lib/kontena/machine/azure/master_provisioner.rb +0 -128
  135. data/lib/kontena/machine/azure/node_destroyer.rb +0 -53
  136. data/lib/kontena/machine/azure/node_provisioner.rb +0 -132
  137. data/lib/kontena/machine/digital_ocean.rb +0 -13
  138. data/lib/kontena/machine/digital_ocean/cloudinit.yml +0 -64
  139. data/lib/kontena/machine/digital_ocean/cloudinit_master.yml +0 -118
  140. data/lib/kontena/machine/digital_ocean/master_provisioner.rb +0 -99
  141. data/lib/kontena/machine/digital_ocean/node_destroyer.rb +0 -40
  142. data/lib/kontena/machine/digital_ocean/node_provisioner.rb +0 -88
  143. data/lib/kontena/machine/packet.rb +0 -17
  144. data/lib/kontena/machine/packet/cloudinit.yml +0 -66
  145. data/lib/kontena/machine/packet/cloudinit_master.yml +0 -118
  146. data/lib/kontena/machine/packet/master_provisioner.rb +0 -93
  147. data/lib/kontena/machine/packet/node_destroyer.rb +0 -42
  148. data/lib/kontena/machine/packet/node_provisioner.rb +0 -77
  149. data/lib/kontena/machine/packet/node_restarter.rb +0 -41
  150. data/lib/kontena/machine/packet/packet_common.rb +0 -89
  151. data/lib/kontena/machine/upcloud.rb +0 -9
  152. data/lib/kontena/machine/upcloud/cloudinit.yml +0 -64
  153. data/lib/kontena/machine/upcloud/cloudinit_master.yml +0 -118
  154. data/lib/kontena/machine/upcloud/master_provisioner.rb +0 -138
  155. data/lib/kontena/machine/upcloud/node_destroyer.rb +0 -85
  156. data/lib/kontena/machine/upcloud/node_provisioner.rb +0 -121
  157. data/lib/kontena/machine/upcloud/node_restarter.rb +0 -49
  158. data/lib/kontena/machine/upcloud/upcloud_common.rb +0 -74
  159. data/lib/kontena/machine/vagrant.rb +0 -12
  160. data/lib/kontena/machine/vagrant/Vagrantfile.master.rb.erb +0 -104
  161. data/lib/kontena/machine/vagrant/Vagrantfile.node.rb.erb +0 -32
  162. data/lib/kontena/machine/vagrant/cloudinit.yml +0 -73
  163. data/lib/kontena/machine/vagrant/master_destroyer.rb +0 -37
  164. data/lib/kontena/machine/vagrant/master_provisioner.rb +0 -79
  165. data/lib/kontena/machine/vagrant/node_destroyer.rb +0 -40
  166. data/lib/kontena/machine/vagrant/node_provisioner.rb +0 -68
data/spec/spec_helper.rb CHANGED
@@ -6,6 +6,7 @@
6
6
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
7
 
8
8
  require 'clamp'
9
+ require 'ruby_dig'
9
10
  require 'kontena/cli/common'
10
11
  require 'kontena/cli/grid_options'
11
12
  require 'kontena/client'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kontena-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.7
4
+ version: 0.15.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kontena, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-08 00:00:00.000000000 Z
11
+ date: 2016-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -126,44 +126,16 @@ dependencies:
126
126
  name: dry-validation
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '='
130
- - !ruby/object:Gem::Version
131
- version: 0.7.4
132
- type: :runtime
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - '='
137
- - !ruby/object:Gem::Version
138
- version: 0.7.4
139
- - !ruby/object:Gem::Dependency
140
- name: dry-types
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - '='
144
- - !ruby/object:Gem::Version
145
- version: 0.7.1
146
- type: :runtime
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - '='
151
- - !ruby/object:Gem::Version
152
- version: 0.7.1
153
- - !ruby/object:Gem::Dependency
154
- name: dry-logic
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - '='
129
+ - - "~>"
158
130
  - !ruby/object:Gem::Version
159
- version: 0.2.2
131
+ version: 0.8.0
160
132
  type: :runtime
161
133
  prerelease: false
162
134
  version_requirements: !ruby/object:Gem::Requirement
163
135
  requirements:
164
- - - '='
136
+ - - "~>"
165
137
  - !ruby/object:Gem::Version
166
- version: 0.2.2
138
+ version: 0.8.0
167
139
  description: Kontena command line tool
168
140
  email:
169
141
  - info@kontena.io
@@ -180,6 +152,16 @@ files:
180
152
  - Rakefile
181
153
  - VERSION
182
154
  - bin/kontena
155
+ - examples/kontena-plugin-hello/.gitignore
156
+ - examples/kontena-plugin-hello/Gemfile
157
+ - examples/kontena-plugin-hello/README.md
158
+ - examples/kontena-plugin-hello/bin/console
159
+ - examples/kontena-plugin-hello/bin/setup
160
+ - examples/kontena-plugin-hello/kontena-plugin-hello.gemspec
161
+ - examples/kontena-plugin-hello/lib/kontena/plugin/hello.rb
162
+ - examples/kontena-plugin-hello/lib/kontena/plugin/hello/world_command.rb
163
+ - examples/kontena-plugin-hello/lib/kontena/plugin/hello_command.rb
164
+ - examples/kontena-plugin-hello/lib/kontena_cli_plugin.rb
183
165
  - kontena-cli.gemspec
184
166
  - kontena-docker.sh
185
167
  - lib/kontena/cli/app_command.rb
@@ -209,8 +191,13 @@ files:
209
191
  - lib/kontena/cli/apps/yaml/validator.rb
210
192
  - lib/kontena/cli/apps/yaml/validator_v2.rb
211
193
  - lib/kontena/cli/bytes_helper.rb
194
+ - lib/kontena/cli/certificate/authorize_command.rb
195
+ - lib/kontena/cli/certificate/get_command.rb
196
+ - lib/kontena/cli/certificate/register_command.rb
197
+ - lib/kontena/cli/certificate_command.rb
212
198
  - lib/kontena/cli/common.rb
213
199
  - lib/kontena/cli/container_command.rb
200
+ - lib/kontena/cli/containers/containers_helper.rb
214
201
  - lib/kontena/cli/containers/exec_command.rb
215
202
  - lib/kontena/cli/containers/inspect_command.rb
216
203
  - lib/kontena/cli/etcd/common.rb
@@ -249,18 +236,8 @@ files:
249
236
  - lib/kontena/cli/grids/users/remove_command.rb
250
237
  - lib/kontena/cli/login_command.rb
251
238
  - lib/kontena/cli/logout_command.rb
252
- - lib/kontena/cli/master/aws/create_command.rb
253
- - lib/kontena/cli/master/aws_command.rb
254
- - lib/kontena/cli/master/azure/create_command.rb
255
- - lib/kontena/cli/master/azure_command.rb
256
239
  - lib/kontena/cli/master/current_command.rb
257
- - lib/kontena/cli/master/digital_ocean/create_command.rb
258
- - lib/kontena/cli/master/digital_ocean_command.rb
259
240
  - lib/kontena/cli/master/list_command.rb
260
- - lib/kontena/cli/master/packet/create_command.rb
261
- - lib/kontena/cli/master/packet_command.rb
262
- - lib/kontena/cli/master/upcloud/create_command.rb
263
- - lib/kontena/cli/master/upcloud_command.rb
264
241
  - lib/kontena/cli/master/use_command.rb
265
242
  - lib/kontena/cli/master/users/invite_command.rb
266
243
  - lib/kontena/cli/master/users/list_command.rb
@@ -269,50 +246,21 @@ files:
269
246
  - lib/kontena/cli/master/users/roles/add_command.rb
270
247
  - lib/kontena/cli/master/users/roles/remove_command.rb
271
248
  - lib/kontena/cli/master/users_command.rb
272
- - lib/kontena/cli/master/vagrant/create_command.rb
273
- - lib/kontena/cli/master/vagrant/restart_command.rb
274
- - lib/kontena/cli/master/vagrant/ssh_command.rb
275
- - lib/kontena/cli/master/vagrant/start_command.rb
276
- - lib/kontena/cli/master/vagrant/stop_command.rb
277
- - lib/kontena/cli/master/vagrant/terminate_command.rb
278
- - lib/kontena/cli/master/vagrant_command.rb
279
249
  - lib/kontena/cli/master_command.rb
280
250
  - lib/kontena/cli/node_command.rb
281
- - lib/kontena/cli/nodes/aws/create_command.rb
282
- - lib/kontena/cli/nodes/aws/restart_command.rb
283
- - lib/kontena/cli/nodes/aws/terminate_command.rb
284
- - lib/kontena/cli/nodes/aws_command.rb
285
- - lib/kontena/cli/nodes/azure/create_command.rb
286
- - lib/kontena/cli/nodes/azure/restart_command.rb
287
- - lib/kontena/cli/nodes/azure/terminate_command.rb
288
- - lib/kontena/cli/nodes/azure_command.rb
289
- - lib/kontena/cli/nodes/digital_ocean/create_command.rb
290
- - lib/kontena/cli/nodes/digital_ocean/restart_command.rb
291
- - lib/kontena/cli/nodes/digital_ocean/terminate_command.rb
292
- - lib/kontena/cli/nodes/digital_ocean_command.rb
293
251
  - lib/kontena/cli/nodes/label_command.rb
294
252
  - lib/kontena/cli/nodes/labels/add_command.rb
295
253
  - lib/kontena/cli/nodes/labels/remove_command.rb
296
254
  - lib/kontena/cli/nodes/list_command.rb
297
- - lib/kontena/cli/nodes/packet/create_command.rb
298
- - lib/kontena/cli/nodes/packet/restart_command.rb
299
- - lib/kontena/cli/nodes/packet/terminate_command.rb
300
- - lib/kontena/cli/nodes/packet_command.rb
301
255
  - lib/kontena/cli/nodes/remove_command.rb
302
256
  - lib/kontena/cli/nodes/show_command.rb
303
257
  - lib/kontena/cli/nodes/ssh_command.rb
304
- - lib/kontena/cli/nodes/upcloud/create_command.rb
305
- - lib/kontena/cli/nodes/upcloud/restart_command.rb
306
- - lib/kontena/cli/nodes/upcloud/terminate_command.rb
307
- - lib/kontena/cli/nodes/upcloud_command.rb
308
258
  - lib/kontena/cli/nodes/update_command.rb
309
- - lib/kontena/cli/nodes/vagrant/create_command.rb
310
- - lib/kontena/cli/nodes/vagrant/restart_command.rb
311
- - lib/kontena/cli/nodes/vagrant/ssh_command.rb
312
- - lib/kontena/cli/nodes/vagrant/start_command.rb
313
- - lib/kontena/cli/nodes/vagrant/stop_command.rb
314
- - lib/kontena/cli/nodes/vagrant/terminate_command.rb
315
- - lib/kontena/cli/nodes/vagrant_command.rb
259
+ - lib/kontena/cli/plugin_command.rb
260
+ - lib/kontena/cli/plugins/install_command.rb
261
+ - lib/kontena/cli/plugins/list_command.rb
262
+ - lib/kontena/cli/plugins/search_command.rb
263
+ - lib/kontena/cli/plugins/uninstall_command.rb
316
264
  - lib/kontena/cli/register_command.rb
317
265
  - lib/kontena/cli/registry/create_command.rb
318
266
  - lib/kontena/cli/registry/delete_command.rb
@@ -345,6 +293,14 @@ files:
345
293
  - lib/kontena/cli/services/stop_command.rb
346
294
  - lib/kontena/cli/services/unlink_command.rb
347
295
  - lib/kontena/cli/services/update_command.rb
296
+ - lib/kontena/cli/stack_command.rb
297
+ - lib/kontena/cli/stacks/common.rb
298
+ - lib/kontena/cli/stacks/create_command.rb
299
+ - lib/kontena/cli/stacks/deploy_command.rb
300
+ - lib/kontena/cli/stacks/list_command.rb
301
+ - lib/kontena/cli/stacks/remove_command.rb
302
+ - lib/kontena/cli/stacks/show_command.rb
303
+ - lib/kontena/cli/stacks/update_command.rb
348
304
  - lib/kontena/cli/user/forgot_password_command.rb
349
305
  - lib/kontena/cli/user/reset_password_command.rb
350
306
  - lib/kontena/cli/user/verify_command.rb
@@ -364,64 +320,28 @@ files:
364
320
  - lib/kontena/cli/vpn_command.rb
365
321
  - lib/kontena/cli/whoami_command.rb
366
322
  - lib/kontena/client.rb
323
+ - lib/kontena/command.rb
367
324
  - lib/kontena/errors.rb
368
- - lib/kontena/machine/aws.rb
369
- - lib/kontena/machine/aws/cloudinit.yml
370
- - lib/kontena/machine/aws/cloudinit_master.yml
371
- - lib/kontena/machine/aws/common.rb
372
- - lib/kontena/machine/aws/master_provisioner.rb
373
- - lib/kontena/machine/aws/node_destroyer.rb
374
- - lib/kontena/machine/aws/node_provisioner.rb
375
- - lib/kontena/machine/azure.rb
376
- - lib/kontena/machine/azure/cloudinit.yml
377
- - lib/kontena/machine/azure/cloudinit_master.yml
378
- - lib/kontena/machine/azure/logger.rb
379
- - lib/kontena/machine/azure/master_provisioner.rb
380
- - lib/kontena/machine/azure/node_destroyer.rb
381
- - lib/kontena/machine/azure/node_provisioner.rb
382
325
  - lib/kontena/machine/cert_helper.rb
383
326
  - lib/kontena/machine/cloud_config/cloudinit.yml
384
327
  - lib/kontena/machine/cloud_config/node_generator.rb
385
328
  - lib/kontena/machine/common.rb
386
- - lib/kontena/machine/digital_ocean.rb
387
- - lib/kontena/machine/digital_ocean/cloudinit.yml
388
- - lib/kontena/machine/digital_ocean/cloudinit_master.yml
389
- - lib/kontena/machine/digital_ocean/master_provisioner.rb
390
- - lib/kontena/machine/digital_ocean/node_destroyer.rb
391
- - lib/kontena/machine/digital_ocean/node_provisioner.rb
392
- - lib/kontena/machine/packet.rb
393
- - lib/kontena/machine/packet/cloudinit.yml
394
- - lib/kontena/machine/packet/cloudinit_master.yml
395
- - lib/kontena/machine/packet/master_provisioner.rb
396
- - lib/kontena/machine/packet/node_destroyer.rb
397
- - lib/kontena/machine/packet/node_provisioner.rb
398
- - lib/kontena/machine/packet/node_restarter.rb
399
- - lib/kontena/machine/packet/packet_common.rb
400
329
  - lib/kontena/machine/random_name.rb
401
- - lib/kontena/machine/upcloud.rb
402
- - lib/kontena/machine/upcloud/cloudinit.yml
403
- - lib/kontena/machine/upcloud/cloudinit_master.yml
404
- - lib/kontena/machine/upcloud/master_provisioner.rb
405
- - lib/kontena/machine/upcloud/node_destroyer.rb
406
- - lib/kontena/machine/upcloud/node_provisioner.rb
407
- - lib/kontena/machine/upcloud/node_restarter.rb
408
- - lib/kontena/machine/upcloud/upcloud_common.rb
409
- - lib/kontena/machine/vagrant.rb
410
- - lib/kontena/machine/vagrant/Vagrantfile.master.rb.erb
411
- - lib/kontena/machine/vagrant/Vagrantfile.node.rb.erb
412
- - lib/kontena/machine/vagrant/cloudinit.yml
413
- - lib/kontena/machine/vagrant/master_destroyer.rb
414
- - lib/kontena/machine/vagrant/master_provisioner.rb
415
- - lib/kontena/machine/vagrant/node_destroyer.rb
416
- - lib/kontena/machine/vagrant/node_provisioner.rb
330
+ - lib/kontena/main_command.rb
331
+ - lib/kontena/plugin_manager.rb
417
332
  - lib/kontena/scripts/completer
418
333
  - lib/kontena/scripts/init
334
+ - lib/kontena/util.rb
335
+ - lib/kontena_cli.rb
419
336
  - spec/fixtures/app.json
420
337
  - spec/fixtures/docker-compose.yml
421
338
  - spec/fixtures/docker-compose_v2.yml
339
+ - spec/fixtures/health.yml
340
+ - spec/fixtures/kontena-build.yml
422
341
  - spec/fixtures/kontena-invalid.yml
423
342
  - spec/fixtures/kontena-with-variables.yml
424
343
  - spec/fixtures/kontena.yml
344
+ - spec/fixtures/kontena_build_v2.yaml
425
345
  - spec/fixtures/kontena_v2.yml
426
346
  - spec/fixtures/mysql.yml
427
347
  - spec/fixtures/wordpress-scaled.yml
@@ -440,6 +360,7 @@ files:
440
360
  - spec/kontena/cli/app/yaml/validator_spec.rb
441
361
  - spec/kontena/cli/app/yaml/validator_v2_spec.rb
442
362
  - spec/kontena/cli/common_spec.rb
363
+ - spec/kontena/cli/containers/containers_helper_spec.rb
443
364
  - spec/kontena/cli/grids/trusted_subnets/add_command_spec.rb
444
365
  - spec/kontena/cli/grids/trusted_subnets/list_command_spec.rb
445
366
  - spec/kontena/cli/grids/trusted_subnets/remove_command_spec.rb
@@ -461,6 +382,8 @@ files:
461
382
  - spec/kontena/cli/services/update_command_spec.rb
462
383
  - spec/kontena/cli/version_command_spec.rb
463
384
  - spec/kontena/cli/vpn/create_command_spec.rb
385
+ - spec/kontena/client_spec.rb
386
+ - spec/kontena/plugin_manager_spec.rb
464
387
  - spec/spec_helper.rb
465
388
  - spec/support/client_helpers.rb
466
389
  - spec/support/fixtures_helpers.rb
@@ -480,12 +403,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
480
403
  version: 2.0.0
481
404
  required_rubygems_version: !ruby/object:Gem::Requirement
482
405
  requirements:
483
- - - ">="
406
+ - - ">"
484
407
  - !ruby/object:Gem::Version
485
- version: '0'
408
+ version: 1.3.1
486
409
  requirements: []
487
410
  rubyforge_project:
488
- rubygems_version: 2.4.5.1
411
+ rubygems_version: 2.5.1
489
412
  signing_key:
490
413
  specification_version: 4
491
414
  summary: Kontena command line tool
@@ -493,9 +416,12 @@ test_files:
493
416
  - spec/fixtures/app.json
494
417
  - spec/fixtures/docker-compose.yml
495
418
  - spec/fixtures/docker-compose_v2.yml
419
+ - spec/fixtures/health.yml
420
+ - spec/fixtures/kontena-build.yml
496
421
  - spec/fixtures/kontena-invalid.yml
497
422
  - spec/fixtures/kontena-with-variables.yml
498
423
  - spec/fixtures/kontena.yml
424
+ - spec/fixtures/kontena_build_v2.yaml
499
425
  - spec/fixtures/kontena_v2.yml
500
426
  - spec/fixtures/mysql.yml
501
427
  - spec/fixtures/wordpress-scaled.yml
@@ -514,6 +440,7 @@ test_files:
514
440
  - spec/kontena/cli/app/yaml/validator_spec.rb
515
441
  - spec/kontena/cli/app/yaml/validator_v2_spec.rb
516
442
  - spec/kontena/cli/common_spec.rb
443
+ - spec/kontena/cli/containers/containers_helper_spec.rb
517
444
  - spec/kontena/cli/grids/trusted_subnets/add_command_spec.rb
518
445
  - spec/kontena/cli/grids/trusted_subnets/list_command_spec.rb
519
446
  - spec/kontena/cli/grids/trusted_subnets/remove_command_spec.rb
@@ -535,6 +462,8 @@ test_files:
535
462
  - spec/kontena/cli/services/update_command_spec.rb
536
463
  - spec/kontena/cli/version_command_spec.rb
537
464
  - spec/kontena/cli/vpn/create_command_spec.rb
465
+ - spec/kontena/client_spec.rb
466
+ - spec/kontena/plugin_manager_spec.rb
538
467
  - spec/spec_helper.rb
539
468
  - spec/support/client_helpers.rb
540
469
  - spec/support/fixtures_helpers.rb
@@ -1,48 +0,0 @@
1
- require 'securerandom'
2
-
3
- module Kontena::Cli::Master::Aws
4
- class CreateCommand < Clamp::Command
5
- include Kontena::Cli::Common
6
-
7
- option "--access-key", "ACCESS_KEY", "AWS access key ID", required: true
8
- option "--secret-key", "SECRET_KEY", "AWS secret key", required: true
9
- option "--key-pair", "KEY_PAIR", "EC2 key pair name", required: true
10
- option "--ssl-cert", "SSL CERT", "SSL certificate file (default: generate self-signed cert)"
11
- option "--region", "REGION", "EC2 Region", default: 'eu-west-1'
12
- option "--zone", "ZONE", "EC2 Availability Zone", default: 'a'
13
- option "--vpc-id", "VPC ID", "Virtual Private Cloud (VPC) ID (default: default vpc)"
14
- option "--subnet-id", "SUBNET ID", "VPC option to specify subnet to launch instance into (default: first subnet from vpc/az)"
15
- option "--type", "SIZE", "Instance type", default: 't2.small'
16
- option "--storage", "STORAGE", "Storage size (GiB)", default: '30'
17
- option "--vault-secret", "VAULT_SECRET", "Secret key for Vault (default: generate random secret)"
18
- option "--vault-iv", "VAULT_IV", "Initialization vector for Vault (default: generate random iv)"
19
- option "--mongodb-uri", "URI", "External MongoDB uri (optional)"
20
- option "--version", "VERSION", "Define installed Kontena version", default: 'latest'
21
- option "--auth-provider-url", "AUTH_PROVIDER_URL", "Define authentication provider url (optional)"
22
- option "--associate-public-ip-address", :flag, "Whether to associated public IP in case the VPC defaults to not doing it", default: true, attribute_name: :associate_public_ip
23
- option "--security-groups", "SECURITY GROUPS", "Comma separated list of security groups (names) where the new instance will be attached (default: create 'kontena_master' group if not already existing)"
24
-
25
-
26
- def execute
27
- require 'kontena/machine/aws'
28
-
29
- provisioner = Kontena::Machine::Aws::MasterProvisioner.new(access_key, secret_key, region)
30
- provisioner.run!(
31
- type: type,
32
- vpc: vpc_id,
33
- zone: zone,
34
- subnet: subnet_id,
35
- ssl_cert: ssl_cert,
36
- storage: storage,
37
- version: version,
38
- key_pair: key_pair,
39
- auth_server: auth_provider_url,
40
- vault_secret: vault_secret || SecureRandom.hex(24),
41
- vault_iv: vault_iv || SecureRandom.hex(24),
42
- mongodb_uri: mongodb_uri,
43
- associate_public_ip: associate_public_ip?,
44
- security_groups: security_groups
45
- )
46
- end
47
- end
48
- end
@@ -1,8 +0,0 @@
1
- module Kontena::Cli::Master
2
-
3
- require_relative 'aws/create_command'
4
-
5
- class AwsCommand < Clamp::Command
6
- subcommand "create", "Create a new AWS master", Aws::CreateCommand
7
- end
8
- end
@@ -1,37 +0,0 @@
1
- require 'securerandom'
2
-
3
- module Kontena::Cli::Master::Azure
4
- class CreateCommand < Clamp::Command
5
- include Kontena::Cli::Common
6
-
7
- option "--subscription-id", "SUBSCRIPTION ID", "Azure subscription id", required: true
8
- option "--subscription-cert", "CERTIFICATE", "Path to Azure management certificate", attribute_name: :certificate, required: true
9
- option "--size", "SIZE", "SIZE", default: 'Small'
10
- option "--network", "NETWORK", "Virtual Network name"
11
- option "--subnet", "SUBNET", "Subnet name"
12
- option "--ssh-key", "SSH KEY", "SSH private key file", required: true
13
- option "--location", "LOCATION", "Location", default: 'West Europe'
14
- option "--ssl-cert", "SSL CERT", "SSL certificate file"
15
- option "--vault-secret", "VAULT_SECRET", "Secret key for Vault"
16
- option "--vault-iv", "VAULT_IV", "Initialization vector for Vault"
17
- option "--auth-provider-url", "AUTH_PROVIDER_URL", "Define authentication provider url"
18
- option "--version", "VERSION", "Define installed Kontena version", default: 'latest'
19
-
20
- def execute
21
- require 'kontena/machine/azure'
22
- provisioner = Kontena::Machine::Azure::MasterProvisioner.new(subscription_id, certificate)
23
- provisioner.run!(
24
- ssh_key: ssh_key,
25
- ssl_cert: ssl_cert,
26
- size: size,
27
- virtual_network: network,
28
- subnet: subnet,
29
- location: location,
30
- auth_server: auth_provider_url,
31
- version: version,
32
- vault_secret: vault_secret || SecureRandom.hex(24),
33
- vault_iv: vault_iv || SecureRandom.hex(24)
34
- )
35
- end
36
- end
37
- end
@@ -1,13 +0,0 @@
1
-
2
- module Kontena::Cli::Master
3
-
4
- require_relative 'azure/create_command'
5
-
6
- class AzureCommand < Clamp::Command
7
-
8
- subcommand "create", "Create a new Azure master", Azure::CreateCommand
9
-
10
- def execute
11
- end
12
- end
13
- end
@@ -1,38 +0,0 @@
1
- require 'securerandom'
2
-
3
- module Kontena::Cli::Master::DigitalOcean
4
- class CreateCommand < Clamp::Command
5
- include Kontena::Cli::Common
6
-
7
- option "--token", "TOKEN", "DigitalOcean API token", required: true
8
- option "--ssh-key", "SSH_KEY", "Path to ssh public key", required: true
9
- option "--ssl-cert", "SSL CERT", "SSL certificate file"
10
- option "--size", "SIZE", "Droplet size", default: '1gb'
11
- option "--region", "REGION", "Region", default: 'ams2'
12
- option "--vault-secret", "VAULT_SECRET", "Secret key for Vault (optional)"
13
- option "--vault-iv", "VAULT_IV", "Initialization vector for Vault (optional)"
14
- option "--mongodb-uri", "URI", "External MongoDB uri (optional)"
15
- option "--version", "VERSION", "Define installed Kontena version", default: 'latest'
16
- option "--auth-provider-url", "AUTH_PROVIDER_URL", "Define authentication provider url"
17
-
18
-
19
- def execute
20
-
21
- require 'kontena/machine/digital_ocean'
22
-
23
- provisioner = Kontena::Machine::DigitalOcean::MasterProvisioner.new(token)
24
- provisioner.run!(
25
- ssh_key: ssh_key,
26
- ssl_cert: ssl_cert,
27
- size: size,
28
- region: region,
29
- version: version,
30
- auth_server: auth_provider_url,
31
- vault_secret: vault_secret || SecureRandom.hex(24),
32
- vault_iv: vault_iv || SecureRandom.hex(24),
33
- mongodb_uri: mongodb_uri
34
- )
35
- end
36
-
37
- end
38
- end