Scale up or down the number of virtual servers for your application with just one command!
Typing console scaleup web
can launch a new server at your cloud hosting provider, with a premade image you created. Then it will add the new server's IP address to you DNS provider for round-robin DNS. Traffic will start flowing to the new server immediately with no configuration required.
Currently works with DigitalOcean servers and CloudFlare for DNS. But it's design to be very easy to add more providers. HAProxy provider anyone?
All configuration is done with one config.php file and then you're ready to go. See the included example.config.php
.
git clone https://github.com/antriver/cloud-scaler.git
cd cloud-scaler
composer install
cp config.example.php config.php
vi config.php # Edit your config file
console list # Show available commands
console listservices # Run a command
List all the virtual servers that exist. Optionally only those for the specified service.
Optionally displays the load average for each host (can be slow with lots of hosts).
List all the services defined in the config file.
Launch an additional virtual server at the hosting provider and add DNS entries for it at the DNS provider.
Delete the newesst virtual server at the hosting provider and remove DNS entries for it from the DNS provider.