Created
November 27, 2018 20:47
-
-
Save nicosingh/f67172bd618a58d6a9eb266e242fc13e to your computer and use it in GitHub Desktop.
Docker swarm autoscaling using Orbiter PoC
This file contains hidden or 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
version: "3.4" | |
services: | |
web: | |
image: nginx | |
ports: | |
- 80:80 | |
deploy: | |
labels: | |
- "orbiter=true" | |
orbiter: | |
image: gianarb/orbiter | |
command: /bin/orbiter daemon --debug | |
ports: | |
- 8000:8000 | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
deploy: | |
placement: | |
constraints: | |
- node.role == manager | |
mode: replicated | |
replicas: 1 | |
# to start stack: | |
# docker stack deploy -c docker-compose.yml tranque | |
# to scale up: | |
# curl -X POST http://localhost:8000/v1/orbiter/handle/autoswarm/tranque_web/up | |
# to scale down: | |
# curl -X POST http://localhost:8000/v1/orbiter/handle/autoswarm/tranque_web/down |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment