wildcloud-keeper 0.0.2 → 0.0.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.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.0.3 (13.1.2012)
2
+
3
+ * depend on wildcloud-configuration
4
+ * change in configuration file structure
5
+
1
6
  ## 0.0.2 (4.1.2012)
2
7
 
3
8
  * remove heartbeat
@@ -13,6 +13,9 @@
13
13
  # limitations under the License.
14
14
 
15
15
  require 'yaml'
16
+
17
+ require 'wildcloud/configuration'
18
+
16
19
  require 'wildcloud/keeper/logger'
17
20
 
18
21
  module Wildcloud
@@ -20,12 +23,11 @@ module Wildcloud
20
23
 
21
24
  def self.configuration
22
25
  return @configuration if @configuration
23
- file = '/etc/wildcloud/keeper.yml'
24
- unless File.exists?(file)
25
- file = './keeper.yml'
26
+ config = Wildcloud::Configuration.load('keeper')
27
+ config.sources.each do |source|
28
+ self.logger.info('Configuration', "Loaded configuration from #{source}")
26
29
  end
27
- Keeper.logger.info('Configuration', "Loading from file #{file}")
28
- @configuration = YAML.load_file(file)
30
+ @configuration = config.configuration
29
31
  end
30
32
 
31
33
  end
@@ -38,7 +38,7 @@ module Wildcloud
38
38
  @queue = Queue.new
39
39
  @thread_pool = []
40
40
 
41
- Keeper.configuration['node']['workers'].times do |i|
41
+ Keeper.configuration['workers'].times do |i|
42
42
  Keeper.logger.debug('Runtime', "Starting thread ##{i}")
43
43
  Thread.new(i) do |id|
44
44
  Thread.current.abort_on_exception = false
@@ -32,14 +32,14 @@ module Wildcloud
32
32
  Keeper.add_amqp_logger(@connection)
33
33
 
34
34
  @channel = AMQP::Channel.new(@connection)
35
- @channel.prefetch(Keeper.configuration['node']['workers'])
35
+ @channel.prefetch(Keeper.configuration['workers'])
36
36
 
37
37
  @exchange = @channel.topic('wildcloud.keeper')
38
38
  @queue = @channel.queue("wildcloud.keeper.node.#{Keeper.configuration['node']['name']}")
39
39
  @queue.bind(@exchange, :routing_key => 'nodes')
40
40
  @queue.bind(@exchange, :routing_key => "node.#{Keeper.configuration['node']['name']}")
41
41
 
42
- if Keeper.configuration['node']['builder']
42
+ if Keeper.configuration['builder']
43
43
  @builders = @channel.queue("wildcloud.keeper.build")
44
44
  @builders.bind(@exchange, :routing_key => 'build')
45
45
  end
@@ -14,6 +14,6 @@
14
14
 
15
15
  module Wildcloud
16
16
  module Keeper
17
- VERSION = '0.0.2' unless const_defined?(:VERSION)
17
+ VERSION = '0.0.3' unless const_defined?(:VERSION)
18
18
  end
19
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wildcloud-keeper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-04 00:00:00.000000000 Z
12
+ date: 2012-01-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: amqp
16
- requirement: &2152643840 !ruby/object:Gem::Requirement
16
+ requirement: &2152690020 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - =
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.8.4
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2152643840
24
+ version_requirements: *2152690020
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json
27
- requirement: &2152643060 !ruby/object:Gem::Requirement
27
+ requirement: &2152688820 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - =
@@ -32,10 +32,21 @@ dependencies:
32
32
  version: 1.6.4
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2152643060
35
+ version_requirements: *2152688820
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: wildcloud-logger
38
- requirement: &2152642060 !ruby/object:Gem::Requirement
38
+ requirement: &2152687660 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - =
42
+ - !ruby/object:Gem::Version
43
+ version: 0.0.2
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *2152687660
47
+ - !ruby/object:Gem::Dependency
48
+ name: wildcloud-configuration
49
+ requirement: &2152685420 !ruby/object:Gem::Requirement
39
50
  none: false
40
51
  requirements:
41
52
  - - =
@@ -43,7 +54,7 @@ dependencies:
43
54
  version: 0.0.1
44
55
  type: :runtime
45
56
  prerelease: false
46
- version_requirements: *2152642060
57
+ version_requirements: *2152685420
47
58
  description: Keeper deploys instances, starts and stops virtual machines
48
59
  email:
49
60
  - marek@jelen.biz