The App-AutoScaler provides the capability to adjust the computation resources for Cloud Foundry applications through
- Dynamic scaling based on application performance metrics
- Scheduled scaling based on time
The App-AutoScaler has the following components:
api: provides public APIs to manage scaling policyservicebroker: implements the Cloud Foundry service broker APImetricsgateway: collects and filters loggregator events via loggregator v2 APImetricsserver: transforms loggregator events to app-autoscaler performance metrics ( metricsgateway + metricsserver is a replacement of metricscollector)metricsforwarder: receives and forwards custom metrics to loggreator via v2 ingress APIeventgenerator: aggreates memory metrics, evaluates scaling rules and triggers events for dynamic scalingscheduler: manages the schedules in scaling policy and trigger events for scheduled scalingscalingengine: takes the scaling actions based on dynamic scaling rules or schedules
You can follow the development progress on Pivotal Tracker.
- Java 11 or above
- Docker
- Apache Maven 3
- Cloud Foundry cf command line
- Go 1.15 or above
The App-AutoScaler supports Postgres and MySQL. It uses Postgres as the default backend
data store. These are run up locally with docker images so ensure that docker is working on
your system before running up the tests.
To set up the development, firstly clone this project
$ git clone https://github.com/cloudfoundry/app-autoscaler.gitGenerate scheduler test certs
- Postgres
make init-db- MySQL
make init-db db_type=mysqlcreate the certificates
Note: on macos it will install certstrap automatically but on other OS's it needs to be pre-installed
make test-certsTo be able to run unit tests and integration tests, you'll need to install consul binary.
if uname -a | grep Darwin; then os=darwin; else os=linux; fi
curl -L -o $TMPDIR/consul-0.7.5.zip "https://releases.hashicorp.com/consul/0.7.5/consul_0.7.5_${os}_amd64.zip"
unzip $TMPDIR/consul-0.7.5.zip -d $GOPATH/bin
rm $TMPDIR/consul-0.7.5.zip
- Postgres:
make test- MySQL:
make test db_type=mysqlPostgres
make integrationMySQL:
make test db_type=mysqlmake buildYou can use the make clean to remove:
- database ( postgres or mysql)
- autoscaler build artifacts
Autoscaler uses Golangci and Checkstyle for its code base. Refer to style-guide
Go to app-autoscaler-release project for how to BOSH deploy App-AutoScaler
Refer to user guide for the details of how to use the Auto-Scaler service, including policy definition, supported metrics, public API specification and command line tool.
This project is released under version 2.0 of the Apache License.