corl 0.4.29 → 0.5.0

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 (230) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -3
  3. data/Gemfile.lock +16 -13
  4. data/VERSION +1 -1
  5. data/bin/corl +21 -1
  6. data/bootstrap/os/ubuntu/00_base.sh +2 -2
  7. data/bootstrap/os/ubuntu/06_puppet.sh +7 -12
  8. data/bootstrap/os/ubuntu/09_nucleon.sh +1 -1
  9. data/bootstrap/os/ubuntu/10_corl.sh +1 -4
  10. data/corl.gemspec +193 -40
  11. data/lib/CORL/builder/identity.rb +68 -0
  12. data/lib/CORL/builder/package.rb +75 -0
  13. data/lib/CORL/configuration/file.rb +5 -5
  14. data/lib/CORL/machine/{aws.rb → AWS.rb} +2 -2
  15. data/lib/CORL/machine/physical.rb +1 -1
  16. data/lib/CORL/machine/rackspace.rb +1 -1
  17. data/lib/CORL/machine/vagrant.rb +2 -2
  18. data/lib/CORL/network/{default.rb → CORL.rb} +1 -1
  19. data/lib/CORL/node/{aws.rb → AWS.rb} +1 -1
  20. data/lib/CORL/node/local.rb +1 -1
  21. data/lib/CORL/node/vagrant.rb +7 -2
  22. data/lib/CORL/provisioner/puppetnode.rb +139 -131
  23. data/lib/core/build.rb +112 -0
  24. data/lib/core/facade.rb +48 -8
  25. data/lib/core/mixin/builder.rb +158 -0
  26. data/lib/core/mixin/lookup.rb +51 -20
  27. data/lib/core/mixin/machine/ssh.rb +16 -4
  28. data/lib/core/plugin/builder.rb +49 -0
  29. data/lib/core/plugin/{action.rb → cloud_action.rb} +22 -16
  30. data/lib/core/plugin/configuration.rb +9 -3
  31. data/lib/core/plugin/fog_machine.rb +3 -3
  32. data/lib/core/plugin/fog_node.rb +1 -1
  33. data/lib/core/plugin/machine.rb +2 -2
  34. data/lib/core/plugin/network.rb +39 -10
  35. data/lib/core/plugin/node.rb +95 -35
  36. data/lib/core/plugin/provisioner.rb +133 -113
  37. data/lib/core/util/puppet/resource.rb +1 -1
  38. data/lib/core/vagrant/actions/delete_cache.rb +7 -1
  39. data/lib/core/vagrant/commands/launcher.rb +2 -2
  40. data/lib/core/vagrant/config.rb +29 -2
  41. data/lib/corl.rb +9 -8
  42. data/lib/facter/corl_config_ready.rb +1 -1
  43. data/lib/facter/vagrant_exists.rb +1 -1
  44. data/lib/nucleon/action/cloud/create.rb +51 -0
  45. data/lib/nucleon/action/cloud/hiera.rb +61 -0
  46. data/lib/{CORL/action → nucleon/action/cloud}/images.rb +11 -2
  47. data/lib/nucleon/action/cloud/inspect.rb +47 -0
  48. data/lib/{CORL/action → nucleon/action/cloud}/machines.rb +11 -2
  49. data/lib/{CORL/action → nucleon/action/cloud}/regions.rb +11 -2
  50. data/lib/{CORL/action → nucleon/action/cloud}/vagrantfile.rb +11 -2
  51. data/lib/{CORL/action/ip.rb → nucleon/action/node/IP.rb} +11 -2
  52. data/lib/{CORL/action/ssh.rb → nucleon/action/node/SSH.rb} +15 -7
  53. data/lib/{CORL/action → nucleon/action/node}/authorize.rb +11 -2
  54. data/lib/{CORL/action → nucleon/action/node}/bootstrap.rb +13 -4
  55. data/lib/nucleon/action/node/build.rb +49 -0
  56. data/lib/{CORL/action → nucleon/action/node}/destroy.rb +14 -5
  57. data/lib/{CORL/action → nucleon/action/node}/exec.rb +11 -2
  58. data/lib/{CORL/action → nucleon/action/node}/facts.rb +12 -3
  59. data/lib/{CORL/action → nucleon/action/node}/image.rb +13 -4
  60. data/lib/nucleon/action/node/keypair.rb +85 -0
  61. data/lib/{CORL/action → nucleon/action/node}/lookup.rb +13 -4
  62. data/lib/{CORL/action → nucleon/action/node}/provision.rb +30 -8
  63. data/lib/{CORL/action → nucleon/action/node}/reboot.rb +13 -4
  64. data/lib/{CORL/action → nucleon/action/node}/revoke.rb +11 -2
  65. data/lib/{CORL/action → nucleon/action/node}/seed.rb +13 -4
  66. data/lib/{CORL/action → nucleon/action/node}/spawn.rb +19 -9
  67. data/lib/{CORL/action → nucleon/action/node}/start.rb +13 -4
  68. data/lib/{CORL/action → nucleon/action/node}/stop.rb +13 -4
  69. data/lib/{CORL → nucleon}/event/puppet.rb +2 -2
  70. data/lib/{CORL → nucleon}/template/environment.rb +2 -2
  71. data/lib/puppet/indirector/corl.rb +7 -4
  72. data/lib/puppet/parser/functions/corl_resources.rb +1 -0
  73. data/lib/puppet/parser/functions/global_array.rb +2 -1
  74. data/lib/puppet/parser/functions/global_hash.rb +2 -1
  75. data/lib/puppet/parser/functions/global_param.rb +2 -1
  76. data/lib/puppet/parser/functions/module_array.rb +2 -1
  77. data/lib/puppet/parser/functions/module_hash.rb +3 -2
  78. data/lib/puppet/parser/functions/module_param.rb +3 -2
  79. data/lib/puppet/parser/functions/render.rb +1 -0
  80. data/locales/en.yml +80 -0
  81. data/rdoc/site/0.4.29/CORL/Action/Authorize.html +485 -0
  82. data/rdoc/site/0.4.29/CORL/Action/Bootstrap.html +546 -0
  83. data/rdoc/site/0.4.29/CORL/Action/Build.html +396 -0
  84. data/rdoc/site/0.4.29/CORL/Action/Destroy.html +515 -0
  85. data/rdoc/site/0.4.29/CORL/Action/Exec.html +472 -0
  86. data/rdoc/site/0.4.29/CORL/Action/Facts.html +398 -0
  87. data/rdoc/site/0.4.29/CORL/Action/Image.html +515 -0
  88. data/rdoc/site/0.4.29/CORL/Action/Images.html +514 -0
  89. data/rdoc/site/0.4.29/CORL/Action/Ip.html +395 -0
  90. data/rdoc/site/0.4.29/CORL/Action/Keypair.html +494 -0
  91. data/rdoc/site/0.4.29/CORL/Action/Lookup.html +474 -0
  92. data/rdoc/site/0.4.29/CORL/Action/Machines.html +509 -0
  93. data/rdoc/site/0.4.29/CORL/Action/Provision.html +456 -0
  94. data/rdoc/site/0.4.29/CORL/Action/Reboot.html +515 -0
  95. data/rdoc/site/0.4.29/CORL/Action/Regions.html +509 -0
  96. data/rdoc/site/0.4.29/CORL/Action/Revoke.html +483 -0
  97. data/rdoc/site/0.4.29/CORL/Action/Seed.html +544 -0
  98. data/rdoc/site/0.4.29/CORL/Action/Spawn.html +616 -0
  99. data/rdoc/site/0.4.29/CORL/Action/Ssh.html +526 -0
  100. data/rdoc/site/0.4.29/CORL/Action/Start.html +515 -0
  101. data/rdoc/site/0.4.29/CORL/Action/Stop.html +515 -0
  102. data/rdoc/site/0.4.29/CORL/Action/Vagrantfile.html +457 -0
  103. data/rdoc/site/0.4.29/CORL/Action.html +360 -0
  104. data/rdoc/site/0.4.29/CORL/Configuration/File.html +1128 -0
  105. data/rdoc/site/0.4.29/CORL/Configuration.html +339 -0
  106. data/rdoc/site/0.4.29/CORL/Errors.html +339 -0
  107. data/rdoc/site/0.4.29/CORL/Event/Puppet.html +673 -0
  108. data/rdoc/site/0.4.29/CORL/Event.html +339 -0
  109. data/rdoc/site/0.4.29/CORL/Facade.html +742 -0
  110. data/rdoc/site/0.4.29/CORL/Machine/Aws.html +733 -0
  111. data/rdoc/site/0.4.29/CORL/Machine/Fog.html +1269 -0
  112. data/rdoc/site/0.4.29/CORL/Machine/Physical.html +1039 -0
  113. data/rdoc/site/0.4.29/CORL/Machine/Rackspace.html +514 -0
  114. data/rdoc/site/0.4.29/CORL/Machine/Vagrant.html +1300 -0
  115. data/rdoc/site/0.4.29/CORL/Machine.html +343 -0
  116. data/rdoc/site/0.4.29/CORL/Mixin/Action/Keypair.html +572 -0
  117. data/rdoc/site/0.4.29/CORL/Mixin/Action.html +339 -0
  118. data/rdoc/site/0.4.29/CORL/Mixin/Lookup.html +954 -0
  119. data/rdoc/site/0.4.29/CORL/Mixin/Machine/SSH.html +643 -0
  120. data/rdoc/site/0.4.29/CORL/Mixin/Machine.html +339 -0
  121. data/rdoc/site/0.4.29/CORL/Mixin/Macro/NetworkSettings.html +464 -0
  122. data/rdoc/site/0.4.29/CORL/Mixin/Macro.html +339 -0
  123. data/rdoc/site/0.4.29/CORL/Mixin.html +342 -0
  124. data/rdoc/site/0.4.29/CORL/Network/Default.html +391 -0
  125. data/rdoc/site/0.4.29/CORL/Network.html +339 -0
  126. data/rdoc/site/0.4.29/CORL/Node/Aws.html +716 -0
  127. data/rdoc/site/0.4.29/CORL/Node/Fog.html +1192 -0
  128. data/rdoc/site/0.4.29/CORL/Node/Local.html +424 -0
  129. data/rdoc/site/0.4.29/CORL/Node/Rackspace.html +709 -0
  130. data/rdoc/site/0.4.29/CORL/Node/Vagrant.html +1451 -0
  131. data/rdoc/site/0.4.29/CORL/Node.html +343 -0
  132. data/rdoc/site/0.4.29/CORL/Plugin/CloudAction.html +810 -0
  133. data/rdoc/site/0.4.29/CORL/Plugin.html +339 -0
  134. data/rdoc/site/0.4.29/CORL/Provisioner/Puppetnode.html +1095 -0
  135. data/rdoc/site/0.4.29/CORL/Provisioner.html +339 -0
  136. data/rdoc/site/0.4.29/CORL/Template/Environment.html +528 -0
  137. data/rdoc/site/0.4.29/CORL/Template.html +339 -0
  138. data/rdoc/site/0.4.29/CORL/Util/Puppet/Resource.html +1038 -0
  139. data/rdoc/site/0.4.29/CORL/Util/Puppet/ResourceGroup.html +920 -0
  140. data/rdoc/site/0.4.29/CORL/Util/Puppet.html +1087 -0
  141. data/rdoc/site/0.4.29/CORL/Util.html +341 -0
  142. data/rdoc/site/0.4.29/CORL/Vagrant/Config.html +896 -0
  143. data/rdoc/site/0.4.29/CORL/Vagrant.html +418 -0
  144. data/rdoc/site/0.4.29/CORL.html +465 -0
  145. data/rdoc/site/0.4.29/Facter/Util/Loader.html +396 -0
  146. data/rdoc/site/0.4.29/Facter/Util.html +339 -0
  147. data/rdoc/site/0.4.29/Facter.html +339 -0
  148. data/rdoc/site/0.4.29/Fog/Compute/AWS/Server.html +423 -0
  149. data/rdoc/site/0.4.29/Fog/Compute/AWS.html +345 -0
  150. data/rdoc/site/0.4.29/Fog/Compute/RackspaceV2/Server.html +408 -0
  151. data/rdoc/site/0.4.29/Fog/Compute/RackspaceV2.html +345 -0
  152. data/rdoc/site/0.4.29/Fog/Compute.html +340 -0
  153. data/rdoc/site/0.4.29/Fog.html +340 -0
  154. data/rdoc/site/0.4.29/Hiera/Backend.html +422 -0
  155. data/rdoc/site/0.4.29/Hiera/Corl_logger.html +449 -0
  156. data/rdoc/site/0.4.29/Hiera.html +346 -0
  157. data/rdoc/site/0.4.29/Nucleon/Config.html +357 -0
  158. data/rdoc/site/0.4.29/Nucleon/Plugin/Base.html +345 -0
  159. data/rdoc/site/0.4.29/Nucleon/Plugin/Configuration.html +1213 -0
  160. data/rdoc/site/0.4.29/Nucleon/Plugin/Machine.html +1279 -0
  161. data/rdoc/site/0.4.29/Nucleon/Plugin/Network.html +1425 -0
  162. data/rdoc/site/0.4.29/Nucleon/Plugin/Node.html +3715 -0
  163. data/rdoc/site/0.4.29/Nucleon/Plugin/Provisioner.html +1297 -0
  164. data/rdoc/site/0.4.29/Nucleon/Plugin.html +344 -0
  165. data/rdoc/site/0.4.29/Nucleon.html +344 -0
  166. data/rdoc/site/0.4.29/Object.html +358 -0
  167. data/rdoc/site/0.4.29/Puppet/DataBinding/Corl.html +345 -0
  168. data/rdoc/site/0.4.29/Puppet/DataBinding.html +338 -0
  169. data/rdoc/site/0.4.29/Puppet/Indirector/Corl.html +454 -0
  170. data/rdoc/site/0.4.29/Puppet/Indirector.html +338 -0
  171. data/rdoc/site/0.4.29/Puppet/Parser/Functions.html +480 -0
  172. data/rdoc/site/0.4.29/Puppet/Parser.html +338 -0
  173. data/rdoc/site/0.4.29/Puppet.html +338 -0
  174. data/rdoc/site/0.4.29/README_rdoc.html +340 -0
  175. data/rdoc/site/0.4.29/Vagrant/Config/Loader.html +399 -0
  176. data/rdoc/site/0.4.29/Vagrant/Config.html +339 -0
  177. data/rdoc/site/0.4.29/Vagrant/Vagrantfile.html +392 -0
  178. data/rdoc/site/0.4.29/Vagrant.html +346 -0
  179. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action/DeleteCache.html +396 -0
  180. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action/InitKeys.html +408 -0
  181. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action/LinkNetwork.html +406 -0
  182. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action.html +341 -0
  183. data/rdoc/site/0.4.29/VagrantPlugins/CORL/BaseAction.html +491 -0
  184. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Command/Launcher.html +533 -0
  185. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Command.html +339 -0
  186. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Config/CORL.html +732 -0
  187. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Config.html +339 -0
  188. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Plugin.html +345 -0
  189. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Provisioner/CORL.html +536 -0
  190. data/rdoc/site/0.4.29/VagrantPlugins/CORL/Provisioner.html +339 -0
  191. data/rdoc/site/0.4.29/VagrantPlugins/CORL.html +346 -0
  192. data/rdoc/site/0.4.29/VagrantPlugins.html +346 -0
  193. data/rdoc/site/0.4.29/created.rid +96 -0
  194. data/rdoc/site/0.4.29/images/add.png +0 -0
  195. data/rdoc/site/0.4.29/images/brick.png +0 -0
  196. data/rdoc/site/0.4.29/images/brick_link.png +0 -0
  197. data/rdoc/site/0.4.29/images/bug.png +0 -0
  198. data/rdoc/site/0.4.29/images/bullet_black.png +0 -0
  199. data/rdoc/site/0.4.29/images/bullet_toggle_minus.png +0 -0
  200. data/rdoc/site/0.4.29/images/bullet_toggle_plus.png +0 -0
  201. data/rdoc/site/0.4.29/images/date.png +0 -0
  202. data/rdoc/site/0.4.29/images/delete.png +0 -0
  203. data/rdoc/site/0.4.29/images/find.png +0 -0
  204. data/rdoc/site/0.4.29/images/loadingAnimation.gif +0 -0
  205. data/rdoc/site/0.4.29/images/macFFBgHack.png +0 -0
  206. data/rdoc/site/0.4.29/images/package.png +0 -0
  207. data/rdoc/site/0.4.29/images/page_green.png +0 -0
  208. data/rdoc/site/0.4.29/images/page_white_text.png +0 -0
  209. data/rdoc/site/0.4.29/images/page_white_width.png +0 -0
  210. data/rdoc/site/0.4.29/images/plugin.png +0 -0
  211. data/rdoc/site/0.4.29/images/ruby.png +0 -0
  212. data/rdoc/site/0.4.29/images/tag_blue.png +0 -0
  213. data/rdoc/site/0.4.29/images/tag_green.png +0 -0
  214. data/rdoc/site/0.4.29/images/transparent.png +0 -0
  215. data/rdoc/site/0.4.29/images/wrench.png +0 -0
  216. data/rdoc/site/0.4.29/images/wrench_orange.png +0 -0
  217. data/rdoc/site/0.4.29/images/zoom.png +0 -0
  218. data/rdoc/site/0.4.29/index.html +339 -0
  219. data/rdoc/site/0.4.29/js/darkfish.js +155 -0
  220. data/rdoc/site/0.4.29/js/jquery.js +18 -0
  221. data/rdoc/site/0.4.29/js/navigation.js +142 -0
  222. data/rdoc/site/0.4.29/js/search.js +94 -0
  223. data/rdoc/site/0.4.29/js/search_index.js +1 -0
  224. data/rdoc/site/0.4.29/js/searcher.js +228 -0
  225. data/rdoc/site/0.4.29/rdoc.css +543 -0
  226. data/rdoc/site/0.4.29/table_of_contents.html +1561 -0
  227. metadata +192 -45
  228. data/lib/CORL/action/build.rb +0 -22
  229. data/lib/CORL/action/keypair.rb +0 -56
  230. data/lib/core/mod/facter_loader.rb +0 -15
@@ -1,9 +1,17 @@
1
1
 
2
- module CORL
2
+ module Nucleon
3
3
  module Action
4
- class Spawn < Plugin::CloudAction
4
+ module Node
5
+ class Spawn < CORL.plugin_class(:nucleon, :cloud_action)
5
6
 
6
7
  include Mixin::Action::Keypair
8
+
9
+ #-----------------------------------------------------------------------------
10
+ # Info
11
+
12
+ def self.describe
13
+ super(:node, :spawn, 635)
14
+ end
7
15
 
8
16
  #----------------------------------------------------------------------------
9
17
  # Settings
@@ -26,8 +34,8 @@ class Spawn < Plugin::CloudAction
26
34
 
27
35
  keypair_config
28
36
 
29
- config.defaults(CORL.action_config(:bootstrap))
30
- config.defaults(CORL.action_config(:seed))
37
+ config.defaults(CORL.action_config(:node_bootstrap))
38
+ config.defaults(CORL.action_config(:node_seed))
31
39
  end
32
40
  end
33
41
 
@@ -51,8 +59,9 @@ class Spawn < Plugin::CloudAction
51
59
  hostnames = []
52
60
  results = []
53
61
  node_provider = settings.delete(:node_provider)
62
+ is_parallel = CORL.parallel? && settings[:parallel]
54
63
 
55
- if CORL.vagrant? && ! CORL.loaded_plugins(:node).keys.include?(node_provider.to_sym)
64
+ if CORL.vagrant? && ! CORL.loaded_plugins(:CORL, :node).keys.include?(node_provider.to_sym)
56
65
  settings[:machine_type] = node_provider
57
66
  settings[:user] = :vagrant unless settings[:user]
58
67
  node_provider = :vagrant
@@ -72,13 +81,13 @@ class Spawn < Plugin::CloudAction
72
81
  hostname = hostname[:hostname]
73
82
  end
74
83
 
75
- if settings[:parallel]
76
- results << network.future.add_node(node_provider, hostname, settings)
84
+ if is_parallel
85
+ results << network.future.add_node(node_provider, hostname, settings.export)
77
86
  else
78
- results << network.add_node(node_provider, hostname, settings)
87
+ results << network.add_node(node_provider, hostname, settings.export)
79
88
  end
80
89
  end
81
- results = results.map { |future| future.value } if settings[:parallel]
90
+ results = results.map { |future| future.value } if is_parallel
82
91
  myself.status = code.batch_error if results.include?(false)
83
92
  else
84
93
  myself.status = code.key_failure
@@ -118,3 +127,4 @@ class Spawn < Plugin::CloudAction
118
127
  end
119
128
  end
120
129
  end
130
+ end
@@ -1,7 +1,15 @@
1
1
 
2
- module CORL
2
+ module Nucleon
3
3
  module Action
4
- class Start < Plugin::CloudAction
4
+ module Node
5
+ class Start < CORL.plugin_class(:nucleon, :cloud_action)
6
+
7
+ #-----------------------------------------------------------------------------
8
+ # Info
9
+
10
+ def self.describe
11
+ super(:node, :start, 585)
12
+ end
5
13
 
6
14
  #-----------------------------------------------------------------------------
7
15
  # Settings
@@ -14,11 +22,11 @@ class Start < Plugin::CloudAction
14
22
  next false
15
23
  end
16
24
 
17
- node_plugins = CORL.loaded_plugins(:node)
25
+ node_plugins = CORL.loaded_plugins(:CORL, :node)
18
26
  success = true
19
27
 
20
28
  values.each do |value|
21
- if info = CORL.plugin_class(:node).translate_reference(value)
29
+ if info = CORL.plugin_class(:CORL, :node).translate_reference(value)
22
30
  if ! node_plugins.keys.include?(info[:provider].to_sym) || info[:name].empty?
23
31
  warn('corl.actions.start.errors.start_nodes', { :value => value, :node_provider => info[:provider], :name => info[:name] })
24
32
  success = false
@@ -57,3 +65,4 @@ class Start < Plugin::CloudAction
57
65
  end
58
66
  end
59
67
  end
68
+ end
@@ -1,7 +1,15 @@
1
1
 
2
- module CORL
2
+ module Nucleon
3
3
  module Action
4
- class Stop < Plugin::CloudAction
4
+ module Node
5
+ class Stop < CORL.plugin_class(:nucleon, :cloud_action)
6
+
7
+ #-----------------------------------------------------------------------------
8
+ # Info
9
+
10
+ def self.describe
11
+ super(:node, :stop, 590)
12
+ end
5
13
 
6
14
  #-----------------------------------------------------------------------------
7
15
  # Settings
@@ -14,11 +22,11 @@ class Stop < Plugin::CloudAction
14
22
  next false
15
23
  end
16
24
 
17
- node_plugins = CORL.loaded_plugins(:node)
25
+ node_plugins = CORL.loaded_plugins(:CORL, :node)
18
26
  success = true
19
27
 
20
28
  values.each do |value|
21
- if info = CORL.plugin_class(:node).translate_reference(value)
29
+ if info = CORL.plugin_class(:CORL, :node).translate_reference(value)
22
30
  if ! node_plugins.keys.include?(info[:provider].to_sym) || info[:name].empty?
23
31
  warn('corl.actions.stop.errors.stop_nodes', { :value => value, :node_provider => info[:provider], :name => info[:name] })
24
32
  success = false
@@ -57,3 +65,4 @@ class Stop < Plugin::CloudAction
57
65
  end
58
66
  end
59
67
  end
68
+ end
@@ -1,7 +1,7 @@
1
1
 
2
- module CORL
2
+ module Nucleon
3
3
  module Event
4
- class Puppet < CORL.plugin_class(:event)
4
+ class Puppet < CORL.plugin_class(:nucleon, :event)
5
5
 
6
6
  #-----------------------------------------------------------------------------
7
7
  # Puppet event interface
@@ -1,7 +1,7 @@
1
1
 
2
- module CORL
2
+ module Nucleon
3
3
  module Template
4
- class Environment < CORL.plugin_class(:template)
4
+ class Environment < CORL.plugin_class(:nucleon, :template)
5
5
 
6
6
  #-----------------------------------------------------------------------------
7
7
  # Renderers
@@ -4,7 +4,9 @@ require 'puppet/indirector/terminus'
4
4
  class Puppet::Indirector::Corl < Puppet::Indirector::Terminus
5
5
 
6
6
  def initialize(*args)
7
- unless CORL::Config.config_initialized?
7
+ node = CORL::Provisioner::Puppetnode.node
8
+
9
+ unless node.config_initialized?
8
10
  raise "CORL terminus not supported without the CORL library"
9
11
  end
10
12
  super
@@ -13,7 +15,9 @@ class Puppet::Indirector::Corl < Puppet::Indirector::Terminus
13
15
  #---
14
16
 
15
17
  def find(request)
16
- puppet_scope = request.options[:variables]
18
+ node = CORL::Provisioner::Puppetnode.node
19
+
20
+ puppet_scope = request.options[:variables]
17
21
  module_name = nil
18
22
  module_name = puppet_scope.source.module_name if puppet_scope.source
19
23
  contexts = [ :param, :data_binding, request.key ]
@@ -34,7 +38,6 @@ class Puppet::Indirector::Corl < Puppet::Indirector::Terminus
34
38
  else
35
39
  config = CORL::Config.init_flat({}, contexts, default_options)
36
40
  end
37
-
38
- value = CORL::Config.lookup(request.key, nil, config)
41
+ node.lookup(request.key, nil, config)
39
42
  end
40
43
  end
@@ -42,6 +42,7 @@ If no resources are found, it returns without creating anything.
42
42
  contexts = [ :resource, type_name ]
43
43
 
44
44
  default_options = {
45
+ :node => CORL::Provisioner::Puppetnode.node,
45
46
  :provisioner => :puppetnode,
46
47
  :hiera_scope => self,
47
48
  :puppet_scope => self,
@@ -19,6 +19,7 @@ If no value is found in the defined sources, it returns an empty array ([])
19
19
  var_name = args[0]
20
20
  default = ( args.size > 1 ? args[1] : [] )
21
21
  options = ( args.size > 2 ? args[2] : {} )
22
+ node = CORL::Provisioner::Puppetnode.node
22
23
 
23
24
  config = CORL::Config.init_flat(options, [ :param, :global_array, var_name ], {
24
25
  :provisioner => :puppetnode,
@@ -29,7 +30,7 @@ If no value is found in the defined sources, it returns an empty array ([])
29
30
  :merge => true,
30
31
  :undefined_value => :undef
31
32
  })
32
- value = CORL::Config.lookup_array(var_name, default, config)
33
+ value = node.lookup_array(var_name, default, config)
33
34
  end
34
35
  return value
35
36
  end
@@ -19,6 +19,7 @@ If no value is found in the defined sources, it returns an empty hash ({})
19
19
  var_name = args[0]
20
20
  default = ( args.size > 1 ? args[1] : {} )
21
21
  options = ( args.size > 2 ? args[2] : {} )
22
+ node = CORL::Provisioner::Puppetnode.node
22
23
 
23
24
  config = CORL::Config.init_flat(options, [ :param, :global_hash, var_name ], {
24
25
  :provisioner => :puppetnode,
@@ -29,7 +30,7 @@ If no value is found in the defined sources, it returns an empty hash ({})
29
30
  :merge => true,
30
31
  :undefined_value => :undef
31
32
  })
32
- value = CORL::Config.lookup_hash(var_name, default, config)
33
+ value = node.lookup_hash(var_name, default, config)
33
34
  end
34
35
  return value
35
36
  end
@@ -27,6 +27,7 @@ If no value is found in the defined sources, it returns an empty string ('')
27
27
  var_name = args[0]
28
28
  default = ( args.size > 1 ? args[1] : '' )
29
29
  options = ( args.size > 2 ? args[2] : {} )
30
+ node = CORL::Provisioner::Puppetnode.node
30
31
 
31
32
  config = CORL::Config.init_flat(options, [ :param, :global_param, var_name ], {
32
33
  :provisioner => :puppetnode,
@@ -37,7 +38,7 @@ If no value is found in the defined sources, it returns an empty string ('')
37
38
  :merge => true,
38
39
  :undefined_value => :undef
39
40
  })
40
- value = CORL::Config.lookup(var_name, default, config)
41
+ value = node.lookup(var_name, default, config)
41
42
  end
42
43
  return value
43
44
  end
@@ -19,6 +19,7 @@ If no value is found in the defined sources, it returns an empty array ([])
19
19
  options = ( args.size > 2 ? args[2] : {} )
20
20
 
21
21
  module_name = parent_module_name
22
+ node = CORL::Provisioner::Puppetnode.node
22
23
 
23
24
  if module_name
24
25
  module_var_name = "#{module_name}::#{var_name}"
@@ -33,7 +34,7 @@ If no value is found in the defined sources, it returns an empty array ([])
33
34
  :merge => true,
34
35
  :undefined_value => :undef
35
36
  })
36
- value = CORL::Config.lookup_array(module_var_name, default, config)
37
+ value = node.lookup_array(module_var_name, default, config)
37
38
  end
38
39
  end
39
40
  return value
@@ -19,10 +19,11 @@ If no value is found in the defined sources, it returns an empty hash ({})
19
19
  options = ( args.size > 2 ? args[2] : {} )
20
20
 
21
21
  module_name = parent_module_name
22
+ node = CORL::Provisioner::Puppetnode.node
22
23
 
23
24
  if module_name
24
25
  module_var_name = "#{module_name}::#{var_name}"
25
-
26
+
26
27
  config = CORL::Config.init(options, [ :param, :module_hash, var_name ], module_name, {
27
28
  :provisioner => :puppetnode,
28
29
  :hiera_scope => self,
@@ -33,7 +34,7 @@ If no value is found in the defined sources, it returns an empty hash ({})
33
34
  :merge => true,
34
35
  :undefined_value => :undef
35
36
  })
36
- value = CORL::Config.lookup_hash(module_var_name, default, config)
37
+ value = node.lookup_hash(module_var_name, default, config)
37
38
  end
38
39
  end
39
40
  return value
@@ -29,10 +29,11 @@ If no value is found in the defined sources, it returns an empty string ('')
29
29
  options = ( args.size > 2 ? args[2] : {} )
30
30
 
31
31
  module_name = parent_module_name
32
+ node = CORL::Provisioner::Puppetnode.node
32
33
 
33
34
  if module_name
34
35
  module_var_name = "#{module_name}::#{var_name}"
35
-
36
+
36
37
  config = CORL::Config.init(options, [ :param, :module_param, var_name ], module_name, {
37
38
  :provisioner => :puppetnode,
38
39
  :hiera_scope => self,
@@ -43,7 +44,7 @@ If no value is found in the defined sources, it returns an empty string ('')
43
44
  :merge => true,
44
45
  :undefined_value => :undef
45
46
  })
46
- value = CORL::Config.lookup(module_var_name, default, config)
47
+ value = node.lookup(module_var_name, default, config)
47
48
  end
48
49
  end
49
50
  return value
@@ -22,6 +22,7 @@ This function returns the string-ified form of a given value.
22
22
  contexts = [ :data, :render, "template_#{provider}" ]
23
23
 
24
24
  default_options = {
25
+ :node => CORL::Provisioner::Puppetnode.node,
25
26
  :provisioner => :puppetnode,
26
27
  :hiera_scope => self,
27
28
  :puppet_scope => self,
data/locales/en.yml CHANGED
@@ -52,6 +52,86 @@ en:
52
52
  Encryption strength must be greater than %{required} bits (%{value} specified)
53
53
  no_password: |-
54
54
  Password verification of private key was terminated (verification required to use encrypted SSH keys)
55
+ action:
56
+ unknown:
57
+ description: |-
58
+ This CORL action has no description available
59
+ help: |-
60
+ There is no extended help information available for this CORL action.
61
+ cloud:
62
+ create:
63
+ description: |-
64
+ Create a new network project
65
+ inspect:
66
+ description: |-
67
+ Inspect the network configuration
68
+ machines:
69
+ description: |-
70
+ Return a list of machine types supported by a provider
71
+ regions:
72
+ description: |-
73
+ Retrieve known regions for a specified provider
74
+ images:
75
+ description: |-
76
+ Search the available images at a specified provider
77
+ vagrantfile:
78
+ description: |-
79
+ Generate a scaffolding Vagrantfile
80
+ node:
81
+ spawn:
82
+ description: |-
83
+ Spawn new nodes in the network
84
+ bootstrap:
85
+ description: |-
86
+ Bootstrap existing nodes
87
+ seed:
88
+ description: |-
89
+ Seed nodes with a specified network project
90
+ build:
91
+ description: |-
92
+ Build packages on nodes
93
+ provision:
94
+ description: |-
95
+ Provision nodes
96
+ image:
97
+ description: |-
98
+ Create images of existing nodes
99
+ exec:
100
+ description: |-
101
+ Execute CLI commands across nodes
102
+ reboot:
103
+ description: |-
104
+ Reboot nodes
105
+ stop:
106
+ description: |-
107
+ Stop and save currently running nodes
108
+ start:
109
+ description: |-
110
+ Start an existing saved node
111
+ destroy:
112
+ description: |-
113
+ Destroy network nodes
114
+ ip:
115
+ description: |-
116
+ Return the public IP address for nodes
117
+ facts:
118
+ description: |-
119
+ Retrieve node facts
120
+ lookup:
121
+ description: |-
122
+ Lookup node configurations
123
+ ssh:
124
+ description: |-
125
+ SSH into a node
126
+ authorize:
127
+ description: |-
128
+ Authorize a public key for node access
129
+ revoke:
130
+ description: |-
131
+ Revoke a public keys access to nodes
132
+ keypair:
133
+ description: |-
134
+ Generate a new SSH keypair
55
135
  actions:
56
136
  images:
57
137
  options: