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.
- checksums.yaml +4 -4
- data/Gemfile +3 -3
- data/Gemfile.lock +16 -13
- data/VERSION +1 -1
- data/bin/corl +21 -1
- data/bootstrap/os/ubuntu/00_base.sh +2 -2
- data/bootstrap/os/ubuntu/06_puppet.sh +7 -12
- data/bootstrap/os/ubuntu/09_nucleon.sh +1 -1
- data/bootstrap/os/ubuntu/10_corl.sh +1 -4
- data/corl.gemspec +193 -40
- data/lib/CORL/builder/identity.rb +68 -0
- data/lib/CORL/builder/package.rb +75 -0
- data/lib/CORL/configuration/file.rb +5 -5
- data/lib/CORL/machine/{aws.rb → AWS.rb} +2 -2
- data/lib/CORL/machine/physical.rb +1 -1
- data/lib/CORL/machine/rackspace.rb +1 -1
- data/lib/CORL/machine/vagrant.rb +2 -2
- data/lib/CORL/network/{default.rb → CORL.rb} +1 -1
- data/lib/CORL/node/{aws.rb → AWS.rb} +1 -1
- data/lib/CORL/node/local.rb +1 -1
- data/lib/CORL/node/vagrant.rb +7 -2
- data/lib/CORL/provisioner/puppetnode.rb +139 -131
- data/lib/core/build.rb +112 -0
- data/lib/core/facade.rb +48 -8
- data/lib/core/mixin/builder.rb +158 -0
- data/lib/core/mixin/lookup.rb +51 -20
- data/lib/core/mixin/machine/ssh.rb +16 -4
- data/lib/core/plugin/builder.rb +49 -0
- data/lib/core/plugin/{action.rb → cloud_action.rb} +22 -16
- data/lib/core/plugin/configuration.rb +9 -3
- data/lib/core/plugin/fog_machine.rb +3 -3
- data/lib/core/plugin/fog_node.rb +1 -1
- data/lib/core/plugin/machine.rb +2 -2
- data/lib/core/plugin/network.rb +39 -10
- data/lib/core/plugin/node.rb +95 -35
- data/lib/core/plugin/provisioner.rb +133 -113
- data/lib/core/util/puppet/resource.rb +1 -1
- data/lib/core/vagrant/actions/delete_cache.rb +7 -1
- data/lib/core/vagrant/commands/launcher.rb +2 -2
- data/lib/core/vagrant/config.rb +29 -2
- data/lib/corl.rb +9 -8
- data/lib/facter/corl_config_ready.rb +1 -1
- data/lib/facter/vagrant_exists.rb +1 -1
- data/lib/nucleon/action/cloud/create.rb +51 -0
- data/lib/nucleon/action/cloud/hiera.rb +61 -0
- data/lib/{CORL/action → nucleon/action/cloud}/images.rb +11 -2
- data/lib/nucleon/action/cloud/inspect.rb +47 -0
- data/lib/{CORL/action → nucleon/action/cloud}/machines.rb +11 -2
- data/lib/{CORL/action → nucleon/action/cloud}/regions.rb +11 -2
- data/lib/{CORL/action → nucleon/action/cloud}/vagrantfile.rb +11 -2
- data/lib/{CORL/action/ip.rb → nucleon/action/node/IP.rb} +11 -2
- data/lib/{CORL/action/ssh.rb → nucleon/action/node/SSH.rb} +15 -7
- data/lib/{CORL/action → nucleon/action/node}/authorize.rb +11 -2
- data/lib/{CORL/action → nucleon/action/node}/bootstrap.rb +13 -4
- data/lib/nucleon/action/node/build.rb +49 -0
- data/lib/{CORL/action → nucleon/action/node}/destroy.rb +14 -5
- data/lib/{CORL/action → nucleon/action/node}/exec.rb +11 -2
- data/lib/{CORL/action → nucleon/action/node}/facts.rb +12 -3
- data/lib/{CORL/action → nucleon/action/node}/image.rb +13 -4
- data/lib/nucleon/action/node/keypair.rb +85 -0
- data/lib/{CORL/action → nucleon/action/node}/lookup.rb +13 -4
- data/lib/{CORL/action → nucleon/action/node}/provision.rb +30 -8
- data/lib/{CORL/action → nucleon/action/node}/reboot.rb +13 -4
- data/lib/{CORL/action → nucleon/action/node}/revoke.rb +11 -2
- data/lib/{CORL/action → nucleon/action/node}/seed.rb +13 -4
- data/lib/{CORL/action → nucleon/action/node}/spawn.rb +19 -9
- data/lib/{CORL/action → nucleon/action/node}/start.rb +13 -4
- data/lib/{CORL/action → nucleon/action/node}/stop.rb +13 -4
- data/lib/{CORL → nucleon}/event/puppet.rb +2 -2
- data/lib/{CORL → nucleon}/template/environment.rb +2 -2
- data/lib/puppet/indirector/corl.rb +7 -4
- data/lib/puppet/parser/functions/corl_resources.rb +1 -0
- data/lib/puppet/parser/functions/global_array.rb +2 -1
- data/lib/puppet/parser/functions/global_hash.rb +2 -1
- data/lib/puppet/parser/functions/global_param.rb +2 -1
- data/lib/puppet/parser/functions/module_array.rb +2 -1
- data/lib/puppet/parser/functions/module_hash.rb +3 -2
- data/lib/puppet/parser/functions/module_param.rb +3 -2
- data/lib/puppet/parser/functions/render.rb +1 -0
- data/locales/en.yml +80 -0
- data/rdoc/site/0.4.29/CORL/Action/Authorize.html +485 -0
- data/rdoc/site/0.4.29/CORL/Action/Bootstrap.html +546 -0
- data/rdoc/site/0.4.29/CORL/Action/Build.html +396 -0
- data/rdoc/site/0.4.29/CORL/Action/Destroy.html +515 -0
- data/rdoc/site/0.4.29/CORL/Action/Exec.html +472 -0
- data/rdoc/site/0.4.29/CORL/Action/Facts.html +398 -0
- data/rdoc/site/0.4.29/CORL/Action/Image.html +515 -0
- data/rdoc/site/0.4.29/CORL/Action/Images.html +514 -0
- data/rdoc/site/0.4.29/CORL/Action/Ip.html +395 -0
- data/rdoc/site/0.4.29/CORL/Action/Keypair.html +494 -0
- data/rdoc/site/0.4.29/CORL/Action/Lookup.html +474 -0
- data/rdoc/site/0.4.29/CORL/Action/Machines.html +509 -0
- data/rdoc/site/0.4.29/CORL/Action/Provision.html +456 -0
- data/rdoc/site/0.4.29/CORL/Action/Reboot.html +515 -0
- data/rdoc/site/0.4.29/CORL/Action/Regions.html +509 -0
- data/rdoc/site/0.4.29/CORL/Action/Revoke.html +483 -0
- data/rdoc/site/0.4.29/CORL/Action/Seed.html +544 -0
- data/rdoc/site/0.4.29/CORL/Action/Spawn.html +616 -0
- data/rdoc/site/0.4.29/CORL/Action/Ssh.html +526 -0
- data/rdoc/site/0.4.29/CORL/Action/Start.html +515 -0
- data/rdoc/site/0.4.29/CORL/Action/Stop.html +515 -0
- data/rdoc/site/0.4.29/CORL/Action/Vagrantfile.html +457 -0
- data/rdoc/site/0.4.29/CORL/Action.html +360 -0
- data/rdoc/site/0.4.29/CORL/Configuration/File.html +1128 -0
- data/rdoc/site/0.4.29/CORL/Configuration.html +339 -0
- data/rdoc/site/0.4.29/CORL/Errors.html +339 -0
- data/rdoc/site/0.4.29/CORL/Event/Puppet.html +673 -0
- data/rdoc/site/0.4.29/CORL/Event.html +339 -0
- data/rdoc/site/0.4.29/CORL/Facade.html +742 -0
- data/rdoc/site/0.4.29/CORL/Machine/Aws.html +733 -0
- data/rdoc/site/0.4.29/CORL/Machine/Fog.html +1269 -0
- data/rdoc/site/0.4.29/CORL/Machine/Physical.html +1039 -0
- data/rdoc/site/0.4.29/CORL/Machine/Rackspace.html +514 -0
- data/rdoc/site/0.4.29/CORL/Machine/Vagrant.html +1300 -0
- data/rdoc/site/0.4.29/CORL/Machine.html +343 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Action/Keypair.html +572 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Action.html +339 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Lookup.html +954 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Machine/SSH.html +643 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Machine.html +339 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Macro/NetworkSettings.html +464 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Macro.html +339 -0
- data/rdoc/site/0.4.29/CORL/Mixin.html +342 -0
- data/rdoc/site/0.4.29/CORL/Network/Default.html +391 -0
- data/rdoc/site/0.4.29/CORL/Network.html +339 -0
- data/rdoc/site/0.4.29/CORL/Node/Aws.html +716 -0
- data/rdoc/site/0.4.29/CORL/Node/Fog.html +1192 -0
- data/rdoc/site/0.4.29/CORL/Node/Local.html +424 -0
- data/rdoc/site/0.4.29/CORL/Node/Rackspace.html +709 -0
- data/rdoc/site/0.4.29/CORL/Node/Vagrant.html +1451 -0
- data/rdoc/site/0.4.29/CORL/Node.html +343 -0
- data/rdoc/site/0.4.29/CORL/Plugin/CloudAction.html +810 -0
- data/rdoc/site/0.4.29/CORL/Plugin.html +339 -0
- data/rdoc/site/0.4.29/CORL/Provisioner/Puppetnode.html +1095 -0
- data/rdoc/site/0.4.29/CORL/Provisioner.html +339 -0
- data/rdoc/site/0.4.29/CORL/Template/Environment.html +528 -0
- data/rdoc/site/0.4.29/CORL/Template.html +339 -0
- data/rdoc/site/0.4.29/CORL/Util/Puppet/Resource.html +1038 -0
- data/rdoc/site/0.4.29/CORL/Util/Puppet/ResourceGroup.html +920 -0
- data/rdoc/site/0.4.29/CORL/Util/Puppet.html +1087 -0
- data/rdoc/site/0.4.29/CORL/Util.html +341 -0
- data/rdoc/site/0.4.29/CORL/Vagrant/Config.html +896 -0
- data/rdoc/site/0.4.29/CORL/Vagrant.html +418 -0
- data/rdoc/site/0.4.29/CORL.html +465 -0
- data/rdoc/site/0.4.29/Facter/Util/Loader.html +396 -0
- data/rdoc/site/0.4.29/Facter/Util.html +339 -0
- data/rdoc/site/0.4.29/Facter.html +339 -0
- data/rdoc/site/0.4.29/Fog/Compute/AWS/Server.html +423 -0
- data/rdoc/site/0.4.29/Fog/Compute/AWS.html +345 -0
- data/rdoc/site/0.4.29/Fog/Compute/RackspaceV2/Server.html +408 -0
- data/rdoc/site/0.4.29/Fog/Compute/RackspaceV2.html +345 -0
- data/rdoc/site/0.4.29/Fog/Compute.html +340 -0
- data/rdoc/site/0.4.29/Fog.html +340 -0
- data/rdoc/site/0.4.29/Hiera/Backend.html +422 -0
- data/rdoc/site/0.4.29/Hiera/Corl_logger.html +449 -0
- data/rdoc/site/0.4.29/Hiera.html +346 -0
- data/rdoc/site/0.4.29/Nucleon/Config.html +357 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin/Base.html +345 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin/Configuration.html +1213 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin/Machine.html +1279 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin/Network.html +1425 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin/Node.html +3715 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin/Provisioner.html +1297 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin.html +344 -0
- data/rdoc/site/0.4.29/Nucleon.html +344 -0
- data/rdoc/site/0.4.29/Object.html +358 -0
- data/rdoc/site/0.4.29/Puppet/DataBinding/Corl.html +345 -0
- data/rdoc/site/0.4.29/Puppet/DataBinding.html +338 -0
- data/rdoc/site/0.4.29/Puppet/Indirector/Corl.html +454 -0
- data/rdoc/site/0.4.29/Puppet/Indirector.html +338 -0
- data/rdoc/site/0.4.29/Puppet/Parser/Functions.html +480 -0
- data/rdoc/site/0.4.29/Puppet/Parser.html +338 -0
- data/rdoc/site/0.4.29/Puppet.html +338 -0
- data/rdoc/site/0.4.29/README_rdoc.html +340 -0
- data/rdoc/site/0.4.29/Vagrant/Config/Loader.html +399 -0
- data/rdoc/site/0.4.29/Vagrant/Config.html +339 -0
- data/rdoc/site/0.4.29/Vagrant/Vagrantfile.html +392 -0
- data/rdoc/site/0.4.29/Vagrant.html +346 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action/DeleteCache.html +396 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action/InitKeys.html +408 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action/LinkNetwork.html +406 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action.html +341 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/BaseAction.html +491 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Command/Launcher.html +533 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Command.html +339 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Config/CORL.html +732 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Config.html +339 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Plugin.html +345 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Provisioner/CORL.html +536 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Provisioner.html +339 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL.html +346 -0
- data/rdoc/site/0.4.29/VagrantPlugins.html +346 -0
- data/rdoc/site/0.4.29/created.rid +96 -0
- data/rdoc/site/0.4.29/images/add.png +0 -0
- data/rdoc/site/0.4.29/images/brick.png +0 -0
- data/rdoc/site/0.4.29/images/brick_link.png +0 -0
- data/rdoc/site/0.4.29/images/bug.png +0 -0
- data/rdoc/site/0.4.29/images/bullet_black.png +0 -0
- data/rdoc/site/0.4.29/images/bullet_toggle_minus.png +0 -0
- data/rdoc/site/0.4.29/images/bullet_toggle_plus.png +0 -0
- data/rdoc/site/0.4.29/images/date.png +0 -0
- data/rdoc/site/0.4.29/images/delete.png +0 -0
- data/rdoc/site/0.4.29/images/find.png +0 -0
- data/rdoc/site/0.4.29/images/loadingAnimation.gif +0 -0
- data/rdoc/site/0.4.29/images/macFFBgHack.png +0 -0
- data/rdoc/site/0.4.29/images/package.png +0 -0
- data/rdoc/site/0.4.29/images/page_green.png +0 -0
- data/rdoc/site/0.4.29/images/page_white_text.png +0 -0
- data/rdoc/site/0.4.29/images/page_white_width.png +0 -0
- data/rdoc/site/0.4.29/images/plugin.png +0 -0
- data/rdoc/site/0.4.29/images/ruby.png +0 -0
- data/rdoc/site/0.4.29/images/tag_blue.png +0 -0
- data/rdoc/site/0.4.29/images/tag_green.png +0 -0
- data/rdoc/site/0.4.29/images/transparent.png +0 -0
- data/rdoc/site/0.4.29/images/wrench.png +0 -0
- data/rdoc/site/0.4.29/images/wrench_orange.png +0 -0
- data/rdoc/site/0.4.29/images/zoom.png +0 -0
- data/rdoc/site/0.4.29/index.html +339 -0
- data/rdoc/site/0.4.29/js/darkfish.js +155 -0
- data/rdoc/site/0.4.29/js/jquery.js +18 -0
- data/rdoc/site/0.4.29/js/navigation.js +142 -0
- data/rdoc/site/0.4.29/js/search.js +94 -0
- data/rdoc/site/0.4.29/js/search_index.js +1 -0
- data/rdoc/site/0.4.29/js/searcher.js +228 -0
- data/rdoc/site/0.4.29/rdoc.css +543 -0
- data/rdoc/site/0.4.29/table_of_contents.html +1561 -0
- metadata +192 -45
- data/lib/CORL/action/build.rb +0 -22
- data/lib/CORL/action/keypair.rb +0 -56
- data/lib/core/mod/facter_loader.rb +0 -15
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
|
|
2
|
-
module
|
|
2
|
+
module Nucleon
|
|
3
3
|
module Action
|
|
4
|
-
|
|
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(:
|
|
30
|
-
config.defaults(CORL.action_config(:
|
|
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
|
|
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
|
|
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
|
|
2
|
+
module Nucleon
|
|
3
3
|
module Action
|
|
4
|
-
|
|
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
|
|
2
|
+
module Nucleon
|
|
3
3
|
module Action
|
|
4
|
-
|
|
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
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
|
@@ -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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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:
|