Batch manage nodes from hourly billing vps provider for Fabric.
You can use it for other tools(eg. salt-ssh) too, you may need to edit the format.
Supports: DigitalOcean Vultr.
Capable of: list, create, delete, reboot, rebuild, shutdown, boot, list sshkeys.
Output fomart:
'[email protected]', # node-1 active 512mb nyc1
'[email protected]', # node-2 active 512mb nyc2
'[email protected]', # node-3 active 512mb nyc3
'[email protected]', # node-4 active 512mb sfo1
'[email protected]', # node-5 active 512mb sgp1
'[email protected]', # node-6 active 512mb nyc1
'[email protected]', # node-7 active 512mb nyc2
Paste those in your fabfile.py.
If you don't want to play with scala, just run the the jar file with java:
java -jar fab-nodes-assembly-0.1.jar -m list -v vultr
Generate a token/key from you provider's control panel and export them before you start.
export DO_TOKEN=<your DO TOKEN> # DO for DigitalOcean, VT for Vultr, set the one you are using.
export VT_KEY=<your VT KEY>
fab-nodes 0.1
Usage: fab-nodes [options]
-f | --hasFilter
filter list result
-s | --start
start is low No.(included)
-e | --end
end is the high No. (included)
-p | --prefix
prefix like yorg/testing
-m | --mode
list create delete reboot rebuild shutdown boot sshkeys
-v | --provider
digitalocean vultr
--help
prints this usage text
If you need create new nodes, sshkey ID is needed(add a SSH Key to control panel first).
export DO_SSHKEYID=<the DO sshkey ID form '-m sshkeys -v digitalocean'>
export VT_SSHKEYID=<the VT sshkey ID form '-m sshkeys -v vultr'>