Created
August 20, 2015 02:39
-
-
Save newtonlabs/d34d42b460b1dae57da8 to your computer and use it in GitHub Desktop.
Consul Testing with DNS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DOCKER_IP=$(docker-machine ip canvas) | |
# Consul | |
docker run -p 8400:8400 -p 8500:8500 -p 8600:53/udp -h node1 progrium/consul -server -bootstrap -advertise 10.0.2.15 | |
IP_FROM_CONSOL= # => Have to pull it out of the logs that spam from above command | |
# Registrator | |
docker run -v /var/run/docker.sock:/tmp/docker.sock --name registrator -h registrator --rm gliderlabs/registrator:latest -internal consul://$DOCKER_IP:8500 | |
# Microservices | |
./canvas start | |
# Tester | |
dig @192.168.99.100 -p 8600 welcome.service.consul | |
docker run --dns $IP_FROM_CONSOL --dns 8.8.8.8 --dns-search service.consul --rm --name ping_test -it busybox |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment