This is a CLI tool which invokes ruby_vcloud_sdk
and bosh_vcloud_cpi
directly, for debugging and testing.
It depends on how you want to use:
-
You already installed
ruby_vcloud_sdk
andbosh_vcloud_cpi
throughgem install ...
Then, you don't need special operations, just do
bundle install
and you can invokebin/vcd-cli ...
-
You are modifying
ruby_vcloud_sdk
orbosh_vcloud_cpi
, and you hate building and installing gem very timeThe dynamic loading feature will help you a lot. Set two envionrment variables:
- SDK_PATH: pointing to
ruby_vcloud_sdk
folder; - CPI_PATH: pointing to
bosh_vcloud_cpi
folder; - BOSH_PATH: pointing to bosh source tree, required by cpi.
Then do
bundle install
once, from now on, keep the above environment variables, you can dobin/vcd-cli ...
- SDK_PATH: pointing to
Refer to internal design doc. Will be updated here later.
Here's a simple example:
- Clone source code
git clone https://github.com/vchs/bosh -b vcloud_cpi_changes
git clone https://github.com/vchs/vcd-cpi-cli
- Setup environment variables and do bundle install
export BOSH_PATH=`pwd`/bosh
export SDK_PATH=$BOSH_PATH/ruby_vcloud_sdk
export CPI_PATH=$BOSH_PATH/bosh_vcloud_cpi
cd vcd-cpi-cli
bundle install
- Create a configuration file
cp sample-config.yml _my_config.yml
# update _my_config.yml with your vCloud settings
bin/vcd-cli target ./_my_config.yml
- Start working with cli
bin/vcd-cli cpi create-stemcell ~/Downloads/vsphere-stemcell-0.8.1.tar.gz