Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable ServiceAddress to be set #18

Merged
merged 1 commit into from
May 3, 2018

Conversation

sovaa
Copy link

@sovaa sovaa commented May 3, 2018

Supporting setting --address=hostname for python-consul to register a service address that consul reports as ServiceAddress:

$ ianitor --help  | grep address
               [--address hostname] [--port PORT] [-v]
  --consul-agent=hostname[:port]  set consul agent address
  --address=hostname              set service address (if different than agent
                                  address)
ianitor --address=10.20.1.15 --consul-agent 10.20.1.124 --tags recs --port 5656 --id recs-mk2 recs -- gunicorn --workers 1 --threads 1 --worker-class eventlet -b 0.0.0.0:5656 app:app

Listing the service:

>>> pprint(c.catalog.service('recs'))
('1675',
 [{'Address': '10.20.1.124',
   'CreateIndex': 1675,
   'Datacenter': 'lab',
   'ID': '36c47aa1-8745-8867-6f4f-6d5b85b0b792',
   'ModifyIndex': 1675,
   'Node': 'maggie-kroesus-1',
   'NodeMeta': {'consul-network-segment': ''},
   'ServiceAddress': '10.20.1.15',
   'ServiceEnableTagOverride': False,
   'ServiceID': 'recs-mk2',
   'ServiceName': 'recs',
   'ServicePort': 5656,
   'ServiceTags': ['recs'],
   'TaggedAddresses': {'lan': '10.20.1.124', 'wan': '10.20.1.124'}}])

@sovaa
Copy link
Author

sovaa commented May 3, 2018

Sorry, didn't notice there already was a PR for this.

@sovaa sovaa closed this May 3, 2018
@swistakm swistakm reopened this May 3, 2018
@swistakm
Copy link
Collaborator

swistakm commented May 3, 2018

I'm reopenning this because because there is something wrong with previous PR's diff (#14)

@swistakm swistakm merged commit ee1795b into ClearcodeHQ:master May 3, 2018
@swistakm
Copy link
Collaborator

swistakm commented May 3, 2018

This feature is now merged and released as 0.1.0

@sovaa sovaa deleted the service-address-argument branch January 31, 2019 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants