synapse-aurora 0.11.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/.gitignore +23 -0
  2. data/.mailmap +3 -0
  3. data/.nix/Gemfile.nix +141 -0
  4. data/.nix/rubylibs.nix +42 -0
  5. data/.rspec +2 -0
  6. data/.travis.yml +5 -0
  7. data/Gemfile +4 -0
  8. data/LICENSE.txt +22 -0
  9. data/Makefile +6 -0
  10. data/README.md +339 -0
  11. data/Rakefile +8 -0
  12. data/bin/synapse +62 -0
  13. data/config/hostheader_test.json +71 -0
  14. data/config/svcdir_test.json +46 -0
  15. data/config/synapse.conf.json +90 -0
  16. data/config/synapse_services/service1.json +24 -0
  17. data/config/synapse_services/service2.json +24 -0
  18. data/default.nix +66 -0
  19. data/lib/synapse.rb +85 -0
  20. data/lib/synapse/base.rb +5 -0
  21. data/lib/synapse/haproxy.rb +797 -0
  22. data/lib/synapse/log.rb +24 -0
  23. data/lib/synapse/service_watcher.rb +36 -0
  24. data/lib/synapse/service_watcher/base.rb +109 -0
  25. data/lib/synapse/service_watcher/dns.rb +109 -0
  26. data/lib/synapse/service_watcher/docker.rb +120 -0
  27. data/lib/synapse/service_watcher/ec2tag.rb +133 -0
  28. data/lib/synapse/service_watcher/zookeeper.rb +153 -0
  29. data/lib/synapse/service_watcher/zookeeper_aurora.rb +76 -0
  30. data/lib/synapse/service_watcher/zookeeper_dns.rb +232 -0
  31. data/lib/synapse/version.rb +3 -0
  32. data/spec/lib/synapse/haproxy_spec.rb +32 -0
  33. data/spec/lib/synapse/service_watcher_base_spec.rb +55 -0
  34. data/spec/lib/synapse/service_watcher_docker_spec.rb +152 -0
  35. data/spec/lib/synapse/service_watcher_ec2tags_spec.rb +220 -0
  36. data/spec/spec_helper.rb +22 -0
  37. data/spec/support/configuration.rb +9 -0
  38. data/spec/support/minimum.conf.yaml +27 -0
  39. data/synapse.gemspec +33 -0
  40. metadata +227 -0
@@ -0,0 +1,22 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # Require this file using `require "spec_helper"` to ensure that it is only
4
+ # loaded once.
5
+ #
6
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
+ require "#{File.dirname(__FILE__)}/../lib/synapse"
8
+ require 'pry'
9
+ require 'support/configuration'
10
+
11
+ RSpec.configure do |config|
12
+ config.treat_symbols_as_metadata_keys_with_true_values = true
13
+ config.run_all_when_everything_filtered = true
14
+ config.filter_run :focus
15
+ config.include Configuration
16
+
17
+ # Run specs in random order to surface order dependencies. If you find an
18
+ # order dependency and want to debug it, you can fix the order by providing
19
+ # the seed, which is printed after each run.
20
+ # --seed 1234
21
+ config.order = 'random'
22
+ end
@@ -0,0 +1,9 @@
1
+ require "yaml"
2
+
3
+ module Configuration
4
+
5
+ def config
6
+ @config ||= YAML::load_file(File.join(File.dirname(File.expand_path(__FILE__)), 'minimum.conf.yaml'))
7
+ end
8
+
9
+ end
@@ -0,0 +1,27 @@
1
+ # list the services to connect
2
+ services:
3
+ - name: test
4
+ local_port: 3210
5
+ server_options: test_option
6
+ default_servers:
7
+ - { name: default1, host: localhost, port: 8080}
8
+ discovery:
9
+ method: zookeeper
10
+ path: /airbnb/service/logging/event_collector
11
+ hosts:
12
+ - localhost:2181
13
+ listen:
14
+ - test_option
15
+
16
+
17
+ # settings for haproxy including the global config
18
+ haproxy:
19
+ reload_command: "sudo service haproxy reload"
20
+ config_file_path: "/etc/haproxy/haproxy.cfg"
21
+ do_writes: false
22
+ do_reloads: false
23
+ global:
24
+ - global_test_option
25
+
26
+ defaults:
27
+ - default_test_option
data/synapse.gemspec ADDED
@@ -0,0 +1,33 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'synapse/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = 'synapse-aurora'
8
+ gem.version = Synapse::VERSION
9
+ gem.authors = ['Martin Rhoads']
10
+ gem.email = ['martin.rhoads@airbnb.com']
11
+ gem.summary = 'Fork of Airbnb Synapse with support for Apache Aurora'
12
+ gem.description = <<-EOF
13
+ Synapse is Airbnb's new system for service discovery. Synapse solves the
14
+ problem of automated fail-over in the cloud, where failover via network
15
+ re-configuration is impossible. The end result is the ability to connect
16
+ internal services together in a scalable, fault-tolerant way.
17
+ EOF
18
+ gem.homepage = 'https://github.com/benley/synapse'
19
+ gem.license = 'MIT'
20
+
21
+ gem.files = `git ls-files`.split($RS)
22
+ gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
23
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
24
+
25
+ gem.add_runtime_dependency 'aws-sdk', '~> 1.39'
26
+ gem.add_runtime_dependency 'docker-api', '~> 1.7', '>= 1.7.2'
27
+ gem.add_runtime_dependency 'zk', '~> 1.9', '>= 1.9.4'
28
+
29
+ gem.add_development_dependency 'rake'
30
+ gem.add_development_dependency 'rspec'
31
+ gem.add_development_dependency 'pry'
32
+ gem.add_development_dependency 'pry-nav'
33
+ end
metadata ADDED
@@ -0,0 +1,227 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: synapse-aurora
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.11.2
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Martin Rhoads
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2015-01-04 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: aws-sdk
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '1.39'
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: '1.39'
30
+ - !ruby/object:Gem::Dependency
31
+ name: docker-api
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '1.7'
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: 1.7.2
41
+ type: :runtime
42
+ prerelease: false
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ~>
47
+ - !ruby/object:Gem::Version
48
+ version: '1.7'
49
+ - - ! '>='
50
+ - !ruby/object:Gem::Version
51
+ version: 1.7.2
52
+ - !ruby/object:Gem::Dependency
53
+ name: zk
54
+ requirement: !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ~>
58
+ - !ruby/object:Gem::Version
59
+ version: '1.9'
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: 1.9.4
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ~>
69
+ - !ruby/object:Gem::Version
70
+ version: '1.9'
71
+ - - ! '>='
72
+ - !ruby/object:Gem::Version
73
+ version: 1.9.4
74
+ - !ruby/object:Gem::Dependency
75
+ name: rake
76
+ requirement: !ruby/object:Gem::Requirement
77
+ none: false
78
+ requirements:
79
+ - - ! '>='
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ none: false
86
+ requirements:
87
+ - - ! '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ - !ruby/object:Gem::Dependency
91
+ name: rspec
92
+ requirement: !ruby/object:Gem::Requirement
93
+ none: false
94
+ requirements:
95
+ - - ! '>='
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ type: :development
99
+ prerelease: false
100
+ version_requirements: !ruby/object:Gem::Requirement
101
+ none: false
102
+ requirements:
103
+ - - ! '>='
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ - !ruby/object:Gem::Dependency
107
+ name: pry
108
+ requirement: !ruby/object:Gem::Requirement
109
+ none: false
110
+ requirements:
111
+ - - ! '>='
112
+ - !ruby/object:Gem::Version
113
+ version: '0'
114
+ type: :development
115
+ prerelease: false
116
+ version_requirements: !ruby/object:Gem::Requirement
117
+ none: false
118
+ requirements:
119
+ - - ! '>='
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ - !ruby/object:Gem::Dependency
123
+ name: pry-nav
124
+ requirement: !ruby/object:Gem::Requirement
125
+ none: false
126
+ requirements:
127
+ - - ! '>='
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
130
+ type: :development
131
+ prerelease: false
132
+ version_requirements: !ruby/object:Gem::Requirement
133
+ none: false
134
+ requirements:
135
+ - - ! '>='
136
+ - !ruby/object:Gem::Version
137
+ version: '0'
138
+ description: ! 'Synapse is Airbnb''s new system for service discovery. Synapse solves
139
+ the
140
+
141
+ problem of automated fail-over in the cloud, where failover via network
142
+
143
+ re-configuration is impossible. The end result is the ability to connect
144
+
145
+ internal services together in a scalable, fault-tolerant way.
146
+
147
+ '
148
+ email:
149
+ - martin.rhoads@airbnb.com
150
+ executables:
151
+ - synapse
152
+ extensions: []
153
+ extra_rdoc_files: []
154
+ files:
155
+ - .gitignore
156
+ - .mailmap
157
+ - .nix/Gemfile.nix
158
+ - .nix/rubylibs.nix
159
+ - .rspec
160
+ - .travis.yml
161
+ - Gemfile
162
+ - Gemfile.lock
163
+ - LICENSE.txt
164
+ - Makefile
165
+ - README.md
166
+ - Rakefile
167
+ - bin/synapse
168
+ - config/hostheader_test.json
169
+ - config/svcdir_test.json
170
+ - config/synapse.conf.json
171
+ - config/synapse_services/service1.json
172
+ - config/synapse_services/service2.json
173
+ - default.nix
174
+ - lib/synapse.rb
175
+ - lib/synapse/base.rb
176
+ - lib/synapse/haproxy.rb
177
+ - lib/synapse/log.rb
178
+ - lib/synapse/service_watcher.rb
179
+ - lib/synapse/service_watcher/base.rb
180
+ - lib/synapse/service_watcher/dns.rb
181
+ - lib/synapse/service_watcher/docker.rb
182
+ - lib/synapse/service_watcher/ec2tag.rb
183
+ - lib/synapse/service_watcher/zookeeper.rb
184
+ - lib/synapse/service_watcher/zookeeper_aurora.rb
185
+ - lib/synapse/service_watcher/zookeeper_dns.rb
186
+ - lib/synapse/version.rb
187
+ - spec/lib/synapse/haproxy_spec.rb
188
+ - spec/lib/synapse/service_watcher_base_spec.rb
189
+ - spec/lib/synapse/service_watcher_docker_spec.rb
190
+ - spec/lib/synapse/service_watcher_ec2tags_spec.rb
191
+ - spec/spec_helper.rb
192
+ - spec/support/configuration.rb
193
+ - spec/support/minimum.conf.yaml
194
+ - synapse.gemspec
195
+ homepage: https://github.com/benley/synapse
196
+ licenses:
197
+ - MIT
198
+ post_install_message:
199
+ rdoc_options: []
200
+ require_paths:
201
+ - lib
202
+ required_ruby_version: !ruby/object:Gem::Requirement
203
+ none: false
204
+ requirements:
205
+ - - ! '>='
206
+ - !ruby/object:Gem::Version
207
+ version: '0'
208
+ required_rubygems_version: !ruby/object:Gem::Requirement
209
+ none: false
210
+ requirements:
211
+ - - ! '>='
212
+ - !ruby/object:Gem::Version
213
+ version: '0'
214
+ requirements: []
215
+ rubyforge_project:
216
+ rubygems_version: 1.8.23
217
+ signing_key:
218
+ specification_version: 3
219
+ summary: Fork of Airbnb Synapse with support for Apache Aurora
220
+ test_files:
221
+ - spec/lib/synapse/haproxy_spec.rb
222
+ - spec/lib/synapse/service_watcher_base_spec.rb
223
+ - spec/lib/synapse/service_watcher_docker_spec.rb
224
+ - spec/lib/synapse/service_watcher_ec2tags_spec.rb
225
+ - spec/spec_helper.rb
226
+ - spec/support/configuration.rb
227
+ - spec/support/minimum.conf.yaml