Skip to content

antriver/cloud-scaler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CloudScaler

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.

Example

Scale up by adding a web server

Before

After

And back down

Installation

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

Commands

console listhosts [<service>] [--load]

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).

console listservices

List all the services defined in the config file.

console scaleup <service>

Launch an additional virtual server at the hosting provider and add DNS entries for it at the DNS provider.

console scaledown <service>

Delete the newesst virtual server at the hosting provider and remove DNS entries for it from the DNS provider.

About

Super simple infrastructure scaling from the command line.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages