corl 0.4.18 → 0.4.19

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2998050a434194e1bcaf8faad1bb77b6efb0f548
4
- data.tar.gz: 07b3e8d66462f5aa0addb0a817e5dd3d2ba78da4
3
+ metadata.gz: d23402e2a5b767aa38faccd1e9a9e94669c58985
4
+ data.tar.gz: 0154ea26bcc292aaadba6366a73e6dce47ba1cb6
5
5
  SHA512:
6
- metadata.gz: b190cb7d2bc0263fccb454f14edcc2fc642b14114ab69667d3cc604aeb598b11aadbec889cacd0355a8c11e099003b206ac0afc26000dcf510e6aa7610208341
7
- data.tar.gz: 99bda0a984451b7713b39b516f0d8c5f8d38b9e6c1fbf4d338b64ae75e5a820210501ad5a9f4a39113ccd8252f80e2e7b7846a7ed71a39955f788538050ae2a7
6
+ metadata.gz: 7f56aef4866083bbf819dd2c318aacb41bf05b4cedb24853f7ac08b4142b34c35db55fb67b227e211e038b6384a9d7772e03828b2ee9566facf2bd1cf0fb79aa
7
+ data.tar.gz: 7ac1d4d5a7203462bb045b7a38151c98a4d20c1ae845da4de603ad1010b4b1838f0551fce93eef7bfed736338e920dabbc1b98d9bef57f2d2a341fbcd377d02d
data/Gemfile.lock CHANGED
@@ -36,7 +36,7 @@ GIT
36
36
  PATH
37
37
  remote: .
38
38
  specs:
39
- corl (0.4.18)
39
+ corl (0.4.19)
40
40
  facter (~> 1.7)
41
41
  fog (~> 1.20)
42
42
  hiera (~> 1.3)
data/Rakefile CHANGED
@@ -34,7 +34,7 @@ Jeweler::Tasks.new do |gem|
34
34
  gem.authors = ["Adrian Webb"]
35
35
  gem.summary = %Q{Cluster Orchestration and Research Library}
36
36
  gem.description = %Q{Framework that provides a simple foundation for growing organically in the cloud}
37
- gem.required_ruby_version = '>= 2.0'
37
+ gem.required_ruby_version = '>= 1.9.1'
38
38
  gem.has_rdoc = true
39
39
  gem.rdoc_options << '--title' << 'Cluster Orchestration and Research Library' <<
40
40
  '--main' << 'README.rdoc' <<
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.18
1
+ 0.4.19
@@ -12,6 +12,8 @@ echo "nameserver 208.67.222.222" | tee /etc/resolvconf/resolv.conf.d/base > /dev
12
12
 
13
13
  # Update system packages
14
14
  apt-get update || exit 4
15
+ apt-get -y dist-upgrade || exit 5
15
16
 
16
17
  # Install basic build packages.
17
- apt-get -y install build-essential python-software-properties curl || exit 5
18
+ apt-get -y install build-essential libnl-dev libpopt-dev libssl-dev libcurl4-openssl-dev libxslt-dev libxml2-dev || exit 6
19
+ apt-get -y install python-software-properties unzip curl || exit 7
@@ -2,7 +2,7 @@
2
2
  #-------------------------------------------------------------------------------
3
3
 
4
4
  # Install Vim editor.
5
- apt-get -y install vim vim-scripts vim-puppet || exit 20
5
+ apt-get -y install vim || exit 20
6
6
 
7
7
  # Set Vim options
8
8
  ( cat <<'EOP'
@@ -2,15 +2,10 @@
2
2
  #-------------------------------------------------------------------------------
3
3
 
4
4
  # Install Ruby.
5
- add-apt-repository -y ppa:brightbox/ruby-ng-experimental 2>&1 || exit 51
6
- apt-get update || exit 52
7
-
8
- apt-get -y install ruby2.0 ruby2.0-dev || exit 53
9
- update-alternatives --set ruby /usr/bin/ruby2.0 || exit 54
10
- update-alternatives --set gem /usr/bin/gem2.0 || exit 55
5
+ apt-get -y install ruby2.0 ruby2.0-dev ruby1.9.1-dev || exit 50
11
6
 
12
7
  # Set Gem options
13
8
  ( cat <<'EOP'
14
9
  gem: --no-rdoc --no-ri
15
10
  EOP
16
- ) > "$HOME/.gemrc" || exit 56
11
+ ) > "$HOME/.gemrc" || exit 51
@@ -5,15 +5,15 @@
5
5
  apt-key adv --recv-key --keyserver pgp.mit.edu 4BD6EC30 2>&1 || exit 60
6
6
 
7
7
  ( cat <<'EOP'
8
- deb http://apt.puppetlabs.com precise main dependencies
9
- deb-src http://apt.puppetlabs.com precise main dependencies
8
+ deb http://apt.puppetlabs.com trusty main dependencies
9
+ deb-src http://apt.puppetlabs.com trusty main dependencies
10
10
  EOP
11
11
  ) > /etc/apt/sources.list.d/puppet.list || exit 61
12
12
  chmod 0644 /etc/apt/sources.list.d/puppet.list || exit 62
13
13
 
14
14
  # Install Puppet
15
15
  apt-get -y update || exit 63
16
- apt-get -y install puppet-common=3.4.3-1puppetlabs1 puppet=3.4.3-1puppetlabs1 || exit 64
16
+ apt-get -y install puppet-common=3.4.3-1 puppet=3.4.3-1 || exit 64
17
17
 
18
18
  # Set up Hiera configuration
19
19
  mkdir -p /var/corl/config || exit 65
@@ -3,12 +3,17 @@
3
3
 
4
4
  # For now we install CORL through the repo for testing purposes
5
5
 
6
+ # Install this dependency separately so the damn thing will build.
7
+ # I REALLY dislike Nokogiri.
8
+ # TODO: Figure out why this is happening?
9
+ gem install nokogiri || exit 100
10
+
6
11
  # Install the corl gem
7
12
  rm -Rf /tmp/corl
8
- mkdir /tmp/corl || exit 100
13
+ mkdir /tmp/corl || exit 101
9
14
 
10
- cd /tmp/corl || exit 101
11
- git clone --branch 0.4 git://github.com/coralnexus/corl.git /tmp/corl || exit 102
12
- git submodule update --init --recursive || exit 103
13
- gem build /tmp/corl/corl.gemspec || exit 104
14
- gem install /tmp/corl/corl-*.gem || exit 105
15
+ cd /tmp/corl || exit 102
16
+ git clone --branch 0.4 git://github.com/coralnexus/corl.git /tmp/corl || exit 103
17
+ git submodule update --init --recursive || exit 104
18
+ gem build /tmp/corl/corl.gemspec || exit 105
19
+ gem install /tmp/corl/corl-*.gem || exit 106
data/corl.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: corl 0.4.18 ruby lib
5
+ # stub: corl 0.4.19 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "corl"
9
- s.version = "0.4.18"
9
+ s.version = "0.4.19"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Adrian Webb"]
14
- s.date = "2014-04-22"
14
+ s.date = "2014-04-24"
15
15
  s.description = "Framework that provides a simple foundation for growing organically in the cloud"
16
16
  s.email = "adrian.webb@coralnexus.com"
17
17
  s.executables = ["corl"]
@@ -146,7 +146,7 @@ Gem::Specification.new do |s|
146
146
  s.homepage = "http://github.com/coralnexus/corl"
147
147
  s.licenses = ["GPLv3"]
148
148
  s.rdoc_options = ["--title", "Cluster Orchestration and Research Library", "--main", "README.rdoc", "--line-numbers"]
149
- s.required_ruby_version = Gem::Requirement.new(">= 2.0")
149
+ s.required_ruby_version = Gem::Requirement.new(">= 1.9.1")
150
150
  s.rubyforge_project = "corl"
151
151
  s.rubygems_version = "2.2.2"
152
152
  s.summary = "Cluster Orchestration and Research Library"
@@ -18,6 +18,8 @@ class Seed < Plugin::CloudAction
18
18
 
19
19
  register :project_branch, :str, 'master'
20
20
  register :project_reference, :str, nil do |value|
21
+ next true if value.nil?
22
+
21
23
  value = value.to_sym
22
24
  project_plugins = CORL.loaded_plugins(:project)
23
25
 
@@ -13,6 +13,10 @@ class Spawn < Plugin::CloudAction
13
13
  codes :key_failure,
14
14
  :node_create_failure
15
15
 
16
+ register :bootstrap, :bool, true
17
+ register :seed, :bool, true
18
+ register :provision, :bool, true
19
+
16
20
  register :groups, :array, []
17
21
  register :region, :str, nil
18
22
  register :machine_type, :str, nil
@@ -12,15 +12,6 @@ class File < CORL.plugin_class(:configuration)
12
12
  _set(:router, Config.new)
13
13
  end
14
14
  end
15
-
16
- #---
17
-
18
- def self.finalize(file_name)
19
- proc do
20
- logger.debug("Finalizing file: #{file_name}")
21
- Util::Disk.close(file_name)
22
- end
23
- end
24
15
 
25
16
  #-----------------------------------------------------------------------------
26
17
  # Property accessors / modifiers
@@ -318,7 +309,6 @@ class File < CORL.plugin_class(:configuration)
318
309
  :info => info,
319
310
  :file => file
320
311
  }
321
- ObjectSpace.define_finalizer(myself, myself.class.finalize(file))
322
312
  else
323
313
  logger.info("Configuration file #{file} does not exist")
324
314
  end
@@ -61,6 +61,26 @@ class Vagrant < CORL.plugin_class(:node)
61
61
  hash(myself[:shares])
62
62
  end
63
63
 
64
+ #---
65
+
66
+ def build_time=time
67
+ set_cache_setting(:build, time)
68
+ end
69
+
70
+ def build_time
71
+ cache_setting(:build, nil)
72
+ end
73
+
74
+ #---
75
+
76
+ def bootstrap_script=bootstrap
77
+ set_cache_setting(:bootstrap, bootstrap)
78
+ end
79
+
80
+ def bootstrap_script
81
+ cache_setting(:bootstrap, nil)
82
+ end
83
+
64
84
  #-----------------------------------------------------------------------------
65
85
  # Settings groups
66
86
 
@@ -82,6 +102,12 @@ class Vagrant < CORL.plugin_class(:node)
82
102
  #-----------------------------------------------------------------------------
83
103
  # Node operations
84
104
 
105
+ def build(options = {})
106
+ super(Config.ensure(options).import({ :save => false }))
107
+ end
108
+
109
+ #---
110
+
85
111
  def create(options = {})
86
112
  super do |op, config|
87
113
  if op == :config
@@ -14,6 +14,8 @@ class Network < CORL.plugin_class(:base)
14
14
  logger.info("Initializing sub configuration from source with: #{myself._export.inspect}")
15
15
  myself.config = CORL.configuration(Config.new(myself._export).import({ :autosave => false, :create => false })) unless reload
16
16
 
17
+ config.delete(:directory) # TODO: Figure out what to do with this??
18
+
17
19
  ignore('build')
18
20
  end
19
21
 
@@ -282,12 +284,15 @@ class Network < CORL.plugin_class(:base)
282
284
  config = Config.ensure(options)
283
285
  success = true
284
286
 
285
- bootstrap = config.delete(:bootstrap, false)
286
- seed = config.delete(:seed, false)
287
+ bootstrap_requested = config.has_key?(:bootstrap)
288
+ bootstrap = config.delete(:bootstrap, false)
289
+
290
+ seed_requested = config.has_key?(:seed)
291
+ seed = config.delete(:seed, false)
287
292
 
288
293
  unless node.cache_setting(:initialized)
289
- bootstrap = true
290
- seed = true
294
+ bootstrap = true unless bootstrap_requested
295
+ seed = true unless seed_requested
291
296
  end
292
297
 
293
298
  provision = config.delete(:provision, true)
@@ -313,10 +313,24 @@ class Node < CORL.plugin_class(:base)
313
313
 
314
314
  #---
315
315
 
316
+ def build_time=time
317
+ myself[:build] = time
318
+ end
319
+
316
320
  def build_time
317
321
  myself[:build]
318
322
  end
319
323
 
324
+ #---
325
+
326
+ def bootstrap_script=bootstrap
327
+ myself[:bootstrap] = bootstrap
328
+ end
329
+
330
+ def bootstrap_script
331
+ myself[:bootstrap]
332
+ end
333
+
320
334
  #-----------------------------------------------------------------------------
321
335
  # Settings groups
322
336
 
@@ -349,10 +363,10 @@ class Node < CORL.plugin_class(:base)
349
363
  end
350
364
  end
351
365
 
352
- if success
366
+ if success && config.delete(:save, true)
353
367
  ui.success("Saving successful build")
354
368
 
355
- myself[:build] = Time.now.to_s
369
+ myself.build_time = Time.now.to_s
356
370
 
357
371
  success = save(extended_config(:build, {
358
372
  :message => config.get(:message, "Built #{plugin_provider} node: #{plugin_name}"),
@@ -798,7 +812,7 @@ class Node < CORL.plugin_class(:base)
798
812
  if status == code.success
799
813
  remote_script = File.join(remote_bootstrap_path, bootstrap_init)
800
814
 
801
- myself[:bootstrap] = remote_script
815
+ myself.bootstrap_script = remote_script
802
816
 
803
817
  result = command("HOSTNAME='#{hostname}' #{remote_script}", { :as_admin => true }) do |op, data|
804
818
  yield("exec_#{op}".to_sym, data) if block_given?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: corl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.18
4
+ version: 0.4.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Webb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-22 00:00:00.000000000 Z
11
+ date: 2014-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nucleon
@@ -339,7 +339,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
339
339
  requirements:
340
340
  - - ">="
341
341
  - !ruby/object:Gem::Version
342
- version: '2.0'
342
+ version: 1.9.1
343
343
  required_rubygems_version: !ruby/object:Gem::Requirement
344
344
  requirements:
345
345
  - - ">="