corl 0.5.4 → 0.5.5
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/README.rdoc +3 -21
- data/VERSION +1 -1
- data/bootstrap/os/ubuntu/05_ruby.sh +24 -18
- data/bootstrap/os/ubuntu/06_puppet.sh +58 -0
- data/bootstrap/os/ubuntu/10_corl.sh +1 -25
- data/corl.gemspec +5 -3
- data/lib/CORL/builder/identity.rb +14 -14
- data/lib/CORL/builder/package.rb +18 -18
- data/lib/CORL/builder/project.rb +37 -0
- data/lib/CORL/node/vagrant.rb +76 -76
- data/lib/CORL/provisioner/puppetnode.rb +98 -92
- data/lib/core/build.rb +34 -36
- data/lib/core/plugin/network.rb +2 -2
- data/lib/core/plugin/node.rb +38 -16
- data/lib/core/plugin/provisioner.rb +91 -91
- data/lib/core/util/puppet.rb +107 -107
- data/lib/core/vagrant/provisioner/config.rb +32 -19
- data/lib/core/vagrant/provisioner/provisioner.rb +17 -11
- data/lib/nucleon/action/node/bootstrap.rb +2 -0
- data/lib/nucleon/action/node/build.rb +13 -12
- data/lib/nucleon/action/node/exec.rb +21 -19
- data/lib/nucleon/action/node/provision.rb +27 -23
- data/lib/nucleon/action/node/seed.rb +2 -0
- data/locales/en.yml +27 -1
- metadata +4 -2
@@ -3,48 +3,50 @@ module Nucleon
|
|
3
3
|
module Action
|
4
4
|
module Node
|
5
5
|
class Exec < Nucleon.plugin_class(:nucleon, :cloud_action)
|
6
|
-
|
6
|
+
|
7
7
|
#-----------------------------------------------------------------------------
|
8
8
|
# Info
|
9
|
-
|
9
|
+
|
10
10
|
def self.describe
|
11
11
|
super(:node, :exec, 605)
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
#----------------------------------------------------------------------------
|
15
15
|
# Settings
|
16
|
-
|
16
|
+
|
17
17
|
def configure
|
18
18
|
super do
|
19
19
|
register :command, :array, nil
|
20
20
|
end
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
#---
|
24
|
-
|
24
|
+
|
25
25
|
def arguments
|
26
26
|
[ :command ]
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
#-----------------------------------------------------------------------------
|
30
30
|
# Operations
|
31
|
-
|
31
|
+
|
32
32
|
def execute
|
33
33
|
super do |node|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
value = "\"#{value}\""
|
39
|
-
end
|
40
|
-
value
|
34
|
+
if settings[:command].length > 1
|
35
|
+
settings[:command].collect! do |value|
|
36
|
+
if value.strip.match(/\s+/)
|
37
|
+
value = "\"#{value}\""
|
41
38
|
end
|
39
|
+
value
|
42
40
|
end
|
43
|
-
|
44
|
-
command_str = settings[:command].join(' ')
|
45
|
-
result = node.exec({ :commands => [ command_str ] }).first
|
46
|
-
myself.status = result.status
|
47
41
|
end
|
42
|
+
command_str = settings[:command].join(' ')
|
43
|
+
|
44
|
+
if node
|
45
|
+
result = node.exec({ :commands => [ command_str ] }).first
|
46
|
+
else
|
47
|
+
result = CORL.cli_run(command_str)
|
48
|
+
end
|
49
|
+
myself.status = result.status
|
48
50
|
end
|
49
51
|
end
|
50
52
|
end
|
@@ -3,60 +3,64 @@ module Nucleon
|
|
3
3
|
module Action
|
4
4
|
module Node
|
5
5
|
class Provision < Nucleon.plugin_class(:nucleon, :cloud_action)
|
6
|
-
|
6
|
+
|
7
7
|
#-----------------------------------------------------------------------------
|
8
8
|
# Info
|
9
|
-
|
9
|
+
|
10
10
|
def self.describe
|
11
11
|
super(:node, :provision, 615)
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
#-----------------------------------------------------------------------------
|
15
15
|
# Settings
|
16
|
-
|
16
|
+
|
17
17
|
def configure
|
18
18
|
super do
|
19
19
|
codes :provision_failure
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
|
21
|
+
register_bool :build, false
|
22
|
+
register_bool :dry_run, false
|
23
|
+
register_str :environment
|
23
24
|
end
|
24
25
|
end
|
25
|
-
|
26
|
+
|
26
27
|
#---
|
27
|
-
|
28
|
+
|
28
29
|
def arguments
|
29
30
|
[ :environment ]
|
30
31
|
end
|
31
32
|
|
32
33
|
#-----------------------------------------------------------------------------
|
33
34
|
# Operations
|
34
|
-
|
35
|
+
|
35
36
|
def execute
|
36
37
|
super do |node|
|
37
|
-
info('
|
38
|
-
|
39
|
-
ensure_node(node) do
|
38
|
+
info('start')
|
39
|
+
|
40
|
+
ensure_node(node) do
|
40
41
|
success = true
|
41
|
-
|
42
|
+
|
42
43
|
settings.delete(:environment) if settings[:environment] == ''
|
43
|
-
|
44
|
+
|
44
45
|
if settings.has_key?(:environment)
|
45
|
-
|
46
|
-
end
|
47
|
-
|
46
|
+
CORL.create_fact(:corl_environment, settings[:environment])
|
47
|
+
end
|
48
|
+
|
48
49
|
if CORL.admin?
|
49
|
-
|
50
|
+
if settings[:build] ||
|
51
|
+
! settings.has_key?(:environment) ||
|
52
|
+
! ( node.build_time && File.directory?(network.build_directory) )
|
53
|
+
|
50
54
|
success = node.build(settings)
|
51
55
|
end
|
52
|
-
|
56
|
+
|
53
57
|
if success
|
54
|
-
provisioner_info = node.provisioner_info
|
55
|
-
|
58
|
+
provisioner_info = node.provisioner_info
|
59
|
+
|
56
60
|
node.provisioners.each do |provider, collection|
|
57
61
|
provider_info = provisioner_info[provider]
|
58
62
|
profiles = provider_info[:profiles]
|
59
|
-
|
63
|
+
|
60
64
|
collection.each do |name, provisioner|
|
61
65
|
if supported_profiles = provisioner.supported_profiles(node, profiles)
|
62
66
|
profile_success = provisioner.provision(node, supported_profiles, settings)
|
data/locales/en.yml
CHANGED
@@ -494,6 +494,8 @@ en:
|
|
494
494
|
Specified home directory on remote server (default %{default_value})
|
495
495
|
bootstrap_nodes: |-
|
496
496
|
Node references to bootstrap
|
497
|
+
ruby_version: |-
|
498
|
+
RVM Ruby version to bootstrap onto node (default %{default_value})
|
497
499
|
warn:
|
498
500
|
bootstrap_nodes_empty: |-
|
499
501
|
Nodes must be specified in order to run the bootstrap action
|
@@ -537,7 +539,31 @@ en:
|
|
537
539
|
Updating node network configurations
|
538
540
|
build:
|
539
541
|
description: |-
|
540
|
-
Build
|
542
|
+
Build projects into the network project or global filesystem
|
543
|
+
help: |-
|
544
|
+
Build various kinds of projects into the network project or across the filesystem.
|
545
|
+
You can think of the build process as an easy way to bundle sub projects that are only
|
546
|
+
relevant on some environments.
|
547
|
+
|
548
|
+
Two plugin types currently implement the builder API
|
549
|
+
|
550
|
+
1. Builders
|
551
|
+
- General projects or specialized projects like packages and identities with specific
|
552
|
+
internally defined function. The project builder provider is a great way to bundle
|
553
|
+
development dependencies into the project.
|
554
|
+
|
555
|
+
2. Provisioners
|
556
|
+
- Provisioners have their own projects (Puppet modules) that need to be built on the
|
557
|
+
machine in order for the provisioning process to take place. This is a subsystem
|
558
|
+
of the package management system.
|
559
|
+
options:
|
560
|
+
environment: |-
|
561
|
+
Environment to build (default %{default_value})
|
562
|
+
providers: |-
|
563
|
+
List of builder plugin providers to run build process for (default %{default_value})
|
564
|
+
info:
|
565
|
+
start: |-
|
566
|
+
Building network dependencies
|
541
567
|
provision:
|
542
568
|
description: |-
|
543
569
|
Provision nodes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: corl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrian Webb
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2014-12-
|
12
|
+
date: 2014-12-27 00:00:00 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nucleon
|
@@ -147,11 +147,13 @@ files:
|
|
147
147
|
- bootstrap/os/ubuntu/01_git.sh
|
148
148
|
- bootstrap/os/ubuntu/02_editor.sh
|
149
149
|
- bootstrap/os/ubuntu/05_ruby.sh
|
150
|
+
- bootstrap/os/ubuntu/06_puppet.sh
|
150
151
|
- bootstrap/os/ubuntu/09_nucleon.sh
|
151
152
|
- bootstrap/os/ubuntu/10_corl.sh
|
152
153
|
- corl.gemspec
|
153
154
|
- lib/CORL/builder/identity.rb
|
154
155
|
- lib/CORL/builder/package.rb
|
156
|
+
- lib/CORL/builder/project.rb
|
155
157
|
- lib/CORL/configuration/file.rb
|
156
158
|
- lib/CORL/machine/AWS.rb
|
157
159
|
- lib/CORL/machine/physical.rb
|