The auto-scaling app uses monitoring data to decide when to scale a service up/down.
It is treated as an application rather than yet another service because it offers only a GUI front-end; it is not modelled as a service that other services can build upon.
#How to
Before running the application, install the following packages
sudo apt-get update sudo apt-get install python-pip python-dev build-essential sudo pip install --upgrade pip sudo pip install --upgrade virtualenv sudo apt-get install msgpack-python sudo pip install Flask sudo pip install kafka-python sudo pip install oslo.utils sudo pip install Babel (if required)
Ensure that XOS REST IP address is accessible from where this application is installed and then run:
python xos_auto_scaling_app.py --xos-ip=<xos-ip> --kafka-ip=<monitoringservice-kafka-ip> --supported-services=<comma seperated service names>
This command will start the autoscaling application and start REST server on 9991 port.
NOTE: If no services are provided as --supported-services argument, then this application will not perform aut-scaling for any XOS services
- name: cpu_source interval: 600 meters: - "cpu" sinks: - cpu_sink
To:
- name: cpu_source interval: 60 meters: - "cpu" sinks: - cpu_sink
To run this sample you need to have nodejs >= 4.0
installed on your local system. You can get it here
xos-apps/auto-scale/gui/env/default
and change it to:module.exports = { host: 'http://<your.cord.installation.ip>:9991' }
xos-apps/auto-scale/gui
run npm start