A simple cloud (cluster of docker containers) management tool written in python. It provides, manual scaling, auto scaling and fault-tolerance.
- make sure you create a python3 virtualenv and activate it
- do pip install -r requirements
- run python SimpleCluster/Manager.py
- make sure you have a local etcd server running on port 2379, if its running on a different port, set it in the SimpleCluster/StateStorage.py file
- help, will list all the commands available
- ps, will list all of the apps that are running
- start , will start a new app
- list , will list the containers for that app
- stop , will stop the app
- scaleup , will scale the app to the specified number
- scaledown , will scale down the app to the specified number
- start-autoscaling will start autoscaling
- stop-autoscaling will stop autoscaling
- if anything goes wrong there is a "clean-slate" command that will remove everything
We have two parallel threads running apart from the main one
- auto-scaling thread, that is started or stop with the autoscaling command
- house-cleaning thread, this is started as soon as the manager starts. This monitors the number of workers that should be running for a particular application. This threa is responsible for respawning dead workers. The check is made every 10 secs.