https://github.com/danielwhatmuff/vcloud-director-shutdown
Script to shutdown vApps when not in use e.g. evenings/weekends
https://github.com/danielwhatmuff/vcloud-director-shutdown
Last synced: about 1 year ago
JSON representation
Script to shutdown vApps when not in use e.g. evenings/weekends
- Host: GitHub
- URL: https://github.com/danielwhatmuff/vcloud-director-shutdown
- Owner: danielwhatmuff
- License: gpl-2.0
- Created: 2014-10-22T12:44:18.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-11-25T11:40:41.000Z (over 11 years ago)
- Last Synced: 2025-02-02T07:12:56.850Z (over 1 year ago)
- Language: Ruby
- Size: 181 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
vcloud-director-shutdown
=================
Simple Ruby script to shutdown/startup a collection of vApps when not in use e.g. during evenings/weekends
Requirements
-----------
Requires Ruby and the fog Ruby gem.
*gem install fog*
Installation
-----------
1. Copy the script to somewhere sensible e.g. /usr/local/bin onto a server or machine which has access to your vcloud director API.
2. Configure your vcloud director api credentials
vcloud_director_username='abc@abc'
vcloud_director_password='password'
vcloud_director_host='api.vcd.example.com'
3. Configure the vApps you wish to power off/on with the script, and specify the org and vdc they are contained in.
selected_org = "org1"
selected_vdc = "vdc1"
selected_vapps_to_shutdown = ['vapp1', 'vapp2', 'vapp3', 'vapp4']
Usage
-----------
power off the vApps
ruby vcloud-director-shutdown.rb *off*
power on the vApps
ruby vcloud-director-shutdown.rb *on*