mqsink 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -0
- data/Gemfile.lock +18 -0
- data/README.md +56 -0
- data/Rakefile +29 -0
- data/examples/acl.conf +1 -0
- data/examples/classifiers.conf +1 -0
- data/examples/mqsink.json +9 -0
- data/mqsink.gemspec +15 -0
- metadata +41 -9
- checksums.yaml +0 -7
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
data/README.md
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
# mqsinkd
|
2
|
+
|
3
|
+
## requirements
|
4
|
+
|
5
|
+
1. ruby 1.9+
|
6
|
+
2. rubygems bunny
|
7
|
+
|
8
|
+
## install
|
9
|
+
|
10
|
+
> gem install mqsink
|
11
|
+
>
|
12
|
+
|
13
|
+
## run
|
14
|
+
|
15
|
+
> mqsinkd &
|
16
|
+
|
17
|
+
## configuration
|
18
|
+
|
19
|
+
Base configuration: /etc/mqsink/mqsink.json (hard-coded)
|
20
|
+
|
21
|
+
{ "localhost":"0.0.0.0",
|
22
|
+
"localport":514,
|
23
|
+
"amqp_server":"127.0.0.1",
|
24
|
+
"static_queue":"test_queue",
|
25
|
+
"mode":"raw",
|
26
|
+
"firewall":"on",
|
27
|
+
"fw_refresh":"on",
|
28
|
+
"fw_file":"/etc/mqsink/acl.conf",
|
29
|
+
"debug":"off",
|
30
|
+
"classifiers":"/etc/mqsink/classifiers.conf" }
|
31
|
+
|
32
|
+
Base configuration: /etc/mqsink/acl.conf
|
33
|
+
|
34
|
+
0.0.0.0
|
35
|
+
|
36
|
+
Base configuation: /etc/mqsink/classifiers.conf
|
37
|
+
|
38
|
+
test_queue [.*]
|
39
|
+
|
40
|
+
## arguments:
|
41
|
+
|
42
|
+
1. amqp_server : IP address or hostname of the AMQP server
|
43
|
+
2. static_queue : name of the static queue (only used in 'raw' mode)
|
44
|
+
3. mode : raw | xlate | classify
|
45
|
+
4. firewall : on | off
|
46
|
+
5. fw_file : contains a list of authorised IP addresses (only used when firewall is active)
|
47
|
+
6. fw_refresh : on | off - reload ACL periodically (there is no dynamic counter for it, it just reloads the entire content of the fw_file every 5 packets)
|
48
|
+
7. debug : on | off
|
49
|
+
8. classifiers : contains a list of regular expressions and associated outbound amqp queue (only used in 'classify' mode)
|
50
|
+
|
51
|
+
## modes:
|
52
|
+
|
53
|
+
1. raw : mqsinkd writes all authorised input packets to a statically defined queue
|
54
|
+
2. xlate : the amqp queue name is enclosed in the message
|
55
|
+
3. classify : the amqp queue name is paired with user defined regular expressions and stored in a configuration file
|
56
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler'
|
3
|
+
Bundler.setup
|
4
|
+
rescue LoadError
|
5
|
+
warn 'bundler not found.'
|
6
|
+
exit 1
|
7
|
+
end
|
8
|
+
|
9
|
+
gemspec = eval(File.read(Dir['*.gemspec'].first))
|
10
|
+
file = [gemspec.name, gemspec.version].join('-') + '.gem'
|
11
|
+
|
12
|
+
task :validate do
|
13
|
+
gemspec.validate
|
14
|
+
end
|
15
|
+
|
16
|
+
task :build do
|
17
|
+
system "gem build #{gemspec.name}.gemspec"
|
18
|
+
FileUtils.mkdir_p 'gems'
|
19
|
+
FileUtils.mv file, 'gems'
|
20
|
+
end
|
21
|
+
|
22
|
+
task :install => [:validate, :build] do
|
23
|
+
system "sudo -E sh -c \'umask 022; gem install gems/#{file}\'"
|
24
|
+
end
|
25
|
+
|
26
|
+
task :delete do
|
27
|
+
FileUtils.rm_rf 'gems'
|
28
|
+
system "gem uninstall #{gemspec.name}"
|
29
|
+
end
|
data/examples/acl.conf
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.0.0
|
@@ -0,0 +1 @@
|
|
1
|
+
test1 [.*]
|
data/mqsink.gemspec
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'mqsink'
|
3
|
+
s.version = '0.0.11'
|
4
|
+
s.platform = Gem::Platform::RUBY
|
5
|
+
s.authors = [ 'Samer Abdel-Hafez' ]
|
6
|
+
s.email = %w( sam@arahant.net )
|
7
|
+
s.homepage = 'http://github.com/nopedial/mqsink'
|
8
|
+
s.summary = 'udp to amqp bridge'
|
9
|
+
s.description = 'a smart and lightweight udp to amqp translator'
|
10
|
+
s.rubyforge_project = s.name
|
11
|
+
s.files = `git ls-files`.split("\n")
|
12
|
+
s.executables = %w( mqsinkd )
|
13
|
+
s.require_path = 'lib'
|
14
|
+
s.add_dependency 'bunny', '>= 0.10.8'
|
15
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mqsink
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Samer Abdel-Hafez
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-
|
12
|
-
dependencies:
|
12
|
+
date: 2014-06-09 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bunny
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.10.8
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.10.8
|
13
30
|
description: a smart and lightweight udp to amqp translator
|
14
31
|
email:
|
15
32
|
- sam@arahant.net
|
@@ -18,32 +35,47 @@ executables:
|
|
18
35
|
extensions: []
|
19
36
|
extra_rdoc_files: []
|
20
37
|
files:
|
38
|
+
- Gemfile
|
39
|
+
- Gemfile.lock
|
40
|
+
- README.md
|
41
|
+
- Rakefile
|
42
|
+
- bin/mqsinkd
|
43
|
+
- examples/acl.conf
|
44
|
+
- examples/classifiers.conf
|
45
|
+
- examples/mqsink.json
|
21
46
|
- lib/mqsink.rb
|
22
47
|
- lib/mqsink/acl.rb
|
23
48
|
- lib/mqsink/amqp.rb
|
24
49
|
- lib/mqsink/server.rb
|
25
|
-
-
|
50
|
+
- mqsink.gemspec
|
26
51
|
homepage: http://github.com/nopedial/mqsink
|
27
52
|
licenses: []
|
28
|
-
metadata: {}
|
29
53
|
post_install_message:
|
30
54
|
rdoc_options: []
|
31
55
|
require_paths:
|
32
56
|
- lib
|
33
57
|
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
34
59
|
requirements:
|
35
|
-
- - '>='
|
60
|
+
- - ! '>='
|
36
61
|
- !ruby/object:Gem::Version
|
37
62
|
version: '0'
|
63
|
+
segments:
|
64
|
+
- 0
|
65
|
+
hash: -647814221
|
38
66
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
39
68
|
requirements:
|
40
|
-
- - '>='
|
69
|
+
- - ! '>='
|
41
70
|
- !ruby/object:Gem::Version
|
42
71
|
version: '0'
|
72
|
+
segments:
|
73
|
+
- 0
|
74
|
+
hash: -647814221
|
43
75
|
requirements: []
|
44
76
|
rubyforge_project: mqsink
|
45
|
-
rubygems_version:
|
77
|
+
rubygems_version: 1.8.23
|
46
78
|
signing_key:
|
47
|
-
specification_version:
|
79
|
+
specification_version: 3
|
48
80
|
summary: udp to amqp bridge
|
49
81
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 34efedf476cf60f8caa7a0088a9845d1ce2d2c61
|
4
|
-
data.tar.gz: a3190f599967e03613965561d12f6ba27b47ad28
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 16f4ece22161c72062f696548de8a2caf57128e45e92a1bdefeb65d01c173a348ce9794f3baeb5bbf733d17ea75ddf7a69e473ddd42edf3bda64898d77909a88
|
7
|
-
data.tar.gz: 78c7079b74480514d1f1e7af2109dd13f7c44615a7afc2bba0d2ef089c4c549b4fecfc7772c4f62083cec7d17e1684e7415a417aef8bd718fb6489df0114a8fc
|