speculator

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

README

Speculator


Speculator is an automated scaling service for AWS EC2 AutoScale Groups based on Kubernetes Pod CPU/Memory Request Percentages of the cluster.

Default Ideal range is lower than typical solutions (40%-57%) because of the way Deis deploys on my cluster. Range is modifyable via environment variables.

Building

I still build and deploy this in deis (aka: git push) but basic binary should be buildable with a go build -o speculator *.go

Running

Currently, its built to look at the Kubernetes internal API and will need a service account. I'm not using RBAC at the moment because of Deis as well.

It needs a few environment variables in order to run.

ASGROUPNAME     - AWS AutoScaler Group Name 
AWSREGION       - AWS Region (default: us-east-1)
ENABLED         - TRUE|FALSE Enable scaling to take place (default: False) 
DISABLECOOLDOWN - TRUE|FALSE - Disable AWS ASG Cooldown timeout period 
CPUWATERMARK    - CPU Requests Watermark Percentage, When to scale down (default:"40")
CPUTHRESHOLD    - CPU Threshold Percentage, When to scale up (default:"56")
AWS_ACCESS_KEY  - AWS KEY with permissions to ASG 
AWS_SECRET_ACCESS_KEY - AWS KEY with permissions to ASG 

Prometheus metrics are exported (default port 5000 /metrics). Metrics are prefixed with speculator

Documentation

Thorough documentation is on the wiki.

Example Prometheus Graph

alt text

Contributing

Check out CONTRIBUTING.md for notes on making contributions.

License

This library is licensed under the Apache 2.0 License.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL