Skip to content

Add service alias support#1263

Merged
mavenugo merged 1 commit intomoby:masterfrom
mrjana:lb
Jun 15, 2016
Merged

Add service alias support#1263
mavenugo merged 1 commit intomoby:masterfrom
mrjana:lb

Conversation

@mrjana
Copy link
Contributor

@mrjana mrjana commented Jun 15, 2016

Signed-off-by: Jana Radhakrishnan [email protected]

Signed-off-by: Jana Radhakrishnan <[email protected]>
@mavenugo
Copy link
Contributor

@mrjana ... works great

For Service in VIP mode and Alias s32 :

$ sudo DOCKER_HOST=tcp://172.17.0.1:1235 ./bundles/latest/binary-client/docker exec -it 03a5962e7bca sh
/ # nslookup s32
Server:    (null)
Address 1: ::1 localhost
Address 2: 127.0.0.1 localhost

Name:      s32
Address 1: 10.0.0.2

For Service in dnsrr mode

$ sudo DOCKER_HOST=tcp://172.17.0.1:1234 ./bundles/latest/binary-client/docker service create --name simpleweb1 --endpoint-mode dnsrr --network-alias=s1 --replicas 3 --network foo mrjana/simpleweb simpleweb
/ # nslookup s1
Server:    (null)
Address 1: ::1 localhost
Address 2: 127.0.0.1 localhost

Name:      s1
Address 1: 10.0.0.12 simpleweb1.3.1vf11diinbjwxd76kmdw3093k.foo
Address 2: 10.0.0.11 simpleweb1.2.0yvzecrj3ocsagig3ca41a2ra.foo
Address 3: 10.0.0.10 simpleweb1.1.cez58dog9p1elrr02zw84vs2t.foo
/ # nslookup simpleweb1
Server:    (null)
Address 1: ::1 localhost
Address 2: 127.0.0.1 localhost

Name:      simpleweb1
Address 1: 10.0.0.12 simpleweb1.3.1vf11diinbjwxd76kmdw3093k.foo
Address 2: 10.0.0.10 simpleweb1.1.cez58dog9p1elrr02zw84vs2t.foo
Address 3: 10.0.0.11 simpleweb1.2.0yvzecrj3ocsagig3ca41a2ra.foo

@mavenugo
Copy link
Contributor

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants