Skip to content

Instantly share code, notes, and snippets.

@nstapelbroek
Last active March 15, 2016 08:21
Show Gist options
  • Save nstapelbroek/d624d755d844c383f5ac to your computer and use it in GitHub Desktop.
Save nstapelbroek/d624d755d844c383f5ac to your computer and use it in GitHub Desktop.
Commands used in the Service Discovery blogpost @ https://enrise.com/2016/03/an-introduction-to-service-discovery/
curl -H "Content-type: application/json" 'http://10.200.2.1:8500/v1/catalog/services'
# Or, to get an overview of our specific hello-world service
curl -H "Content-type: application/json" 'http://10.200.2.1:8500/v1/catalog/service/hello-world'
for i in $(seq 5); do docker run -h sdblog_app$i --name sdblog_app$i -P -d tutum/hello-world; done
docker run -d --name=sdblog_consul --net=host gliderlabs/consul-server -bootstrap -advertise=10.200.2.1
docker run -it --name sdblog_nginx -e "CONSUL=10.200.2.1:8500" -e "SERVICE=hello-world" -p 80:80 nstapelbroek/blog-sd-nginx
docker run --name {appname} -h {appname} -P -d tutum/hello-world
docker run -d --name=sdblog_registrator --net=host --volume=/var/run/docker.sock:/tmp/docker.sock gliderlabs/registrator:latest consul://10.200.2.1:8500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment