Sha256: 47e11d3dfbce3bc8964d94392e4b3f15bc0dc28a5befbd2987fd01c31546e827

Contents?: true

Size: 982 Bytes

Versions: 20

Compression:

Stored size: 982 Bytes

Contents

#!/usr/bin/env ruby
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
require "poolparty"
require "poolparty/installer"

require 'git-style-binary/command'

GitStyleBinary.command do
  banner <<-EOS
Usage: #{$0} #{all_options_string}

  Sets up a basic clouds.rb file and carries through the steps to bootstrap a new cloud
EOS

  short_desc "Setup a new clouds.rb file"
  
  providers = {}
  PoolParty::Installer.all.each_with_index do |installer,idx|
    providers.merge!(idx+1 => installer)
  end
  
  str = ["The cloud_provider you'd like to set your clouds.rb for. The available clouds include:"]
  PoolParty::Installer.all.each do |provider|
    str << "\t\t\t\t\t\t\t\t#{provider.name} - #{provider.description}"
  end
  opt :type, str.join("\n"), :type => :string, :default => "ec2"

  run do |command|
    
    klass = PoolParty::Installer.find_by_name(command[:type])
    puts "Great, we'll be using #{klass}"
    inst = klass.send :new
    inst.run
    
  end
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
auser-poolparty-1.3.10 bin/cloud-setup
auser-poolparty-1.3.11 bin/cloud-setup
auser-poolparty-1.3.12 bin/cloud-setup
auser-poolparty-1.3.13 bin/cloud-setup
auser-poolparty-1.3.14 bin/cloud-setup
auser-poolparty-1.3.15 bin/cloud-setup
auser-poolparty-1.3.16 bin/cloud-setup
auser-poolparty-1.3.17 bin/cloud-setup
auser-poolparty-1.3.5 bin/poolparty-setup
auser-poolparty-1.3.6 bin/cloud-setup
auser-poolparty-1.3.7 bin/cloud-setup
auser-poolparty-1.3.8 bin/cloud-setup
fairchild-poolparty-1.3.17 bin/cloud-setup
fairchild-poolparty-1.3.5 bin/cloud-setup
poolparty-1.3.15 bin/cloud-setup
poolparty-1.3.14 bin/cloud-setup
poolparty-1.3.13 bin/cloud-setup
poolparty-1.3.8 bin/cloud-setup
poolparty-1.3.7 bin/cloud-setup
poolparty-1.3.6 bin/cloud-setup