In the root of repo you can find all charms and scripts to deploy autoscale environment with mesos cluster, telscale-restcomm and set of value-add-services
####Contents:
- monitoring system - src folder
- value-add-services - https://github.com/taddemo2015/vas-demo
- deploy-mesos.sh - deploy mesos cluster to implement autoscale functionality - result here
if you use nginx to expose installed apps you can use update-nginx script from misc folder to add juju_proxy config to nginx instance
sudo ./update-nginx tmpl_mesos.cfg
Repo contains a few apps which are wrapped to different charms with different installation ways
- tads2015-calls-consumer - handles incomming call/sms and add it to datastorage
- tads2015-conference-call - gets new participants from datastorage and adds them to conference
- tads2015-feedback-call - drops conference and makes feedback call
- redis - datastorage
- telscale-restcomm - restcomm server
- monitor-server - managing server of custom simple monitoring system
- monitor-agent-mesos - agent collects state of docker containers. It uses docker remote api to get statistics. This agent should be connected to all nodes of cluster
- monitor-agent-mesos-master - agent collects state of mesos cluster. It uses marathon rest api to get statistics. This agent should be connected to master only.
- tads2015-calls-consumer-4mesos - wrapper for calls-consumer docker container to deploy to mesos cluster
- tads2015-conference-call-4mesos - wrapper for conference-call docker container to deploy to mesos cluster
- tads2015-feedback-call-4mesos - wrapper for feedback-call docker container to deploy to mesos cluster
- telscale-restcomm - telscale restcomm charm with fixes in sql init files
- mesos-master - patched original charm. Now it uses node hostname instead of $JUJU_UNIT_NAME.
- mesos-slave - the same patch
- monitor-server - monitoring system
- monitor-agent-mesos - monitoring system
- monitor-agent-mesos-master - monitoring system
Our monitoring system collects state of each deployed mesos application and stet of mesos cluster. Currently system uses cpu and memory usage only.
Each applicaiton can has a lot of instances. Statistics will be grouped.
It allows to manage:
- count of applicaitons instances
- count of mesos slave machines
We use the foolowing rules:
- if avg cpu usage of application(of all instances) is more than 70% system adds one more instance of this app.
- if avg cpu usage of applicaiton(of all instances) is less than 10% system removes one instance of this app.
- if mesos cluster cpu usage is more than 70% system adds mesos-slave node to environment
- if mesos cluster cpu usage is less than 10% system removes mesos-slave node