Sync-Retrieve is tool that allows the user to retrieve all VMs in all physical machines in the platform. It consists in a script that does the retrieve that can be configured easily with crontab to launch it periodically
Installing ruby
# yum install rubyInstalling dependencies
# gem install bundler
# bundle installThe parameters needed to use the script are the following
-
Username and Password from your AbiquoPlatform
-
URL from the API that we want to modify
-
-u --user
- user:password - E.g: admim:admin
-
-s --url
- URL from the API - E.g: https://192.168.54.25/api/admin/datacenters
# ruby vm-retrieve.rb -u admin:admin -s https://192.168.54.25/api/admin/datacentersIf crontab is not installed yet run command
# yum install vixie-cronEnable the package on boot and start
# /sbin/chkconfig crond on
# /etc/init.d/crond startIts necessary to add lines to /etc/crontab file
If we want to retrieve VM each hour:
0 */1 * * * /path-to-script/vm-retrieve.rb parametersIf we want to retrieve VM each 30' :
0,30 * * * * /path-to-script/vm-retrieve.rb parametersThis script is licensed under the Beerware License further details, see the LICENSE file.
For comments and support: albert.navarro[at]abiquo.com