This repository has been archived by the owner. It is now read-only.
No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
docs
lib
spec
.gitignore
CHANGELOG
Gemfile
LICENSE
README.md
Rakefile
jenkins.sh
vcloud-box-spinner.gemspec

README.md

This project is no longer under active development. We had a number of issues with it, in particular with using the Fog vCloud client rather than the vCloud Director client, such as timing out when provisioning vApps.

Please take a look at our new vCloud provisioning project: vCloud Tools.

vCloud Box Spinner

This is a wrapper around the vCloud director API that should allow for easy provisioning of VMs.

Installation

gem install vcloud-box-spinner

Usage

You should be able to do vcloud-box-spinner --help

Usage: vcloud-box-spinner [options] <org_config> <machine_config>

Provision a machine described by the JSON template `machine_config` in the vCloud organisation
described in the JSON config file `org_config`

e.g. vcloud-box-spinner -u username orgs/staging.json machines/frontend-1.json

    -c, --credential=GROUP           fog credential group
    -u, --user=USERNAME              vCloud username
    -p, --password=PASSWORD          vCloud password
    -F, --ssh-config=FILENAME        SSH config file(s) to use (can be specified multiple times)
    -s, --setup-script=SETUP-SCRIPT  path to setup script that should run after machine is brought up
    -d, --debug                      Enable debugging output
    -v, --verbose                    Enable verbose output
    -h, --help                       Show usage instructions

To provision a machine you will need to specify at least two JSON files:

  1. A JSON config file which tells the provisioner about the vCloud organisation into which it is to provision a vApp
  2. A JSON config file which defines the machine-specific setup

Options:

  • user is the username on your "vmware vcloud director" page (usually in the top right corner).

  • setup-script allows you to pass a script file path (shell), which would be loaded as guest customization script. The purpose of providing this option, is to let user do some basic bootstraping. The script is not for the purpose of encouraging configuration management and that should be done separately. A particular example of how you can use the script is - You can set ssh configuration for a user(eg ci), which can ssh in the system later and run the config management script/tool. On how to write this script please refer the following links:

The best way to understand the formats of the json files, read the docs here

Once you have an org and machine config, you can invoke the provisioner as follows:

vcloud-box-spinner -u username -p password org_config.json machine_config.json

Environment Variables

  • FOG_RC specifies the fog credentials file if not ~/.fog.
  • FOG_CREDENTIAL specifies the credential group if not default.

Hacking

refer here

Testing

You can run the tests with:

bundle exec rake