Orbiter is an opensource docker swarm autoscaler
Go to file
GZ e875318382
Update Dockerfile
optimization
2018-06-02 08:37:36 +02:00
api API refactoring adding versioning 2017-08-08 22:41:45 +02:00
autoscaler Fixed test 2017-08-08 21:16:26 +02:00
cmd Removed multi provider and yml configuration 2017-09-30 13:45:04 +01:00
contrib/swarm Fixed cluster creation script 2017-09-05 16:15:05 +02:00
core Removed multi provider and yml configuration 2017-09-30 13:45:04 +01:00
design Add logo files 2017-08-27 13:09:07 +02:00
provider Removed multi provider and yml configuration 2017-09-30 13:45:04 +01:00
ui Add mock api json-server, update dashboard page with functionality to increase/decrease number of replicas and add service info page 2017-09-19 23:31:05 +09:00
utils/hook
vendor updating docker/docker to latest available v17.05.0-ce-rc3 (#41) 2017-08-29 00:08:35 +02:00
.gitignore Build improvement closes #36 2017-08-20 04:46:52 +02:00
.travis.yml Update hub password 2017-09-30 13:28:58 +01:00
Dockerfile Update Dockerfile 2018-06-02 08:37:36 +02:00
Gopkg.lock updating docker/docker to latest available v17.05.0-ce-rc3 (#41) 2017-08-29 00:08:35 +02:00
Gopkg.toml updating docker/docker to latest available v17.05.0-ce-rc3 (#41) 2017-08-29 00:08:35 +02:00
LICENSE Build improvement closes #36 2017-08-20 04:46:52 +02:00
main.go
Makefile Pushed a new version after every commit 2017-09-30 11:42:57 +01:00
README.md Grammar and style 2017-09-30 13:45:50 +01:00

Build
Status

Orbiter is an easy to run autoscaler for Docker Swarm. It is designed to work out of the box.

We designed it in collaboration with InfluxData to show how metrics can be used to create automation around Docker tasks.

orbiter daemon

Orbiter is a daemon that exposes an HTTP API to trigger scaling up or down.

Http API

Orbiter exposes an HTTP JSON api that you can use to trigger scaling UP (true) or DOWN (false).

The concept is very simple, when your monitoring system knows that it's time to scale it can call the outscaler to persist the right action

curl -v -d '{"direction": true}' \
    http://localhost:8000/v1/orbiter/handle/infra_scale/docker

Or if you prefer

curl -v -X POST http://localhost:8000/v1/orbiter/handle/infra_scale/docker/up

You can look at the list of services managed by orbiter:

curl -v -X GET http://localhost:8000/v1/orbiter/autoscaler

Look at the health to know if everything is working:

curl -v -X GET http://localhost:8000/v1/orbiter/health

Autodetect

orbiter daemon

It's going to start in autodetect mode. This modality at the moment only fetches for Docker SwarmMode. It uses the environment variables DOCKER_HOST (and others) to locate a Docker daemon. If it's in SwarmMode, orbiter is going to look at all the services currently running.

If a service is labeled with orbiter=true it's going to auto-register the service and it's going to enable autoscaling.

If a service is labeled with orbiter=true orbiter will auto-register the service providing autoscaling capabilities.

Let's say that you started a service:

docker service create --label orbiter=true --name web -p 80:80 nginx

When you start orbiter, it's going to auto-register an autoscaler called autoswarm/web. By default up and down are set to 1 but you can override them with the label orbiter.up=3 and orbiter.down=2.

This scalability allows you to instantiate orbiter in an extremely easy way in Docker Swarm.

A background job reads the Docker Swarm Event api to keep the services registered in sync.

With docker

docker run -it -v ${PWD}/your.yml:/etc/orbiter.yml -p 8000:8000 gianarb/orbiter daemon

We are supporting an image gianarb/orbiter in hub.docker.com. You can run it with your configuration.

In this example I am using volumes but if you have a Docker Swarm 1.13 up and running you can use secrets.