Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Service export should find the address automatically #1028

Closed
bboreham opened this issue Jun 26, 2015 · 3 comments
Closed

Service export should find the address automatically #1028

bboreham opened this issue Jun 26, 2015 · 3 comments
Assignees
Milestone

Comments

@bboreham
Copy link
Contributor

The service export example shows weave ps being used to find an address; since we should know that address via weaveDNS we should provide a feature to automate that step.

@bboreham
Copy link
Contributor Author

The (undocumented) command weave docker-bridge-ip can be used:

$ weave launch && weave launch-dns && weave launch-proxy
bbc75b5f799b9d79cfa853030bd7f79ce3d274100f9be2717b2c13c510de8ac6
4c331baeac817fb6869ee4e83221cd8a87b406b84937b22d53857e05290d4f2b
c7178da7417964026eda1249c870c7222c02a1ac5c7574bec3e25b949124245a
$ eval $(weave proxy-env)
$ docker run --name=foo -dti ubuntu
3d1b3e567329ea3bc6b5059e9f38e9733f5c441e92a2dfc6b38b3c28eedbe24f
$ dig @$(weave docker-bridge-ip) +short foo.weave.local
10.128.0.2 

@rade
Copy link
Member

rade commented Jun 26, 2015

So the problem with weave ps is that it only works on the host that the container resides on. This in fact leads to awkwardness in the example, as it needs to jump between hosts. The great advantage of weave ps though is that it works even when containers aren't registered in weaveDNS. Though arguably for the 'service export' use case that probably doesn't matter, i.e. it's not unreasonable to expect all services to be registered in DNS.

The problem with dig is that it requires specifying the fully qualified name. #987 would address that.

Plus you need dig.

We could introduce a weave dns-lookup <unqualified-name>.

@rade
Copy link
Member

rade commented Jul 2, 2015

We could introduce a weave dns-lookup <unqualified-name>.

...which we could implement in terms of dig in the script, instead of widening the weavedns http api.

@rade rade modified the milestone: current Jul 2, 2015
@awh awh self-assigned this Jul 14, 2015
rade added a commit that referenced this issue Jul 14, 2015
Implement `weave dns-lookup`

Closes #1028.
@rade rade modified the milestones: current, 1.1.0 Jul 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants