Auto Scaling services on Swarm — II

Explanation of the services and triggers

Creating instrumented service

docker stack deploy \
-c stacks/go-demo-instrument-alert-short.yml \
go-demo
docker stack ps -f desired-state=running go-demo

Automatically Scaling Services

docker stack ps -f desired-state=running go-demo
for i in {1..30}; do
DELAY=$[ $RANDOM % 6000 ]
curl “http://$(docker-machine ip swarm-1)/demo/hello?delay=$DELAY”
done
docker-machine rm -f swarm-1 swarm-2 swarm-3

Conclusion

Every company is a software company; even if it’s not in the software business