right_infrastructure_agent 1.1.4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +3 -1
- data/Rakefile +34 -47
- data/lib/right_infrastructure_agent/rainbows_agent_controller.rb +7 -4
- data/right_infrastructure_agent.gemspec +4 -5
- data/spec/spec_helper.rb +2 -1
- metadata +35 -35
- checksums.yaml +0 -7
data/README.rdoc
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
"master" branch: {<img src="https://magnum.travis-ci.com/rightscale/right_infrastructure_agent.svg?token=iMyNTpAx4RVEN4cmH4uH&branch=master" alt="Build Status" />}[https://magnum.travis-ci.com/rightscale/right_infrastructure_agent]
|
2
|
+
|
1
3
|
= RightInfrastructureAgent
|
2
4
|
|
3
5
|
= DESCRIPTION
|
@@ -9,7 +11,7 @@ servers that connect into the RightScale system via the RabbitMQ message bus.
|
|
9
11
|
It extends RightAgent in configuration, monitoring, and packet handling areas
|
10
12
|
as needed generically by infrastructure servers.
|
11
13
|
|
12
|
-
Maintained by the RightScale
|
14
|
+
Maintained by the RightScale Cornsilk Team
|
13
15
|
|
14
16
|
== Interface
|
15
17
|
|
data/Rakefile
CHANGED
@@ -23,64 +23,51 @@
|
|
23
23
|
|
24
24
|
require 'rubygems'
|
25
25
|
require 'bundler/setup'
|
26
|
-
|
26
|
+
|
27
27
|
require 'rake'
|
28
|
-
require '
|
29
|
-
require 'rdoc/task'
|
30
|
-
require 'rake/gempackagetask'
|
28
|
+
require 'rubygems/package_task'
|
31
29
|
require 'rake/clean'
|
30
|
+
require 'rspec/core/rake_task'
|
31
|
+
require 'fileutils'
|
32
32
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
package.need_zip = true
|
41
|
-
package.need_tar = true
|
33
|
+
# These dependencies can be omitted using "bundle install --without"; tolerate their absence.
|
34
|
+
['rdoc/task'].each do |optional|
|
35
|
+
begin
|
36
|
+
require optional
|
37
|
+
rescue LoadError
|
38
|
+
# ignore
|
39
|
+
end
|
42
40
|
end
|
43
41
|
|
44
|
-
|
45
|
-
|
46
|
-
CLEAN.include(gemtask.package_dir)
|
47
|
-
|
48
|
-
# == Unit tests == #
|
49
|
-
|
50
|
-
RSPEC_OPTS = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
|
42
|
+
desc "Run unit tests"
|
43
|
+
task :default => :spec
|
51
44
|
|
52
45
|
desc 'Run unit tests'
|
53
|
-
RSpec::Core::RakeTask.new do |t|
|
54
|
-
t.rspec_opts =
|
46
|
+
RSpec::Core::RakeTask.new do |t|
|
47
|
+
t.rspec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
|
48
|
+
t.pattern = Dir['**/*_spec.rb']
|
55
49
|
end
|
56
50
|
|
57
|
-
|
58
|
-
desc '
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
RSpec::Core::RakeTask.new(:doc) do |t|
|
67
|
-
t.rspec_opts = ["--format", "documentation"]
|
51
|
+
if defined?(Rake::RDocTask)
|
52
|
+
desc 'Generate documentation for the right_infrastructure_agent gem.'
|
53
|
+
Rake::RDocTask.new(:rdoc) do |rdoc|
|
54
|
+
rdoc.rdoc_dir = 'doc'
|
55
|
+
rdoc.title = 'RightAgent'
|
56
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
57
|
+
rdoc.rdoc_files.include('README.rdoc')
|
58
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
59
|
+
rdoc.rdoc_files.exclude('spec/**/*')
|
68
60
|
end
|
69
61
|
end
|
62
|
+
CLEAN.include('doc')
|
70
63
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
rd.main = 'README.rdoc'
|
77
|
-
rd.rdoc_files.include 'README.rdoc', 'lib/**/*.rb'
|
64
|
+
desc "Package gem"
|
65
|
+
gemtask = Gem::PackageTask.new(Gem::Specification.load("right_infrastructure_agent.gemspec")) do |pkg|
|
66
|
+
pkg.package_dir = 'pkg'
|
67
|
+
pkg.need_zip = true
|
68
|
+
pkg.need_tar = true
|
78
69
|
end
|
79
|
-
CLEAN.include('
|
70
|
+
CLEAN.include('pkg')
|
80
71
|
|
81
|
-
|
82
|
-
|
83
|
-
desc 'Rebuild TAGS file for emacs'
|
84
|
-
task :tags do
|
85
|
-
sh 'rtags -R lib spec'
|
86
|
-
end
|
72
|
+
require 'right_develop'
|
73
|
+
RightDevelop::CI::RakeTask.new
|
@@ -35,9 +35,12 @@ module RightScale
|
|
35
35
|
# Start agent and create error tracker for its use
|
36
36
|
# Choose agent type from candidate types based on contents of configuration directory
|
37
37
|
# Assign agent name by using worker index to suffix agent type
|
38
|
+
# Agent is required to call Proc in :ready_proc option when it is ready to receive traffic
|
38
39
|
#
|
39
40
|
# @param [Array] agent_types for candidate agents
|
40
|
-
# @param [
|
41
|
+
# @param [Unicorn::Worker] worker created by rainbows for this worker process;
|
42
|
+
# worker index is contained in its :nr attribute; worker will not receive HTTP traffic
|
43
|
+
# until its :ready attribute is set to true
|
41
44
|
# @param [Object] logger to use
|
42
45
|
#
|
43
46
|
# @option options [String] :cfg_dir containing configuration for all agents
|
@@ -48,10 +51,10 @@ module RightScale
|
|
48
51
|
# the configuration hash and returning the updated configuration hash, optional
|
49
52
|
#
|
50
53
|
# @return [TrueClass] always true
|
51
|
-
def self.start(agent_types,
|
54
|
+
def self.start(agent_types, worker, logger, options = {}, &block)
|
52
55
|
RightSupport::Log::Mixin.default_logger = logger
|
53
56
|
Log.force_logger(logger) if logger
|
54
|
-
@worker_index =
|
57
|
+
@worker_index = worker.nr
|
55
58
|
agent_name = nil
|
56
59
|
|
57
60
|
# Need next_tick here to wait for rainbows worker to start EventMachine
|
@@ -91,7 +94,7 @@ module RightScale
|
|
91
94
|
cfg.inject([]) do |t, (k, v)|
|
92
95
|
t << "- #{k}: #{k.to_s =~ /pass|auth/ ? "<hidden>" : (v.respond_to?(:each) ? v.inspect : v)}"
|
93
96
|
end.sort.each { |l| Log.info(l) }
|
94
|
-
@agent = agent_class.start(cfg)
|
97
|
+
@agent = agent_class.start(cfg.merge(:ready_proc => Proc.new { worker.ready = true }))
|
95
98
|
|
96
99
|
rescue PidFile::AlreadyRunning
|
97
100
|
Log.error("#{agent_name} already running") rescue nil
|
@@ -24,8 +24,8 @@ require 'rubygems'
|
|
24
24
|
|
25
25
|
Gem::Specification.new do |spec|
|
26
26
|
spec.name = 'right_infrastructure_agent'
|
27
|
-
spec.version = '
|
28
|
-
spec.date = '
|
27
|
+
spec.version = '2.0.0'
|
28
|
+
spec.date = '2015-05-12'
|
29
29
|
spec.authors = ['Lee Kirchhoff', 'Raphael Simon']
|
30
30
|
spec.email = 'lee@rightscale.com'
|
31
31
|
spec.homepage = 'https://github.com/rightscale/right_infrastructure_agent'
|
@@ -37,9 +37,8 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.required_ruby_version = '>= 1.8.7'
|
38
38
|
spec.require_path = 'lib'
|
39
39
|
|
40
|
-
spec.add_dependency('right_support', '
|
41
|
-
spec.add_dependency('
|
42
|
-
spec.add_dependency('right_agent', '~> 2.0')
|
40
|
+
spec.add_dependency('right_support', ['>= 2.4.1', '< 3.0'])
|
41
|
+
spec.add_dependency('right_agent', '~> 2.4')
|
43
42
|
|
44
43
|
spec.description = <<-EOF
|
45
44
|
RightInfrastructureAgent provides the foundation for RightScale infrastructure
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: right_infrastructure_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Lee Kirchhoff
|
@@ -9,55 +10,50 @@ authors:
|
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date:
|
13
|
+
date: 2015-05-12 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: right_support
|
16
17
|
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
17
19
|
requirements:
|
18
|
-
- -
|
20
|
+
- - ! '>='
|
19
21
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
21
|
-
|
22
|
-
prerelease: false
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
24
|
-
requirements:
|
25
|
-
- - "~>"
|
22
|
+
version: 2.4.1
|
23
|
+
- - <
|
26
24
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: right_amqp
|
30
|
-
requirement: !ruby/object:Gem::Requirement
|
31
|
-
requirements:
|
32
|
-
- - "~>"
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: '0.4'
|
25
|
+
version: '3.0'
|
35
26
|
type: :runtime
|
36
27
|
prerelease: false
|
37
28
|
version_requirements: !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
38
30
|
requirements:
|
39
|
-
- -
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.4.1
|
34
|
+
- - <
|
40
35
|
- !ruby/object:Gem::Version
|
41
|
-
version: '0
|
36
|
+
version: '3.0'
|
42
37
|
- !ruby/object:Gem::Dependency
|
43
38
|
name: right_agent
|
44
39
|
requirement: !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
45
41
|
requirements:
|
46
|
-
- -
|
42
|
+
- - ~>
|
47
43
|
- !ruby/object:Gem::Version
|
48
|
-
version: '2.
|
44
|
+
version: '2.4'
|
49
45
|
type: :runtime
|
50
46
|
prerelease: false
|
51
47
|
version_requirements: !ruby/object:Gem::Requirement
|
48
|
+
none: false
|
52
49
|
requirements:
|
53
|
-
- -
|
50
|
+
- - ~>
|
54
51
|
- !ruby/object:Gem::Version
|
55
|
-
version: '2.
|
56
|
-
description:
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
as needed generically by infrastructure servers.
|
52
|
+
version: '2.4'
|
53
|
+
description: ! " RightInfrastructureAgent provides the foundation for RightScale
|
54
|
+
infrastructure\n servers that connect into the RightScale system via the RabbitMQ
|
55
|
+
message bus.\n It extends RightAgent in configuration, monitoring, and packet handling
|
56
|
+
areas\n as needed generically by infrastructure servers.\n"
|
61
57
|
email: lee@rightscale.com
|
62
58
|
executables: []
|
63
59
|
extensions: []
|
@@ -88,29 +84,33 @@ files:
|
|
88
84
|
- spec/spec_helper.rb
|
89
85
|
homepage: https://github.com/rightscale/right_infrastructure_agent
|
90
86
|
licenses: []
|
91
|
-
metadata: {}
|
92
87
|
post_install_message:
|
93
88
|
rdoc_options:
|
94
|
-
-
|
89
|
+
- --main
|
95
90
|
- README.rdoc
|
96
|
-
-
|
91
|
+
- --title
|
97
92
|
- RightInfrastructureAgent
|
98
93
|
require_paths:
|
99
94
|
- lib
|
100
95
|
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
101
97
|
requirements:
|
102
|
-
- -
|
98
|
+
- - ! '>='
|
103
99
|
- !ruby/object:Gem::Version
|
104
100
|
version: 1.8.7
|
105
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
|
+
none: false
|
106
103
|
requirements:
|
107
|
-
- -
|
104
|
+
- - ! '>='
|
108
105
|
- !ruby/object:Gem::Version
|
109
106
|
version: '0'
|
107
|
+
segments:
|
108
|
+
- 0
|
109
|
+
hash: 4260722709866981988
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
|
-
rubygems_version:
|
112
|
+
rubygems_version: 1.8.26
|
113
113
|
signing_key:
|
114
|
-
specification_version:
|
114
|
+
specification_version: 3
|
115
115
|
summary: RightAgent extension for use by RightScale infrastructure servers
|
116
116
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 596c56ba8756ec6dfba54af77974094be8d270a4
|
4
|
-
data.tar.gz: 341d620ed223b1456ec935dcbbc7b74a1a79d909
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 72c1b1d847e9fd0ee93e2e5d1999e7699f6415cb14adf3a30d9ce712ceb032081eb75ccf1e8c0752b52041b8b3876f0f2c558f4f63f42b8dec540c524c69b19a
|
7
|
-
data.tar.gz: d87575a698c4352f9073987ac1e72dab87fc3f61c9fbfcd9cf1da7f49da304faea276cb3b2fc53e769450fa718777883a33ed9a32ad95aa69983cde0d08ec28e
|