Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
chmod +x scripts/dm-swarm-04.sh
./scripts/dm-swarm-04.sh
eval $(docker-machine env swarm-1)
open "http://$(docker-machine ip swarm-1)/monitor"
docker stack deploy \
-c stacks/exporters.yml \
exporter
open "http://$(docker-machine ip swarm-1)/monitor/config"
open "http://$(docker-machine ip swarm-1)/monitor/targets"
docker service create \
--name util \
--network monitor \
--mode global \
alpine sleep 100000000
ID=$(docker container ls -q \
-f "label=com.docker.swarm.service.name=util")
docker container exec -it $ID \
apk add --update curl
docker container exec -it $ID \
curl node-exporter:9100/metrics
docker container exec -it $ID \
curl cadvisor:8080/metrics
docker stack deploy \
-c stacks/go-demo.yml \
go-demo
open "http://$(docker-machine ip swarm-1)/monitor/graph"
for ((n=0;n<200;n++)); do
curl "http://$(docker-machine ip swarm-1)/demo/hello"
done
docker stack ls
open "http://$(docker-machine ip swarm-1)/monitor/graph"
docker stack deploy \
-c stacks/exporters-mem.yml \
exporter
docker stack deploy \
-c stacks/go-demo-mem.yml \
go-demo
DOMAIN=$(docker-machine ip swarm-1) \
docker stack deploy \
-c stacks/docker-flow-monitor-mem.yml \
monitor
docker stack deploy \
-c stacks/docker-flow-proxy-mem.yml \
proxy
docker-machine rm -f swarm-1 swarm-2 swarm-3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.