Git Product home page Git Product logo

vcloud-box-spinner's Introduction

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

vcloud-box-spinner's People

Contributors

annashipman avatar dcarley avatar jgumbley avatar philandstuff avatar rjw1 avatar singhgarima avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vcloud-box-spinner's Issues

License missing from gemspec

RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.

via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can image, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.

There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!

Appendix:

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies

p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.

--setup-script is mandatory, not tested/documented

dancarley:
When running without a -s argument:

D, [2013-08-08T15:40:41.558685 #7634] DEBUG -- : Validating options
D, [2013-08-08T15:40:41.558728 #7634] DEBUG -- : Preparing the run
D, [2013-08-08T15:40:41.558762 #7634] DEBUG -- : Launching servers
D, [2013-08-08T15:40:41.559056 #7634] DEBUG -- : The base 36 timestamp for this run in mr7vft
/Users/dcarley/projects/govuk/vcloud-box-configurator/lib/provisioner/compute_node.rb:10:in `expand_path': can't convert nil into String (TypeError)
        from /Users/dcarley/projects/govuk/vcloud-box-configurator/lib/provisioner/compute_node.rb:10:in `user_data_files'
        from /Users/dcarley/projects/govuk/vcloud-box-configurator/lib/provisioner/compute_node.rb:15:in `user_data'
        from /Users/dcarley/projects/govuk/vcloud-box-configurator/lib/provisioner/compute_node.rb:22:in `provision'
        from /Users/dcarley/projects/govuk/vcloud-box-configurator/lib/provisioner/compute_node.rb:152:in `launch_server'
        from /Users/dcarley/projects/govuk/vcloud-box-configurator/lib/provisioner/provisioner.rb:107:in `block in launch_servers'
        from /Users/dcarley/vendor/bundle/gems/parallel-0.7.1/lib/parallel.rb:339:in `call'
        from /Users/dcarley/vendor/bundle/gems/parallel-0.7.1/lib/parallel.rb:339:in `call_with_index'
        from /Users/dcarley/vendor/bundle/gems/parallel-0.7.1/lib/parallel.rb:182:in `block (3 levels) in work_in_threads'
        from /Users/dcarley/vendor/bundle/gems/parallel-0.7.1/lib/parallel.rb:346:in `with_instrumentation'
        from /Users/dcarley/vendor/bundle/gems/parallel-0.7.1/lib/parallel.rb:180:in `block (2 levels) in work_in_threads'
        from /Users/dcarley/vendor/bundle/gems/parallel-0.7.1/lib/parallel.rb:174:in `loop'
        from /Users/dcarley/vendor/bundle/gems/parallel-0.7.1/lib/parallel.rb:174:in `block in work_in_threads'
        from /Users/dcarley/vendor/bundle/gems/parallel-0.7.1/lib/parallel.rb:65:in `block (2 levels) in in_threads'

It should either be optional or validated.

Original issue (gds/vcloud-box-configurator#3) created at 2013-08-08T14:46:30Z.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.