From eda82827bb20d92a330908fb6065a248c04791e9 Mon Sep 17 00:00:00 2001 From: Gianluca Arbezzano Date: Thu, 23 Feb 2017 20:37:32 +0000 Subject: [PATCH] Add docs about embeddable autoscaling --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index 06abbfc..d9bdb82 100644 --- a/README.md +++ b/README.md @@ -78,3 +78,31 @@ scale it can call the outscaler to persist the right action curl -v -d '{"direction": true}' \ http://localhost:8000/handle/infra_scale/docker ``` + +## Embeddable +This project is trying to provide also an easy API to maintain a lot complexy +and clean code base in order to allow you to use `orbiter` as project for your +applications. +OpenStack, Kubernets all of them have a sort of autoscaling feature that you can +use. The idea is to keep this complexy out of your deployment tools. You can +just implement `orbiter`. +Another use case is a self-deployed application. [Kelsey +Hightower](https://www.youtube.com/watch?v=nhmAyZNlECw) had a talk about this +idea. I am still not sure that can be real in those terms but we are already +moving something in our applications that before was in external system as +monitoring, healthcheck why not the deployment part? + +```go +package scalingallthethings + +import ( + "github.com/gianarb/orbiter/autoscaler" + "github.com/gianarb/orbiter/provider" +) + +func CreateAutoScaler() *autoscaler.Autoscaler{ + p, _ := provider.NewProvider("swarm", map[string]string{}) + a, _ := autoscaler.NewAutoscaler(p, "name-service", 4, 3) + return a +} +```