commit
d83ed8b752
@ -15,5 +15,6 @@ before_install:
|
||||
- ./build.sh centos_rpm
|
||||
- ./build.sh fedora_rpm
|
||||
|
||||
# tests script
|
||||
script:
|
||||
- ./runtests.sh
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Surok
|
||||
[![Build Status](https://travis-ci.org/Difrex/surok.svg?branch=master)](https://travis-ci.org/Difrex/surok)
|
||||
[![Build Status](https://travis-ci.org/Surkoveds/surok.svg?branch=master)](https://travis-ci.org/Surkoveds/surok)
|
||||
|
||||
Service discovery for Apache Mesos.
|
||||
|
||||
@ -38,7 +38,7 @@ ENTRYPOINT is: ```cd /opt/surok && pytho3 surok.py -c /etc/surok/conf/surok.json
|
||||
|
||||
## Documentation
|
||||
|
||||
[Wiki](https://github.com/Difrex/surok/wiki)
|
||||
[Wiki](https://github.com/Surkoveds/surok/wiki)
|
||||
|
||||
## Known issues
|
||||
|
||||
|
@ -1,22 +1,26 @@
|
||||
{
|
||||
"marathon": {
|
||||
"force": true,
|
||||
"host": "http://marathon.mesos:8080",
|
||||
"enabled": false
|
||||
},
|
||||
"force": true,
|
||||
"host": "http://marathon.mesos:8080",
|
||||
"enabled": false
|
||||
},
|
||||
"consul": {
|
||||
"enabled": false,
|
||||
"domain": "service.dc1.consul"
|
||||
},
|
||||
"confd": "/etc/surok/conf.d",
|
||||
"domain": "marathon.mesos",
|
||||
"wait_time": 20,
|
||||
"lock_dir": "/var/tmp",
|
||||
"loglevel": "info",
|
||||
"container": false,
|
||||
"memcached": {
|
||||
"enabled": false,
|
||||
"discovery": {
|
||||
"enabled": false,
|
||||
"service": "memcached",
|
||||
"group": "system"
|
||||
},
|
||||
"hosts": ["localhost:11211"]
|
||||
}
|
||||
"container": false,
|
||||
"memcached": {
|
||||
"enabled": false,
|
||||
"discovery": {
|
||||
"enabled": false,
|
||||
"service": "memcached",
|
||||
"group": "system"
|
||||
},
|
||||
"hosts": ["localhost:11211"]
|
||||
}
|
||||
}
|
||||
|
3
debian/docs
vendored
3
debian/docs
vendored
@ -1,3 +1,4 @@
|
||||
README.md
|
||||
doc/ru/*
|
||||
docs/*md
|
||||
LICENSE
|
||||
AUTHORS
|
||||
|
@ -12,7 +12,7 @@ def resolve(app, conf):
|
||||
services = app['services']
|
||||
domain = conf['domain']
|
||||
|
||||
for service in services:
|
||||
for service in services:
|
||||
hosts[service['name']] = []
|
||||
|
||||
group = get_group(service, app)
|
||||
@ -45,6 +45,13 @@ def resolve(app, conf):
|
||||
# }
|
||||
# ]
|
||||
fqdn = ''
|
||||
|
||||
# Discovery over Consul DNS
|
||||
if 'consul' in conf and conf['consul']['enabled']:
|
||||
fqdn = '_' + service['name'] + '._tcp.' + conf['consul']['domain']
|
||||
hosts[service['name']].append(do_query(fqdn, conf['loglevel']))
|
||||
continue
|
||||
|
||||
if ports is not None:
|
||||
for port_name in ports:
|
||||
fqdn = '_' + port_name + '.' + '_' + service['name'] + '.' + group + '._tcp.' + domain # Need support for udp ports. See #16
|
||||
|
Loading…
Reference in New Issue
Block a user