synapse 0.15.1 → 0.16.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/README.md +4 -2
- data/bin/synapse +7 -1
- data/config/synapse.conf.json +12 -1
- data/lib/synapse.rb +60 -20
- data/lib/synapse/config_generator/file_output.rb +10 -2
- data/lib/synapse/config_generator/haproxy.rb +42 -7
- data/lib/synapse/service_watcher/base.rb +2 -0
- data/lib/synapse/service_watcher/dns.rb +7 -1
- data/lib/synapse/service_watcher/zookeeper.rb +123 -72
- data/lib/synapse/statsd.rb +47 -0
- data/lib/synapse/version.rb +1 -1
- data/spec/bin/synapse_spec.rb +56 -0
- data/spec/lib/synapse/file_output_spec.rb +9 -2
- data/spec/lib/synapse/haproxy_spec.rb +158 -1
- data/spec/lib/synapse/service_watcher_dns_spec.rb +51 -0
- data/spec/lib/synapse/service_watcher_zookeeper_spec.rb +45 -0
- data/spec/support/configuration.rb +3 -1
- data/spec/support/minimum.conf.yaml +2 -0
- data/synapse.gemspec +1 -0
- metadata +52 -33
@@ -1,7 +1,9 @@
|
|
1
1
|
require "yaml"
|
2
|
+
require "erb"
|
2
3
|
|
3
4
|
module Configuration
|
4
5
|
def config
|
5
|
-
|
6
|
+
filename = File.join(File.dirname(File.expand_path(__FILE__)), 'minimum.conf.yaml')
|
7
|
+
@config ||= YAML::load(ERB.new(File.read(filename)).result)
|
6
8
|
end
|
7
9
|
end
|
data/synapse.gemspec
CHANGED
@@ -26,6 +26,7 @@ Gem::Specification.new do |gem|
|
|
26
26
|
gem.add_runtime_dependency "zk", "~> 1.9.4"
|
27
27
|
gem.add_runtime_dependency "logging", "~> 1.8"
|
28
28
|
gem.add_runtime_dependency "hashdiff", "~> 0.2.3"
|
29
|
+
gem.add_runtime_dependency "dogstatsd-ruby", "~> 3.3.0"
|
29
30
|
|
30
31
|
gem.add_development_dependency "rake"
|
31
32
|
gem.add_development_dependency "rspec", "~> 3.1.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: synapse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Rhoads
|
@@ -10,174 +10,188 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2018-11-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: aws-sdk
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- - ~>
|
19
|
+
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '1.39'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- - ~>
|
26
|
+
- - "~>"
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
version: '1.39'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: docker-api
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
|
-
- - ~>
|
33
|
+
- - "~>"
|
34
34
|
- !ruby/object:Gem::Version
|
35
35
|
version: '1.7'
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
|
-
- - ~>
|
40
|
+
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '1.7'
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: zk
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- - ~>
|
47
|
+
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: 1.9.4
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
|
-
- - ~>
|
54
|
+
- - "~>"
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: 1.9.4
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: logging
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- - ~>
|
61
|
+
- - "~>"
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: '1.8'
|
64
64
|
type: :runtime
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
|
-
- - ~>
|
68
|
+
- - "~>"
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '1.8'
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: hashdiff
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
|
-
- - ~>
|
75
|
+
- - "~>"
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: 0.2.3
|
78
78
|
type: :runtime
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
|
-
- - ~>
|
82
|
+
- - "~>"
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: 0.2.3
|
85
|
+
- !ruby/object:Gem::Dependency
|
86
|
+
name: dogstatsd-ruby
|
87
|
+
requirement: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - "~>"
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: 3.3.0
|
92
|
+
type: :runtime
|
93
|
+
prerelease: false
|
94
|
+
version_requirements: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - "~>"
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 3.3.0
|
85
99
|
- !ruby/object:Gem::Dependency
|
86
100
|
name: rake
|
87
101
|
requirement: !ruby/object:Gem::Requirement
|
88
102
|
requirements:
|
89
|
-
- -
|
103
|
+
- - ">="
|
90
104
|
- !ruby/object:Gem::Version
|
91
105
|
version: '0'
|
92
106
|
type: :development
|
93
107
|
prerelease: false
|
94
108
|
version_requirements: !ruby/object:Gem::Requirement
|
95
109
|
requirements:
|
96
|
-
- -
|
110
|
+
- - ">="
|
97
111
|
- !ruby/object:Gem::Version
|
98
112
|
version: '0'
|
99
113
|
- !ruby/object:Gem::Dependency
|
100
114
|
name: rspec
|
101
115
|
requirement: !ruby/object:Gem::Requirement
|
102
116
|
requirements:
|
103
|
-
- - ~>
|
117
|
+
- - "~>"
|
104
118
|
- !ruby/object:Gem::Version
|
105
119
|
version: 3.1.0
|
106
120
|
type: :development
|
107
121
|
prerelease: false
|
108
122
|
version_requirements: !ruby/object:Gem::Requirement
|
109
123
|
requirements:
|
110
|
-
- - ~>
|
124
|
+
- - "~>"
|
111
125
|
- !ruby/object:Gem::Version
|
112
126
|
version: 3.1.0
|
113
127
|
- !ruby/object:Gem::Dependency
|
114
128
|
name: factory_girl
|
115
129
|
requirement: !ruby/object:Gem::Requirement
|
116
130
|
requirements:
|
117
|
-
- -
|
131
|
+
- - ">="
|
118
132
|
- !ruby/object:Gem::Version
|
119
133
|
version: '0'
|
120
134
|
type: :development
|
121
135
|
prerelease: false
|
122
136
|
version_requirements: !ruby/object:Gem::Requirement
|
123
137
|
requirements:
|
124
|
-
- -
|
138
|
+
- - ">="
|
125
139
|
- !ruby/object:Gem::Version
|
126
140
|
version: '0'
|
127
141
|
- !ruby/object:Gem::Dependency
|
128
142
|
name: pry
|
129
143
|
requirement: !ruby/object:Gem::Requirement
|
130
144
|
requirements:
|
131
|
-
- -
|
145
|
+
- - ">="
|
132
146
|
- !ruby/object:Gem::Version
|
133
147
|
version: '0'
|
134
148
|
type: :development
|
135
149
|
prerelease: false
|
136
150
|
version_requirements: !ruby/object:Gem::Requirement
|
137
151
|
requirements:
|
138
|
-
- -
|
152
|
+
- - ">="
|
139
153
|
- !ruby/object:Gem::Version
|
140
154
|
version: '0'
|
141
155
|
- !ruby/object:Gem::Dependency
|
142
156
|
name: pry-nav
|
143
157
|
requirement: !ruby/object:Gem::Requirement
|
144
158
|
requirements:
|
145
|
-
- -
|
159
|
+
- - ">="
|
146
160
|
- !ruby/object:Gem::Version
|
147
161
|
version: '0'
|
148
162
|
type: :development
|
149
163
|
prerelease: false
|
150
164
|
version_requirements: !ruby/object:Gem::Requirement
|
151
165
|
requirements:
|
152
|
-
- -
|
166
|
+
- - ">="
|
153
167
|
- !ruby/object:Gem::Version
|
154
168
|
version: '0'
|
155
169
|
- !ruby/object:Gem::Dependency
|
156
170
|
name: webmock
|
157
171
|
requirement: !ruby/object:Gem::Requirement
|
158
172
|
requirements:
|
159
|
-
- -
|
173
|
+
- - ">="
|
160
174
|
- !ruby/object:Gem::Version
|
161
175
|
version: '0'
|
162
176
|
type: :development
|
163
177
|
prerelease: false
|
164
178
|
version_requirements: !ruby/object:Gem::Requirement
|
165
179
|
requirements:
|
166
|
-
- -
|
180
|
+
- - ">="
|
167
181
|
- !ruby/object:Gem::Version
|
168
182
|
version: '0'
|
169
183
|
- !ruby/object:Gem::Dependency
|
170
184
|
name: timecop
|
171
185
|
requirement: !ruby/object:Gem::Requirement
|
172
186
|
requirements:
|
173
|
-
- -
|
187
|
+
- - ">="
|
174
188
|
- !ruby/object:Gem::Version
|
175
189
|
version: '0'
|
176
190
|
type: :development
|
177
191
|
prerelease: false
|
178
192
|
version_requirements: !ruby/object:Gem::Requirement
|
179
193
|
requirements:
|
180
|
-
- -
|
194
|
+
- - ">="
|
181
195
|
- !ruby/object:Gem::Version
|
182
196
|
version: '0'
|
183
197
|
description: Synapse is a daemon used to dynamically configure and manage local instances
|
@@ -193,10 +207,10 @@ executables:
|
|
193
207
|
extensions: []
|
194
208
|
extra_rdoc_files: []
|
195
209
|
files:
|
196
|
-
- .gitignore
|
197
|
-
- .mailmap
|
198
|
-
- .rspec
|
199
|
-
- .travis.yml
|
210
|
+
- ".gitignore"
|
211
|
+
- ".mailmap"
|
212
|
+
- ".rspec"
|
213
|
+
- ".travis.yml"
|
200
214
|
- Gemfile
|
201
215
|
- Gemfile.lock
|
202
216
|
- LICENSE.txt
|
@@ -226,11 +240,14 @@ files:
|
|
226
240
|
- lib/synapse/service_watcher/marathon.rb
|
227
241
|
- lib/synapse/service_watcher/zookeeper.rb
|
228
242
|
- lib/synapse/service_watcher/zookeeper_dns.rb
|
243
|
+
- lib/synapse/statsd.rb
|
229
244
|
- lib/synapse/version.rb
|
245
|
+
- spec/bin/synapse_spec.rb
|
230
246
|
- spec/factories/backend.rb
|
231
247
|
- spec/lib/synapse/file_output_spec.rb
|
232
248
|
- spec/lib/synapse/haproxy_spec.rb
|
233
249
|
- spec/lib/synapse/service_watcher_base_spec.rb
|
250
|
+
- spec/lib/synapse/service_watcher_dns_spec.rb
|
234
251
|
- spec/lib/synapse/service_watcher_docker_spec.rb
|
235
252
|
- spec/lib/synapse/service_watcher_ec2tags_spec.rb
|
236
253
|
- spec/lib/synapse/service_watcher_marathon_spec.rb
|
@@ -249,25 +266,27 @@ require_paths:
|
|
249
266
|
- lib
|
250
267
|
required_ruby_version: !ruby/object:Gem::Requirement
|
251
268
|
requirements:
|
252
|
-
- -
|
269
|
+
- - ">="
|
253
270
|
- !ruby/object:Gem::Version
|
254
271
|
version: '0'
|
255
272
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
256
273
|
requirements:
|
257
|
-
- -
|
274
|
+
- - ">="
|
258
275
|
- !ruby/object:Gem::Version
|
259
276
|
version: '0'
|
260
277
|
requirements: []
|
261
278
|
rubyforge_project:
|
262
|
-
rubygems_version: 2.5.
|
279
|
+
rubygems_version: 2.5.2.3
|
263
280
|
signing_key:
|
264
281
|
specification_version: 4
|
265
282
|
summary: Dynamic HAProxy configuration daemon
|
266
283
|
test_files:
|
284
|
+
- spec/bin/synapse_spec.rb
|
267
285
|
- spec/factories/backend.rb
|
268
286
|
- spec/lib/synapse/file_output_spec.rb
|
269
287
|
- spec/lib/synapse/haproxy_spec.rb
|
270
288
|
- spec/lib/synapse/service_watcher_base_spec.rb
|
289
|
+
- spec/lib/synapse/service_watcher_dns_spec.rb
|
271
290
|
- spec/lib/synapse/service_watcher_docker_spec.rb
|
272
291
|
- spec/lib/synapse/service_watcher_ec2tags_spec.rb
|
273
292
|
- spec/lib/synapse/service_watcher_marathon_spec.rb
|