Sha256: 9f3895468246a05dab5365517eb759b966a76a0ab81e3c9e2b237f53e95c2b30

Contents?: true

Size: 893 Bytes

Versions: 8

Compression:

Stored size: 893 Bytes

Contents

#!/usr/bin/env ruby

require 'rubygems'
require 'rubigen'

# First, let's generate the spec
if %w(-v --version).include? ARGV.first
  require 'poolspec/version'
  puts "#{File.basename($0)} #{Poolspec::VERSION::STRING}"
  exit(0)
end

name = ARGV.first

vputs "Creating pool named #{name}"

require 'rubigen/scripts/generate'
source = RubiGen::PathSource.new(:application, 
  File.join(File.dirname(__FILE__), "../generators"))
RubiGen::Base.reset_sources
RubiGen::Base.append_sources source
RubiGen::Scripts::Generate.new.run(*ARGV, :generator => 'poolspec')

# Now add the keypairs for the pool based on the default pool name and cloud name

@pool = load_pool(self.spec || Binary.get_existing_spec_location)
@clouds = [@pool.cloud("#{name}_app")]

@clouds.each do |cloud|  
  with_cloud(cloud) do
    vputs header("Creating keypair for #{name}")
    create_keypair unless testing
  end  
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
auser-poolparty-0.2.58 bin/pool-init
auser-poolparty-0.2.59 bin/pool-init
auser-poolparty-0.2.60 bin/pool-init
auser-poolparty-0.2.61 bin/pool-init
auser-poolparty-0.2.62 bin/pool-init
auser-poolparty-0.2.63 bin/pool-init
auser-poolparty-0.2.64 bin/pool-init
auser-poolparty-0.2.65 bin/pool-init