corl 0.5.2 → 0.5.3
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 +7 -7
- data/.gitignore +51 -0
- data/Gemfile +6 -11
- data/Gemfile.lock +122 -147
- data/Rakefile +22 -21
- data/TODO.rdoc +12 -0
- data/VERSION +1 -1
- data/bin/corl +15 -21
- data/bootstrap/bootstrap.sh +50 -16
- data/bootstrap/lib/shell/os.sh +2 -2
- data/bootstrap/os/ubuntu/00_base.sh +11 -4
- data/bootstrap/os/ubuntu/01_git.sh +6 -3
- data/bootstrap/os/ubuntu/{02-editor.sh → 02_editor.sh} +8 -2
- data/bootstrap/os/ubuntu/05_ruby.sh +63 -15
- data/bootstrap/os/ubuntu/06_puppet.sh +9 -4
- data/bootstrap/os/ubuntu/09_nucleon.sh +25 -9
- data/bootstrap/os/ubuntu/10_corl.sh +24 -10
- data/corl.gemspec +27 -502
- data/lib/CORL/configuration/file.rb +112 -112
- data/lib/CORL/machine/rackspace.rb +18 -17
- data/lib/core/facade.rb +1 -1
- data/lib/core/plugin/agent.rb +141 -0
- data/lib/core/plugin/cloud_action.rb +67 -62
- data/lib/core/plugin/configuration.rb +71 -70
- data/lib/core/plugin/network.rb +163 -151
- data/lib/core/plugin/node.rb +457 -422
- data/lib/core/vagrant/commands/launcher.rb +13 -13
- data/lib/core/vagrant/provisioner/config.rb +1 -3
- data/lib/nucleon/action/node/bootstrap.rb +21 -16
- data/lib/nucleon/action/node/destroy.rb +13 -13
- data/lib/nucleon/action/node/seed.rb +62 -64
- data/lib/nucleon/action/node/status.rb +39 -32
- data/locales/en.yml +121 -116
- data/spec/spec_helper.rb +1 -4
- metadata +111 -641
- data/.document +0 -5
- data/lib/core/mod/fog_rackspace_server.rb +0 -29
- data/lib/core/vagrant/Vagrantfile +0 -10
- data/lib/nucleon/action/plugin/template/nucleon.action.erb +0 -56
- data/rdoc/site/0.4.29/CORL/Action/Authorize.html +0 -485
- data/rdoc/site/0.4.29/CORL/Action/Bootstrap.html +0 -546
- data/rdoc/site/0.4.29/CORL/Action/Build.html +0 -396
- data/rdoc/site/0.4.29/CORL/Action/Destroy.html +0 -515
- data/rdoc/site/0.4.29/CORL/Action/Exec.html +0 -472
- data/rdoc/site/0.4.29/CORL/Action/Facts.html +0 -398
- data/rdoc/site/0.4.29/CORL/Action/Image.html +0 -515
- data/rdoc/site/0.4.29/CORL/Action/Images.html +0 -514
- data/rdoc/site/0.4.29/CORL/Action/Ip.html +0 -395
- data/rdoc/site/0.4.29/CORL/Action/Keypair.html +0 -494
- data/rdoc/site/0.4.29/CORL/Action/Lookup.html +0 -474
- data/rdoc/site/0.4.29/CORL/Action/Machines.html +0 -509
- data/rdoc/site/0.4.29/CORL/Action/Provision.html +0 -456
- data/rdoc/site/0.4.29/CORL/Action/Reboot.html +0 -515
- data/rdoc/site/0.4.29/CORL/Action/Regions.html +0 -509
- data/rdoc/site/0.4.29/CORL/Action/Revoke.html +0 -483
- data/rdoc/site/0.4.29/CORL/Action/Seed.html +0 -544
- data/rdoc/site/0.4.29/CORL/Action/Spawn.html +0 -616
- data/rdoc/site/0.4.29/CORL/Action/Ssh.html +0 -526
- data/rdoc/site/0.4.29/CORL/Action/Start.html +0 -515
- data/rdoc/site/0.4.29/CORL/Action/Stop.html +0 -515
- data/rdoc/site/0.4.29/CORL/Action/Vagrantfile.html +0 -457
- data/rdoc/site/0.4.29/CORL/Action.html +0 -360
- data/rdoc/site/0.4.29/CORL/Configuration/File.html +0 -1128
- data/rdoc/site/0.4.29/CORL/Configuration.html +0 -339
- data/rdoc/site/0.4.29/CORL/Errors.html +0 -339
- data/rdoc/site/0.4.29/CORL/Event/Puppet.html +0 -673
- data/rdoc/site/0.4.29/CORL/Event.html +0 -339
- data/rdoc/site/0.4.29/CORL/Facade.html +0 -742
- data/rdoc/site/0.4.29/CORL/Machine/Aws.html +0 -733
- data/rdoc/site/0.4.29/CORL/Machine/Fog.html +0 -1269
- data/rdoc/site/0.4.29/CORL/Machine/Physical.html +0 -1039
- data/rdoc/site/0.4.29/CORL/Machine/Rackspace.html +0 -514
- data/rdoc/site/0.4.29/CORL/Machine/Vagrant.html +0 -1300
- data/rdoc/site/0.4.29/CORL/Machine.html +0 -343
- data/rdoc/site/0.4.29/CORL/Mixin/Action/Keypair.html +0 -572
- data/rdoc/site/0.4.29/CORL/Mixin/Action.html +0 -339
- data/rdoc/site/0.4.29/CORL/Mixin/Lookup.html +0 -954
- data/rdoc/site/0.4.29/CORL/Mixin/Machine/SSH.html +0 -643
- data/rdoc/site/0.4.29/CORL/Mixin/Machine.html +0 -339
- data/rdoc/site/0.4.29/CORL/Mixin/Macro/NetworkSettings.html +0 -464
- data/rdoc/site/0.4.29/CORL/Mixin/Macro.html +0 -339
- data/rdoc/site/0.4.29/CORL/Mixin.html +0 -342
- data/rdoc/site/0.4.29/CORL/Network/Default.html +0 -391
- data/rdoc/site/0.4.29/CORL/Network.html +0 -339
- data/rdoc/site/0.4.29/CORL/Node/Aws.html +0 -716
- data/rdoc/site/0.4.29/CORL/Node/Fog.html +0 -1192
- data/rdoc/site/0.4.29/CORL/Node/Local.html +0 -424
- data/rdoc/site/0.4.29/CORL/Node/Rackspace.html +0 -709
- data/rdoc/site/0.4.29/CORL/Node/Vagrant.html +0 -1451
- data/rdoc/site/0.4.29/CORL/Node.html +0 -343
- data/rdoc/site/0.4.29/CORL/Plugin/CloudAction.html +0 -810
- data/rdoc/site/0.4.29/CORL/Plugin.html +0 -339
- data/rdoc/site/0.4.29/CORL/Provisioner/Puppetnode.html +0 -1095
- data/rdoc/site/0.4.29/CORL/Provisioner.html +0 -339
- data/rdoc/site/0.4.29/CORL/Template/Environment.html +0 -528
- data/rdoc/site/0.4.29/CORL/Template.html +0 -339
- data/rdoc/site/0.4.29/CORL/Util/Puppet/Resource.html +0 -1038
- data/rdoc/site/0.4.29/CORL/Util/Puppet/ResourceGroup.html +0 -920
- data/rdoc/site/0.4.29/CORL/Util/Puppet.html +0 -1087
- data/rdoc/site/0.4.29/CORL/Util.html +0 -341
- data/rdoc/site/0.4.29/CORL/Vagrant/Config.html +0 -896
- data/rdoc/site/0.4.29/CORL/Vagrant.html +0 -418
- data/rdoc/site/0.4.29/CORL.html +0 -465
- data/rdoc/site/0.4.29/Facter/Util/Loader.html +0 -396
- data/rdoc/site/0.4.29/Facter/Util.html +0 -339
- data/rdoc/site/0.4.29/Facter.html +0 -339
- data/rdoc/site/0.4.29/Fog/Compute/AWS/Server.html +0 -423
- data/rdoc/site/0.4.29/Fog/Compute/AWS.html +0 -345
- data/rdoc/site/0.4.29/Fog/Compute/RackspaceV2/Server.html +0 -408
- data/rdoc/site/0.4.29/Fog/Compute/RackspaceV2.html +0 -345
- data/rdoc/site/0.4.29/Fog/Compute.html +0 -340
- data/rdoc/site/0.4.29/Fog.html +0 -340
- data/rdoc/site/0.4.29/Hiera/Backend.html +0 -422
- data/rdoc/site/0.4.29/Hiera/Corl_logger.html +0 -449
- data/rdoc/site/0.4.29/Hiera.html +0 -346
- data/rdoc/site/0.4.29/Nucleon/Config.html +0 -357
- data/rdoc/site/0.4.29/Nucleon/Plugin/Base.html +0 -345
- data/rdoc/site/0.4.29/Nucleon/Plugin/Configuration.html +0 -1213
- data/rdoc/site/0.4.29/Nucleon/Plugin/Machine.html +0 -1279
- data/rdoc/site/0.4.29/Nucleon/Plugin/Network.html +0 -1425
- data/rdoc/site/0.4.29/Nucleon/Plugin/Node.html +0 -3715
- data/rdoc/site/0.4.29/Nucleon/Plugin/Provisioner.html +0 -1297
- data/rdoc/site/0.4.29/Nucleon/Plugin.html +0 -344
- data/rdoc/site/0.4.29/Nucleon.html +0 -344
- data/rdoc/site/0.4.29/Object.html +0 -358
- data/rdoc/site/0.4.29/Puppet/DataBinding/Corl.html +0 -345
- data/rdoc/site/0.4.29/Puppet/DataBinding.html +0 -338
- data/rdoc/site/0.4.29/Puppet/Indirector/Corl.html +0 -454
- data/rdoc/site/0.4.29/Puppet/Indirector.html +0 -338
- data/rdoc/site/0.4.29/Puppet/Parser/Functions.html +0 -480
- data/rdoc/site/0.4.29/Puppet/Parser.html +0 -338
- data/rdoc/site/0.4.29/Puppet.html +0 -338
- data/rdoc/site/0.4.29/README_rdoc.html +0 -340
- data/rdoc/site/0.4.29/Vagrant/Config/Loader.html +0 -399
- data/rdoc/site/0.4.29/Vagrant/Config.html +0 -339
- data/rdoc/site/0.4.29/Vagrant/Vagrantfile.html +0 -392
- data/rdoc/site/0.4.29/Vagrant.html +0 -346
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action/DeleteCache.html +0 -396
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action/InitKeys.html +0 -408
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action/LinkNetwork.html +0 -406
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action.html +0 -341
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/BaseAction.html +0 -491
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Command/Launcher.html +0 -533
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Command.html +0 -339
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Config/CORL.html +0 -732
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Config.html +0 -339
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Plugin.html +0 -345
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Provisioner/CORL.html +0 -536
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Provisioner.html +0 -339
- data/rdoc/site/0.4.29/VagrantPlugins/CORL.html +0 -346
- data/rdoc/site/0.4.29/VagrantPlugins.html +0 -346
- data/rdoc/site/0.4.29/created.rid +0 -96
- 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 +0 -339
- data/rdoc/site/0.4.29/js/darkfish.js +0 -155
- data/rdoc/site/0.4.29/js/jquery.js +0 -18
- data/rdoc/site/0.4.29/js/navigation.js +0 -142
- data/rdoc/site/0.4.29/js/search.js +0 -94
- data/rdoc/site/0.4.29/js/search_index.js +0 -1
- data/rdoc/site/0.4.29/js/searcher.js +0 -228
- data/rdoc/site/0.4.29/rdoc.css +0 -543
- data/rdoc/site/0.4.29/table_of_contents.html +0 -1561
- data/rdoc/site/0.5.0/CORL/Build.html +0 -757
- data/rdoc/site/0.5.0/CORL/Builder/Identity.html +0 -569
- data/rdoc/site/0.5.0/CORL/Builder/Package.html +0 -576
- data/rdoc/site/0.5.0/CORL/Builder.html +0 -360
- data/rdoc/site/0.5.0/CORL/Configuration/File.html +0 -1148
- data/rdoc/site/0.5.0/CORL/Configuration.html +0 -359
- data/rdoc/site/0.5.0/CORL/Errors.html +0 -359
- data/rdoc/site/0.5.0/CORL/Facade.html +0 -899
- data/rdoc/site/0.5.0/CORL/Machine/AWS.html +0 -753
- data/rdoc/site/0.5.0/CORL/Machine/Fog.html +0 -1289
- data/rdoc/site/0.5.0/CORL/Machine/Physical.html +0 -1059
- data/rdoc/site/0.5.0/CORL/Machine/Rackspace.html +0 -534
- data/rdoc/site/0.5.0/CORL/Machine/Vagrant.html +0 -1320
- data/rdoc/site/0.5.0/CORL/Machine.html +0 -363
- data/rdoc/site/0.5.0/CORL/Mixin/Action/Keypair.html +0 -592
- data/rdoc/site/0.5.0/CORL/Mixin/Action.html +0 -359
- data/rdoc/site/0.5.0/CORL/Mixin/Builder/Global.html +0 -604
- data/rdoc/site/0.5.0/CORL/Mixin/Builder/Instance.html +0 -696
- data/rdoc/site/0.5.0/CORL/Mixin/Builder.html +0 -359
- data/rdoc/site/0.5.0/CORL/Mixin/Lookup.html +0 -1139
- data/rdoc/site/0.5.0/CORL/Mixin/Machine/SSH.html +0 -675
- data/rdoc/site/0.5.0/CORL/Mixin/Machine.html +0 -359
- data/rdoc/site/0.5.0/CORL/Mixin/Macro/NetworkSettings.html +0 -484
- data/rdoc/site/0.5.0/CORL/Mixin/Macro.html +0 -359
- data/rdoc/site/0.5.0/CORL/Mixin.html +0 -363
- data/rdoc/site/0.5.0/CORL/Network/CORL.html +0 -411
- data/rdoc/site/0.5.0/CORL/Network.html +0 -359
- data/rdoc/site/0.5.0/CORL/Node/AWS.html +0 -736
- data/rdoc/site/0.5.0/CORL/Node/Fog.html +0 -1212
- data/rdoc/site/0.5.0/CORL/Node/Local.html +0 -444
- data/rdoc/site/0.5.0/CORL/Node/Rackspace.html +0 -729
- data/rdoc/site/0.5.0/CORL/Node/Vagrant.html +0 -1476
- data/rdoc/site/0.5.0/CORL/Node.html +0 -363
- data/rdoc/site/0.5.0/CORL/Plugin/Builder.html +0 -500
- data/rdoc/site/0.5.0/CORL/Plugin/Configuration.html +0 -1271
- data/rdoc/site/0.5.0/CORL/Plugin/Machine.html +0 -1299
- data/rdoc/site/0.5.0/CORL/Plugin/Network.html +0 -1580
- data/rdoc/site/0.5.0/CORL/Plugin/Node.html +0 -4041
- data/rdoc/site/0.5.0/CORL/Plugin/Provisioner.html +0 -1115
- data/rdoc/site/0.5.0/CORL/Plugin.html +0 -649
- data/rdoc/site/0.5.0/CORL/Provisioner/Puppetnode.html +0 -1177
- data/rdoc/site/0.5.0/CORL/Provisioner.html +0 -359
- data/rdoc/site/0.5.0/CORL/Util/Puppet/Resource.html +0 -1058
- data/rdoc/site/0.5.0/CORL/Util/Puppet/ResourceGroup.html +0 -940
- data/rdoc/site/0.5.0/CORL/Util/Puppet.html +0 -1107
- data/rdoc/site/0.5.0/CORL/Util.html +0 -361
- data/rdoc/site/0.5.0/CORL/Vagrant/Config.html +0 -943
- data/rdoc/site/0.5.0/CORL/Vagrant.html +0 -438
- data/rdoc/site/0.5.0/CORL.html +0 -471
- data/rdoc/site/0.5.0/Fog/Compute/AWS/Server.html +0 -443
- data/rdoc/site/0.5.0/Fog/Compute/AWS.html +0 -365
- data/rdoc/site/0.5.0/Fog/Compute/RackspaceV2/Server.html +0 -428
- data/rdoc/site/0.5.0/Fog/Compute/RackspaceV2.html +0 -365
- data/rdoc/site/0.5.0/Fog/Compute.html +0 -360
- data/rdoc/site/0.5.0/Fog.html +0 -360
- data/rdoc/site/0.5.0/Hiera/Backend.html +0 -442
- data/rdoc/site/0.5.0/Hiera/Corl_logger.html +0 -469
- data/rdoc/site/0.5.0/Hiera.html +0 -366
- data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Create.html +0 -538
- data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Hiera.html +0 -566
- data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Images.html +0 -572
- data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Inspect.html +0 -524
- data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Machines.html +0 -567
- data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Regions.html +0 -567
- data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Vagrantfile.html +0 -515
- data/rdoc/site/0.5.0/Nucleon/Action/Cloud.html +0 -365
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Authorize.html +0 -543
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Bootstrap.html +0 -604
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Build.html +0 -526
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Destroy.html +0 -573
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Exec.html +0 -530
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Facts.html +0 -456
- data/rdoc/site/0.5.0/Nucleon/Action/Node/IP.html +0 -453
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Image.html +0 -573
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Keypair.html +0 -572
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Lookup.html +0 -532
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Provision.html +0 -553
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Reboot.html +0 -573
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Revoke.html +0 -541
- data/rdoc/site/0.5.0/Nucleon/Action/Node/SSH.html +0 -583
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Seed.html +0 -602
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Spawn.html +0 -675
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Start.html +0 -573
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Stop.html +0 -573
- data/rdoc/site/0.5.0/Nucleon/Action/Node.html +0 -376
- data/rdoc/site/0.5.0/Nucleon/Action.html +0 -383
- data/rdoc/site/0.5.0/Nucleon/Config.html +0 -377
- data/rdoc/site/0.5.0/Nucleon/Event/Puppet.html +0 -693
- data/rdoc/site/0.5.0/Nucleon/Event.html +0 -359
- data/rdoc/site/0.5.0/Nucleon/Plugin/Base.html +0 -365
- data/rdoc/site/0.5.0/Nucleon/Plugin/CloudAction.html +0 -838
- data/rdoc/site/0.5.0/Nucleon/Plugin.html +0 -360
- data/rdoc/site/0.5.0/Nucleon/Template/Environment.html +0 -548
- data/rdoc/site/0.5.0/Nucleon/Template.html +0 -359
- data/rdoc/site/0.5.0/Nucleon.html +0 -387
- data/rdoc/site/0.5.0/Object.html +0 -378
- data/rdoc/site/0.5.0/Puppet/DataBinding/Corl.html +0 -365
- data/rdoc/site/0.5.0/Puppet/DataBinding.html +0 -358
- data/rdoc/site/0.5.0/Puppet/Indirector/Corl.html +0 -477
- data/rdoc/site/0.5.0/Puppet/Indirector.html +0 -358
- data/rdoc/site/0.5.0/Puppet/Parser/Functions.html +0 -500
- data/rdoc/site/0.5.0/Puppet/Parser.html +0 -358
- data/rdoc/site/0.5.0/Puppet.html +0 -358
- data/rdoc/site/0.5.0/README_rdoc.html +0 -360
- data/rdoc/site/0.5.0/Vagrant/Config/Loader.html +0 -419
- data/rdoc/site/0.5.0/Vagrant/Config.html +0 -359
- data/rdoc/site/0.5.0/Vagrant/Vagrantfile.html +0 -412
- data/rdoc/site/0.5.0/Vagrant.html +0 -366
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action/DeleteCache.html +0 -422
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action/InitKeys.html +0 -428
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action/LinkNetwork.html +0 -426
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action.html +0 -361
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/BaseAction.html +0 -511
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Command/Launcher.html +0 -553
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Command.html +0 -359
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Config/CORL.html +0 -752
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Config.html +0 -359
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Plugin.html +0 -365
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Provisioner/CORL.html +0 -556
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Provisioner.html +0 -359
- data/rdoc/site/0.5.0/VagrantPlugins/CORL.html +0 -366
- data/rdoc/site/0.5.0/VagrantPlugins.html +0 -366
- data/rdoc/site/0.5.0/created.rid +0 -103
- data/rdoc/site/0.5.0/images/add.png +0 -0
- data/rdoc/site/0.5.0/images/brick.png +0 -0
- data/rdoc/site/0.5.0/images/brick_link.png +0 -0
- data/rdoc/site/0.5.0/images/bug.png +0 -0
- data/rdoc/site/0.5.0/images/bullet_black.png +0 -0
- data/rdoc/site/0.5.0/images/bullet_toggle_minus.png +0 -0
- data/rdoc/site/0.5.0/images/bullet_toggle_plus.png +0 -0
- data/rdoc/site/0.5.0/images/date.png +0 -0
- data/rdoc/site/0.5.0/images/delete.png +0 -0
- data/rdoc/site/0.5.0/images/find.png +0 -0
- data/rdoc/site/0.5.0/images/loadingAnimation.gif +0 -0
- data/rdoc/site/0.5.0/images/macFFBgHack.png +0 -0
- data/rdoc/site/0.5.0/images/package.png +0 -0
- data/rdoc/site/0.5.0/images/page_green.png +0 -0
- data/rdoc/site/0.5.0/images/page_white_text.png +0 -0
- data/rdoc/site/0.5.0/images/page_white_width.png +0 -0
- data/rdoc/site/0.5.0/images/plugin.png +0 -0
- data/rdoc/site/0.5.0/images/ruby.png +0 -0
- data/rdoc/site/0.5.0/images/tag_blue.png +0 -0
- data/rdoc/site/0.5.0/images/tag_green.png +0 -0
- data/rdoc/site/0.5.0/images/transparent.png +0 -0
- data/rdoc/site/0.5.0/images/wrench.png +0 -0
- data/rdoc/site/0.5.0/images/wrench_orange.png +0 -0
- data/rdoc/site/0.5.0/images/zoom.png +0 -0
- data/rdoc/site/0.5.0/index.html +0 -359
- data/rdoc/site/0.5.0/js/darkfish.js +0 -155
- data/rdoc/site/0.5.0/js/jquery.js +0 -18
- data/rdoc/site/0.5.0/js/navigation.js +0 -142
- data/rdoc/site/0.5.0/js/search.js +0 -94
- data/rdoc/site/0.5.0/js/search_index.js +0 -1
- data/rdoc/site/0.5.0/js/searcher.js +0 -228
- data/rdoc/site/0.5.0/rdoc.css +0 -543
- data/rdoc/site/0.5.0/table_of_contents.html +0 -1797
- data/rdoc/site/0.5.1/CORL/Build.html +0 -781
- data/rdoc/site/0.5.1/CORL/Builder/Identity.html +0 -596
- data/rdoc/site/0.5.1/CORL/Builder/Package.html +0 -600
- data/rdoc/site/0.5.1/CORL/Builder.html +0 -384
- data/rdoc/site/0.5.1/CORL/Configuration/File.html +0 -1186
- data/rdoc/site/0.5.1/CORL/Configuration.html +0 -383
- data/rdoc/site/0.5.1/CORL/Errors.html +0 -383
- data/rdoc/site/0.5.1/CORL/Facade.html +0 -927
- data/rdoc/site/0.5.1/CORL/Machine/AWS.html +0 -777
- data/rdoc/site/0.5.1/CORL/Machine/Fog.html +0 -1313
- data/rdoc/site/0.5.1/CORL/Machine/Physical.html +0 -1083
- data/rdoc/site/0.5.1/CORL/Machine/Rackspace.html +0 -558
- data/rdoc/site/0.5.1/CORL/Machine/Vagrant.html +0 -1344
- data/rdoc/site/0.5.1/CORL/Machine.html +0 -387
- data/rdoc/site/0.5.1/CORL/Mixin/Action/Keypair.html +0 -616
- data/rdoc/site/0.5.1/CORL/Mixin/Action/Registration.html +0 -469
- data/rdoc/site/0.5.1/CORL/Mixin/Action.html +0 -384
- data/rdoc/site/0.5.1/CORL/Mixin/Builder/Global.html +0 -628
- data/rdoc/site/0.5.1/CORL/Mixin/Builder/Instance.html +0 -720
- data/rdoc/site/0.5.1/CORL/Mixin/Builder.html +0 -383
- data/rdoc/site/0.5.1/CORL/Mixin/Lookup.html +0 -1315
- data/rdoc/site/0.5.1/CORL/Mixin/Machine/SSH.html +0 -699
- data/rdoc/site/0.5.1/CORL/Mixin/Machine.html +0 -383
- data/rdoc/site/0.5.1/CORL/Mixin/Macro/NetworkSettings.html +0 -508
- data/rdoc/site/0.5.1/CORL/Mixin/Macro.html +0 -383
- data/rdoc/site/0.5.1/CORL/Mixin.html +0 -388
- data/rdoc/site/0.5.1/CORL/Network/CORL.html +0 -435
- data/rdoc/site/0.5.1/CORL/Network.html +0 -383
- data/rdoc/site/0.5.1/CORL/Node/AWS.html +0 -760
- data/rdoc/site/0.5.1/CORL/Node/Fog.html +0 -1268
- data/rdoc/site/0.5.1/CORL/Node/Local.html +0 -468
- data/rdoc/site/0.5.1/CORL/Node/Rackspace.html +0 -753
- data/rdoc/site/0.5.1/CORL/Node/Vagrant.html +0 -1497
- data/rdoc/site/0.5.1/CORL/Node.html +0 -387
- data/rdoc/site/0.5.1/CORL/Plugin/Builder.html +0 -524
- data/rdoc/site/0.5.1/CORL/Plugin/Configuration.html +0 -1294
- data/rdoc/site/0.5.1/CORL/Plugin/Machine.html +0 -1323
- data/rdoc/site/0.5.1/CORL/Plugin/Network.html +0 -1766
- data/rdoc/site/0.5.1/CORL/Plugin/Node.html +0 -4263
- data/rdoc/site/0.5.1/CORL/Plugin/Provisioner.html +0 -1139
- data/rdoc/site/0.5.1/CORL/Plugin.html +0 -673
- data/rdoc/site/0.5.1/CORL/Provisioner/Puppetnode.html +0 -1201
- data/rdoc/site/0.5.1/CORL/Provisioner.html +0 -383
- data/rdoc/site/0.5.1/CORL/Util/Puppet/Resource.html +0 -1082
- data/rdoc/site/0.5.1/CORL/Util/Puppet/ResourceGroup.html +0 -964
- data/rdoc/site/0.5.1/CORL/Util/Puppet.html +0 -1131
- data/rdoc/site/0.5.1/CORL/Util.html +0 -385
- data/rdoc/site/0.5.1/CORL/Vagrant/Config.html +0 -967
- data/rdoc/site/0.5.1/CORL/Vagrant.html +0 -462
- data/rdoc/site/0.5.1/CORL.html +0 -496
- data/rdoc/site/0.5.1/Fog/Compute/AWS/Server.html +0 -467
- data/rdoc/site/0.5.1/Fog/Compute/AWS.html +0 -389
- data/rdoc/site/0.5.1/Fog/Compute/RackspaceV2/Server.html +0 -452
- data/rdoc/site/0.5.1/Fog/Compute/RackspaceV2.html +0 -389
- data/rdoc/site/0.5.1/Fog/Compute.html +0 -384
- data/rdoc/site/0.5.1/Fog.html +0 -384
- data/rdoc/site/0.5.1/Hiera/Backend.html +0 -466
- data/rdoc/site/0.5.1/Hiera/Corl_logger.html +0 -493
- data/rdoc/site/0.5.1/Hiera.html +0 -390
- data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Config.html +0 -978
- data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Create.html +0 -562
- data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Images.html +0 -596
- data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Inspect.html +0 -567
- data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Machines.html +0 -591
- data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Regions.html +0 -591
- data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Settings.html +0 -878
- data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Vagrantfile.html +0 -539
- data/rdoc/site/0.5.1/Nucleon/Action/Cloud.html +0 -390
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Authorize.html +0 -567
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Bootstrap.html +0 -628
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Build.html +0 -550
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Cache.html +0 -773
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Destroy.html +0 -597
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Exec.html +0 -554
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Fact.html +0 -733
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Facts.html +0 -505
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Group.html +0 -729
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Groups.html +0 -505
- data/rdoc/site/0.5.1/Nucleon/Action/Node/IP.html +0 -477
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Identity.html +0 -614
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Image.html +0 -597
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Keypair.html +0 -596
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Lookup.html +0 -579
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Provision.html +0 -577
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Reboot.html +0 -597
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Revoke.html +0 -565
- data/rdoc/site/0.5.1/Nucleon/Action/Node/SSH.html +0 -607
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Seed.html +0 -626
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Spawn.html +0 -699
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Start.html +0 -597
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Status.html +0 -615
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Stop.html +0 -597
- data/rdoc/site/0.5.1/Nucleon/Action/Node.html +0 -406
- data/rdoc/site/0.5.1/Nucleon/Action/Plugin/Create.html +0 -736
- data/rdoc/site/0.5.1/Nucleon/Action/Plugin/List.html +0 -570
- data/rdoc/site/0.5.1/Nucleon/Action/Plugin.html +0 -384
- data/rdoc/site/0.5.1/Nucleon/Action/Plugins.html +0 -435
- data/rdoc/site/0.5.1/Nucleon/Action.html +0 -417
- data/rdoc/site/0.5.1/Nucleon/Config.html +0 -401
- data/rdoc/site/0.5.1/Nucleon/Event/Puppet.html +0 -717
- data/rdoc/site/0.5.1/Nucleon/Event.html +0 -383
- data/rdoc/site/0.5.1/Nucleon/Plugin/Base.html +0 -389
- data/rdoc/site/0.5.1/Nucleon/Plugin/CloudAction.html +0 -894
- data/rdoc/site/0.5.1/Nucleon/Plugin.html +0 -384
- data/rdoc/site/0.5.1/Nucleon/Template/Environment.html +0 -572
- data/rdoc/site/0.5.1/Nucleon/Template.html +0 -383
- data/rdoc/site/0.5.1/Nucleon.html +0 -421
- data/rdoc/site/0.5.1/Object.html +0 -402
- data/rdoc/site/0.5.1/Puppet/DataBinding/Corl.html +0 -389
- data/rdoc/site/0.5.1/Puppet/DataBinding.html +0 -382
- data/rdoc/site/0.5.1/Puppet/Indirector/Corl.html +0 -501
- data/rdoc/site/0.5.1/Puppet/Indirector.html +0 -382
- data/rdoc/site/0.5.1/Puppet/Parser/Functions.html +0 -524
- data/rdoc/site/0.5.1/Puppet/Parser.html +0 -382
- data/rdoc/site/0.5.1/Puppet.html +0 -382
- data/rdoc/site/0.5.1/README_rdoc.html +0 -384
- data/rdoc/site/0.5.1/Vagrant/Config/Loader.html +0 -443
- data/rdoc/site/0.5.1/Vagrant/Config.html +0 -383
- data/rdoc/site/0.5.1/Vagrant/Vagrantfile.html +0 -436
- data/rdoc/site/0.5.1/Vagrant.html +0 -390
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Action/DeleteCache.html +0 -446
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Action/InitKeys.html +0 -452
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Action/LinkNetwork.html +0 -450
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Action.html +0 -385
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/BaseAction.html +0 -535
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Command/Launcher.html +0 -577
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Command.html +0 -383
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Config/CORL.html +0 -776
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Config.html +0 -383
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Plugin.html +0 -389
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Provisioner/CORL.html +0 -580
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Provisioner.html +0 -383
- data/rdoc/site/0.5.1/VagrantPlugins/CORL.html +0 -390
- data/rdoc/site/0.5.1/VagrantPlugins.html +0 -390
- data/rdoc/site/0.5.1/created.rid +0 -114
- data/rdoc/site/0.5.1/images/add.png +0 -0
- data/rdoc/site/0.5.1/images/brick.png +0 -0
- data/rdoc/site/0.5.1/images/brick_link.png +0 -0
- data/rdoc/site/0.5.1/images/bug.png +0 -0
- data/rdoc/site/0.5.1/images/bullet_black.png +0 -0
- data/rdoc/site/0.5.1/images/bullet_toggle_minus.png +0 -0
- data/rdoc/site/0.5.1/images/bullet_toggle_plus.png +0 -0
- data/rdoc/site/0.5.1/images/date.png +0 -0
- data/rdoc/site/0.5.1/images/delete.png +0 -0
- data/rdoc/site/0.5.1/images/find.png +0 -0
- data/rdoc/site/0.5.1/images/loadingAnimation.gif +0 -0
- data/rdoc/site/0.5.1/images/macFFBgHack.png +0 -0
- data/rdoc/site/0.5.1/images/package.png +0 -0
- data/rdoc/site/0.5.1/images/page_green.png +0 -0
- data/rdoc/site/0.5.1/images/page_white_text.png +0 -0
- data/rdoc/site/0.5.1/images/page_white_width.png +0 -0
- data/rdoc/site/0.5.1/images/plugin.png +0 -0
- data/rdoc/site/0.5.1/images/ruby.png +0 -0
- data/rdoc/site/0.5.1/images/tag_blue.png +0 -0
- data/rdoc/site/0.5.1/images/tag_green.png +0 -0
- data/rdoc/site/0.5.1/images/transparent.png +0 -0
- data/rdoc/site/0.5.1/images/wrench.png +0 -0
- data/rdoc/site/0.5.1/images/wrench_orange.png +0 -0
- data/rdoc/site/0.5.1/images/zoom.png +0 -0
- data/rdoc/site/0.5.1/index.html +0 -383
- data/rdoc/site/0.5.1/js/darkfish.js +0 -155
- data/rdoc/site/0.5.1/js/jquery.js +0 -18
- data/rdoc/site/0.5.1/js/navigation.js +0 -142
- data/rdoc/site/0.5.1/js/search.js +0 -94
- data/rdoc/site/0.5.1/js/search_index.js +0 -1
- data/rdoc/site/0.5.1/js/searcher.js +0 -228
- data/rdoc/site/0.5.1/rdoc.css +0 -543
- data/rdoc/site/0.5.1/table_of_contents.html +0 -2005
- data/spec/corl_mock_input.rb +0 -29
- data/spec/corl_test_kernel.rb +0 -22
data/lib/core/plugin/network.rb
CHANGED
|
@@ -2,129 +2,129 @@
|
|
|
2
2
|
module CORL
|
|
3
3
|
module Plugin
|
|
4
4
|
class Network < Nucleon.plugin_class(:nucleon, :base)
|
|
5
|
-
|
|
6
|
-
init_plugin_collection(:add_node, :batch)
|
|
7
|
-
|
|
5
|
+
|
|
6
|
+
init_plugin_collection(:add_node, :batch)
|
|
7
|
+
|
|
8
8
|
#-----------------------------------------------------------------------------
|
|
9
9
|
# Cloud plugin interface
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
def normalize(reload)
|
|
12
12
|
super
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
logger.info("Initializing network: reloading? #{reload}")
|
|
15
|
-
myself.config = CORL.configuration(Config.new(myself._export).import({ :autosave => false, :create => false })) unless reload
|
|
16
|
-
|
|
15
|
+
myself.config = CORL.configuration(Config.new(myself._export).import({ :autosave => false, :create => false, :new => true })) unless reload
|
|
16
|
+
|
|
17
17
|
config.delete(:directory) # TODO: Figure out what to do with this??
|
|
18
|
-
|
|
18
|
+
|
|
19
19
|
unless reload
|
|
20
20
|
@build = Build.new
|
|
21
21
|
ignore([ 'build', File.join('config', 'identities') ])
|
|
22
22
|
end
|
|
23
23
|
end
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
#---
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
def remove_plugin
|
|
28
28
|
CORL.remove_plugin(config)
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
each_plugin do |type, provider, name, plugin|
|
|
31
|
-
CORL.remove_plugin(plugin)
|
|
31
|
+
CORL.remove_plugin(plugin)
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
#-----------------------------------------------------------------------------
|
|
36
36
|
# Checks
|
|
37
|
-
|
|
38
|
-
def has_nodes?(provider = nil)
|
|
37
|
+
|
|
38
|
+
def has_nodes?(provider = nil)
|
|
39
39
|
node_config(provider).export.empty? ? false : true
|
|
40
40
|
end
|
|
41
|
-
|
|
41
|
+
|
|
42
42
|
#-----------------------------------------------------------------------------
|
|
43
43
|
# Property accessors / modifiers
|
|
44
|
-
|
|
44
|
+
|
|
45
45
|
plugin_collection :CORL, :node
|
|
46
46
|
plugin_collection :CORL, :builder, :single_instance => true
|
|
47
47
|
plugin_collection :CORL, :provisioner
|
|
48
|
-
|
|
48
|
+
|
|
49
49
|
#---
|
|
50
|
-
|
|
50
|
+
|
|
51
51
|
def hiera_var
|
|
52
52
|
@hiera
|
|
53
53
|
end
|
|
54
|
-
|
|
54
|
+
|
|
55
55
|
def hiera_var=hiera
|
|
56
56
|
@hiera = hiera
|
|
57
57
|
end
|
|
58
|
-
|
|
58
|
+
|
|
59
59
|
#---
|
|
60
|
-
|
|
60
|
+
|
|
61
61
|
def hiera_override_dir
|
|
62
62
|
File.join(directory, 'config')
|
|
63
63
|
end
|
|
64
|
-
|
|
64
|
+
|
|
65
65
|
#---
|
|
66
|
-
|
|
66
|
+
|
|
67
67
|
def home
|
|
68
|
-
extension_set(:home, ( ENV['USER'] == 'root' ? '/root' : ENV['HOME'] ))
|
|
68
|
+
extension_set(:home, ( ENV['USER'] == 'root' ? '/root' : ENV['HOME'] ))
|
|
69
69
|
end
|
|
70
|
-
|
|
70
|
+
|
|
71
71
|
#---
|
|
72
|
-
|
|
72
|
+
|
|
73
73
|
def directory
|
|
74
74
|
config.directory
|
|
75
75
|
end
|
|
76
|
-
|
|
76
|
+
|
|
77
77
|
#---
|
|
78
|
-
|
|
78
|
+
|
|
79
79
|
def key_directory
|
|
80
80
|
File.join(directory, 'keys')
|
|
81
81
|
end
|
|
82
|
-
|
|
82
|
+
|
|
83
83
|
#---
|
|
84
|
-
|
|
84
|
+
|
|
85
85
|
def build_directory
|
|
86
86
|
File.join(directory, 'build')
|
|
87
87
|
end
|
|
88
|
-
|
|
88
|
+
|
|
89
89
|
#---
|
|
90
|
-
|
|
90
|
+
|
|
91
91
|
def key_cache_directory
|
|
92
92
|
File.join(build_directory, 'keys')
|
|
93
93
|
end
|
|
94
|
-
|
|
94
|
+
|
|
95
95
|
#---
|
|
96
|
-
|
|
96
|
+
|
|
97
97
|
def config_directory
|
|
98
98
|
File.join(directory, 'config')
|
|
99
99
|
end
|
|
100
|
-
|
|
100
|
+
|
|
101
101
|
#---
|
|
102
|
-
|
|
102
|
+
|
|
103
103
|
def cache
|
|
104
104
|
config.cache
|
|
105
105
|
end
|
|
106
|
-
|
|
106
|
+
|
|
107
107
|
#---
|
|
108
|
-
|
|
108
|
+
|
|
109
109
|
def ignore(files)
|
|
110
110
|
config.ignore(files)
|
|
111
111
|
end
|
|
112
|
-
|
|
112
|
+
|
|
113
113
|
#---
|
|
114
|
-
|
|
114
|
+
|
|
115
115
|
def remote(name)
|
|
116
116
|
config.remote(name)
|
|
117
117
|
end
|
|
118
|
-
|
|
118
|
+
|
|
119
119
|
def set_remote(name, location)
|
|
120
120
|
config.set_remote(name, location)
|
|
121
121
|
end
|
|
122
|
-
|
|
122
|
+
|
|
123
123
|
#---
|
|
124
|
-
|
|
124
|
+
|
|
125
125
|
def node_groups
|
|
126
126
|
groups = {}
|
|
127
|
-
|
|
127
|
+
|
|
128
128
|
each_node_config do |provider, name, info|
|
|
129
129
|
search_node(provider, name, :settings, [], :array).each do |group|
|
|
130
130
|
group = group.to_sym
|
|
@@ -134,180 +134,190 @@ class Network < Nucleon.plugin_class(:nucleon, :base)
|
|
|
134
134
|
end
|
|
135
135
|
groups
|
|
136
136
|
end
|
|
137
|
-
|
|
137
|
+
|
|
138
138
|
#---
|
|
139
|
-
|
|
139
|
+
|
|
140
140
|
def node_info(references, default_provider = nil)
|
|
141
141
|
groups = node_groups
|
|
142
142
|
node_info = {}
|
|
143
|
-
|
|
143
|
+
|
|
144
144
|
default_provider = Manager.connection.type_default(:node) if default_provider.nil?
|
|
145
|
-
|
|
145
|
+
|
|
146
146
|
references.each do |reference|
|
|
147
147
|
info = Plugin::Node.translate_reference(reference)
|
|
148
148
|
info = { :provider => default_provider, :name => reference } unless info
|
|
149
|
-
name = info[:name].to_sym
|
|
150
|
-
|
|
149
|
+
name = info[:name].to_sym
|
|
150
|
+
|
|
151
151
|
# Check for group membership
|
|
152
152
|
if groups.has_key?(name)
|
|
153
153
|
groups[name].each do |member_info|
|
|
154
154
|
provider = member_info[:provider].to_sym
|
|
155
|
-
|
|
156
|
-
node_info[provider] = [] unless node_info.has_key?(provider)
|
|
155
|
+
|
|
156
|
+
node_info[provider] = [] unless node_info.has_key?(provider)
|
|
157
157
|
node_info[provider] << member_info[:name]
|
|
158
158
|
end
|
|
159
159
|
else
|
|
160
160
|
# Not a group
|
|
161
161
|
provider = info[:provider].to_sym
|
|
162
|
-
|
|
162
|
+
|
|
163
163
|
if node_config.export.has_key?(provider)
|
|
164
164
|
node_found = false
|
|
165
|
-
|
|
165
|
+
|
|
166
166
|
each_node_config(provider) do |node_provider, node_name, node|
|
|
167
167
|
if node_name == name
|
|
168
|
-
node_info[node_provider] = [] unless node_info.has_key?(node_provider)
|
|
168
|
+
node_info[node_provider] = [] unless node_info.has_key?(node_provider)
|
|
169
169
|
node_info[node_provider] << node_name
|
|
170
170
|
node_found = true
|
|
171
171
|
break
|
|
172
172
|
end
|
|
173
173
|
end
|
|
174
|
-
|
|
174
|
+
|
|
175
175
|
unless node_found
|
|
176
176
|
# TODO: Error or something?
|
|
177
177
|
end
|
|
178
|
-
end
|
|
179
|
-
end
|
|
180
|
-
end
|
|
181
|
-
node_info
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
node_info
|
|
182
182
|
end
|
|
183
|
-
|
|
183
|
+
|
|
184
184
|
#---
|
|
185
|
-
|
|
185
|
+
|
|
186
186
|
def node_by_ip(public_ip, require_new = false)
|
|
187
|
+
matches = {}
|
|
188
|
+
|
|
187
189
|
each_node_config do |provider, name, info|
|
|
188
|
-
|
|
190
|
+
matches[provider] = name if info[:public_ip] == public_ip
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
unless matches.empty?
|
|
194
|
+
if matches.has_key?(:local) && matches.keys.length > 1
|
|
195
|
+
matches.delete(:local) # No need for local if there is an actual provider
|
|
196
|
+
end
|
|
197
|
+
provider = matches.keys[0]
|
|
198
|
+
return node(provider, matches[provider], require_new)
|
|
189
199
|
end
|
|
190
200
|
nil
|
|
191
201
|
end
|
|
192
|
-
|
|
202
|
+
|
|
193
203
|
#---
|
|
194
|
-
|
|
204
|
+
|
|
195
205
|
def local_node(require_new = false)
|
|
196
|
-
ip_address = CORL.public_ip
|
|
206
|
+
ip_address = CORL.public_ip
|
|
197
207
|
local_node = node_by_ip(ip_address, require_new)
|
|
198
|
-
|
|
208
|
+
|
|
199
209
|
if local_node.nil?
|
|
200
210
|
name = Util::Data.ensure_value(lookup(:fqdn), ip_address)
|
|
201
|
-
local_node = CORL.node(name, extended_config(:local_node).import({ :meta => { :parent => myself }}), :local)
|
|
211
|
+
local_node = CORL.node(name, extended_config(:local_node).import({ :meta => { :parent => myself }}), :local)
|
|
202
212
|
else
|
|
203
213
|
local_node.network = myself
|
|
204
214
|
local_node.normalize(true)
|
|
205
|
-
local_node.localize
|
|
215
|
+
local_node.localize
|
|
206
216
|
end
|
|
207
217
|
local_node
|
|
208
218
|
end
|
|
209
|
-
|
|
219
|
+
|
|
210
220
|
#---
|
|
211
|
-
|
|
221
|
+
|
|
212
222
|
def nodes_by_reference(references, default_provider = nil, require_new = false)
|
|
213
223
|
nodes = []
|
|
214
|
-
|
|
224
|
+
|
|
215
225
|
node_info(references, default_provider).each do |provider, names|
|
|
216
226
|
names.each do |name|
|
|
217
227
|
nodes << node(provider, name, require_new)
|
|
218
228
|
end
|
|
219
229
|
end
|
|
220
|
-
nodes
|
|
230
|
+
nodes
|
|
221
231
|
end
|
|
222
|
-
|
|
232
|
+
|
|
223
233
|
#---
|
|
224
|
-
|
|
234
|
+
|
|
225
235
|
def test_node(provider, options = {})
|
|
226
236
|
config = Config.ensure(options).import({ :meta => { :parent => myself } })
|
|
227
237
|
CORL.node(:test, config.export, provider)
|
|
228
238
|
end
|
|
229
|
-
|
|
239
|
+
|
|
230
240
|
#---
|
|
231
|
-
|
|
241
|
+
|
|
232
242
|
def build
|
|
233
243
|
@build
|
|
234
244
|
end
|
|
235
|
-
|
|
245
|
+
|
|
236
246
|
#---
|
|
237
|
-
|
|
247
|
+
|
|
238
248
|
def create_builder(name, provider, options = {})
|
|
239
249
|
CORL.create_plugin(:CORL, :builder, provider, extended_config(name, options).import({ :meta => { :parent => myself }}))
|
|
240
250
|
end
|
|
241
|
-
|
|
251
|
+
|
|
242
252
|
#---
|
|
243
|
-
|
|
253
|
+
|
|
244
254
|
def identity_builder(options = {})
|
|
245
255
|
create_builder(:network_identity_builder, :identity, options)
|
|
246
256
|
end
|
|
247
|
-
|
|
257
|
+
|
|
248
258
|
def package_builder(name, options = {})
|
|
249
259
|
create_builder(:network_package_builder, :package, options)
|
|
250
260
|
end
|
|
251
|
-
|
|
261
|
+
|
|
252
262
|
#-----------------------------------------------------------------------------
|
|
253
263
|
# Operations
|
|
254
|
-
|
|
264
|
+
|
|
255
265
|
def load(options = {})
|
|
256
266
|
config.load(options)
|
|
257
267
|
end
|
|
258
|
-
|
|
268
|
+
|
|
259
269
|
#---
|
|
260
|
-
|
|
270
|
+
|
|
261
271
|
def save(options = {})
|
|
262
272
|
config.save(options)
|
|
263
273
|
end
|
|
264
|
-
|
|
274
|
+
|
|
265
275
|
#---
|
|
266
|
-
|
|
276
|
+
|
|
267
277
|
def attach_files(type, name, files, options = {})
|
|
268
278
|
attach_config = Config.ensure(options).import({ :type => :file })
|
|
269
|
-
included_files = []
|
|
279
|
+
included_files = []
|
|
270
280
|
files = [ files ] unless files.is_a?(Array)
|
|
271
|
-
|
|
281
|
+
|
|
272
282
|
files.each do |file|
|
|
273
283
|
if file
|
|
274
284
|
attached_file = config.attach(type, name, file, attach_config)
|
|
275
285
|
included_files << attached_file unless attached_file.nil?
|
|
276
|
-
end
|
|
277
|
-
end
|
|
286
|
+
end
|
|
287
|
+
end
|
|
278
288
|
included_files
|
|
279
289
|
end
|
|
280
|
-
|
|
290
|
+
|
|
281
291
|
#---
|
|
282
|
-
|
|
292
|
+
|
|
283
293
|
def attach_data(type, name, data, options = {})
|
|
284
294
|
attach_config = Config.ensure(options).import({ :type => :source })
|
|
285
|
-
attached_data = nil
|
|
286
|
-
|
|
295
|
+
attached_data = nil
|
|
296
|
+
|
|
287
297
|
if data.is_a?(String)
|
|
288
298
|
attached_data = config.attach(type, name, data, attach_config)
|
|
289
|
-
end
|
|
299
|
+
end
|
|
290
300
|
attached_data
|
|
291
301
|
end
|
|
292
|
-
|
|
302
|
+
|
|
293
303
|
#---
|
|
294
|
-
|
|
304
|
+
|
|
295
305
|
def delete_attachments(ids, options = {})
|
|
296
|
-
config.delete_attachments(ids, options)
|
|
306
|
+
config.delete_attachments(ids, options)
|
|
297
307
|
end
|
|
298
|
-
|
|
308
|
+
|
|
299
309
|
#---
|
|
300
|
-
|
|
310
|
+
|
|
301
311
|
def add_node(provider, name, options = {})
|
|
302
312
|
config = Config.ensure(options)
|
|
303
|
-
|
|
313
|
+
|
|
304
314
|
keypair = config.get(:keypair, nil)
|
|
305
315
|
return false unless keypair && keypair.is_a?(Util::SSH::Keypair)
|
|
306
|
-
|
|
316
|
+
|
|
307
317
|
remote_name = config.delete(:remote, :edit)
|
|
308
|
-
|
|
309
|
-
node_options = Util::Data.clean({
|
|
310
|
-
:settings => array(config.delete(:groups, [])) | [ "server" ],
|
|
318
|
+
|
|
319
|
+
node_options = Util::Data.clean({
|
|
320
|
+
:settings => array(config.delete(:groups, [])) | [ "server" ],
|
|
311
321
|
:region => config.delete(:region, nil),
|
|
312
322
|
:machine_type => config.delete(:machine_type, nil),
|
|
313
323
|
:public_ip => config.delete(:public_ip, nil),
|
|
@@ -315,88 +325,88 @@ class Network < Nucleon.plugin_class(:nucleon, :base)
|
|
|
315
325
|
:user => config.delete(:user, :root),
|
|
316
326
|
:hostname => name
|
|
317
327
|
})
|
|
318
|
-
|
|
328
|
+
|
|
319
329
|
# Set node data
|
|
320
330
|
node = set_node(provider, name, node_options)
|
|
321
331
|
hook_config = { :node => node, :remote => remote_name, :config => config }
|
|
322
332
|
success = true
|
|
323
|
-
|
|
333
|
+
|
|
324
334
|
yield(:preprocess, hook_config) if block_given?
|
|
325
|
-
|
|
335
|
+
|
|
326
336
|
if ! node.local? && node.attach_keys(keypair) && extension_check(:add_node, hook_config)
|
|
327
337
|
node.keypair = keypair
|
|
328
|
-
|
|
338
|
+
|
|
329
339
|
# Create new node / machine
|
|
330
340
|
success = node.create do |op, data|
|
|
331
341
|
block_given? ? yield("create_#{op}".to_sym, data) : data
|
|
332
342
|
end
|
|
333
|
-
|
|
343
|
+
|
|
334
344
|
remote_name = nil if remote_name && ! remote(remote_name)
|
|
335
|
-
|
|
345
|
+
|
|
336
346
|
if success && node.save({ :remote => remote_name, :message => "Created machine #{name} on #{provider}" })
|
|
337
347
|
success = init_node(node, config.defaults({ :bootstrap => true, :seed => true })) do |op, data|
|
|
338
|
-
block_given? ? yield(op, data) : data
|
|
348
|
+
block_given? ? yield(op, data) : data
|
|
339
349
|
end
|
|
340
350
|
end
|
|
341
|
-
end
|
|
342
|
-
success
|
|
351
|
+
end
|
|
352
|
+
success
|
|
343
353
|
end
|
|
344
|
-
|
|
354
|
+
|
|
345
355
|
#---
|
|
346
|
-
|
|
356
|
+
|
|
347
357
|
def init_node(node, options = {})
|
|
348
358
|
config = Config.ensure(options)
|
|
349
359
|
success = true
|
|
350
|
-
|
|
360
|
+
|
|
351
361
|
bootstrap_requested = config.has_key?(:bootstrap)
|
|
352
362
|
bootstrap = config.delete(:bootstrap, false)
|
|
353
|
-
|
|
363
|
+
|
|
354
364
|
seed_requested = config.has_key?(:seed)
|
|
355
365
|
seed = config.delete(:seed, false)
|
|
356
366
|
seed_project = config.get(:project_reference, nil)
|
|
357
|
-
|
|
367
|
+
|
|
358
368
|
if seed_project.nil?
|
|
359
369
|
project_provider = myself.config.project.plugin_provider
|
|
360
|
-
project_remote = myself.config.remote(:edit)
|
|
370
|
+
project_remote = myself.config.remote(:edit)
|
|
361
371
|
seed_project = "#{project_provider}:::#{project_remote}"
|
|
362
372
|
end
|
|
363
|
-
|
|
373
|
+
|
|
364
374
|
unless node.cache_setting(:initialized)
|
|
365
375
|
bootstrap = true unless bootstrap_requested
|
|
366
376
|
seed = true unless seed_requested
|
|
367
377
|
end
|
|
368
|
-
|
|
378
|
+
|
|
369
379
|
provision = config.delete(:provision, true)
|
|
370
|
-
|
|
380
|
+
|
|
371
381
|
if bootstrap
|
|
372
382
|
# Bootstrap machine
|
|
373
383
|
success = node.bootstrap(home, extended_config(:bootstrap, config)) do |op, data|
|
|
374
384
|
block_given? ? yield("bootstrap_#{op}".to_sym, data) : data
|
|
375
385
|
end
|
|
376
386
|
end
|
|
377
|
-
|
|
387
|
+
|
|
378
388
|
if success
|
|
379
389
|
if seed
|
|
380
390
|
save_config = { :commit => true, :remote => remote_name, :push => true }
|
|
381
|
-
|
|
391
|
+
|
|
382
392
|
if seed_project && remote_name
|
|
383
393
|
# Reset project remote
|
|
384
394
|
seed_info = Plugin::Project.translate_reference(seed_project)
|
|
385
|
-
|
|
395
|
+
|
|
386
396
|
if seed_info
|
|
387
397
|
seed_url = seed_info[:url]
|
|
388
398
|
seed_branch = seed_info[:revision] if seed_info[:revision]
|
|
389
399
|
else
|
|
390
|
-
seed_url = seed_project
|
|
400
|
+
seed_url = seed_project
|
|
391
401
|
end
|
|
392
402
|
set_remote(:origin, seed_url) if remote_name.to_sym == :edit
|
|
393
403
|
set_remote(remote_name, seed_url)
|
|
394
404
|
save_config[:pull] = false
|
|
395
405
|
end
|
|
396
|
-
|
|
406
|
+
|
|
397
407
|
# Save network changes (preliminary)
|
|
398
408
|
success = node.save(extended_config(:node_save, save_config))
|
|
399
|
-
|
|
409
|
+
|
|
400
410
|
if success && seed_project
|
|
401
411
|
# Seed machine with remote project reference
|
|
402
412
|
result = node.node_seed({
|
|
@@ -408,23 +418,23 @@ class Network < Nucleon.plugin_class(:nucleon, :base)
|
|
|
408
418
|
success = result.status == code.success
|
|
409
419
|
end
|
|
410
420
|
end
|
|
411
|
-
|
|
421
|
+
|
|
412
422
|
node.set_cache_setting(:initialized, true) if success
|
|
413
|
-
|
|
423
|
+
|
|
414
424
|
if success && provision
|
|
415
425
|
# Run configured provisioners on machine
|
|
416
426
|
result = node.node_provision(config) do |op, data|
|
|
417
|
-
yield("provision_#{op}".to_sym, data)
|
|
427
|
+
yield("provision_#{op}".to_sym, data)
|
|
418
428
|
end
|
|
419
429
|
success = result.status == code.success
|
|
420
430
|
end
|
|
421
|
-
|
|
431
|
+
|
|
422
432
|
# Update local network project
|
|
423
433
|
success = load({ :remote => remote_name, :pull => true }) if success
|
|
424
434
|
end
|
|
425
435
|
success
|
|
426
436
|
end
|
|
427
|
-
|
|
437
|
+
|
|
428
438
|
#-----------------------------------------------------------------------------
|
|
429
439
|
# Utilities
|
|
430
440
|
|
|
@@ -437,33 +447,35 @@ class Network < Nucleon.plugin_class(:nucleon, :base)
|
|
|
437
447
|
end
|
|
438
448
|
end
|
|
439
449
|
end
|
|
440
|
-
|
|
450
|
+
|
|
441
451
|
#---
|
|
442
|
-
|
|
443
|
-
def batch(node_references, default_provider = nil, parallel = true, &code)
|
|
444
|
-
success = true
|
|
445
|
-
|
|
452
|
+
|
|
453
|
+
def batch(node_references, default_provider = nil, parallel = true, running = true, &code)
|
|
446
454
|
node_references = array(node_references.clone)
|
|
447
|
-
|
|
455
|
+
success = true
|
|
456
|
+
|
|
448
457
|
if has_nodes? && ! node_references.empty?
|
|
449
|
-
# Execute action on selected nodes
|
|
458
|
+
# Execute action on selected nodes
|
|
450
459
|
nodes = nodes_by_reference(node_references, default_provider)
|
|
451
|
-
|
|
460
|
+
|
|
452
461
|
if CORL.parallel? && parallel
|
|
453
462
|
values = []
|
|
454
463
|
nodes.each do |node|
|
|
455
|
-
|
|
464
|
+
if ! running || node.running?
|
|
465
|
+
values << Celluloid::Future.new(node, &code)
|
|
466
|
+
end
|
|
456
467
|
end
|
|
457
468
|
values = values.map { |future| future.value }
|
|
458
469
|
success = false if values.include?(false)
|
|
459
470
|
else
|
|
460
471
|
nodes.each do |node|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
472
|
+
if ! running || node.running?
|
|
473
|
+
proc_success = code.call(node)
|
|
474
|
+
if proc_success == false
|
|
475
|
+
success = false
|
|
476
|
+
end
|
|
465
477
|
end
|
|
466
|
-
end
|
|
478
|
+
end
|
|
467
479
|
end
|
|
468
480
|
end
|
|
469
481
|
success
|