Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Intro .provision_on_start flag for ships

Allows control over when the livery provisioning happens for
ships. This was needed because sometimes we don't want to
provision (Puppet) until all ships are up and we know their
hostnames in AWS, etc.
  • Loading branch information...
commit 5535fc09c6fd1486d3a3b0e37335b0fe177c2745 1 parent 8494a4b
@jblaine jblaine authored
Showing with 7 additions and 4 deletions.
  1. +1 −0  README.md
  2. +2 −2 lib/blimpy/box.rb
  3. +4 −2 lib/blimpy/fleet.rb
View
1  README.md
@@ -49,6 +49,7 @@ Here's an example Blimpfile:
ship.username = 'ubuntu' # [Optional] SSH username, defaults to "ubuntu" for AWS machines
ship.flavor = 'm1.small' # [Optional] defaults to t1.micro
ship.tags = {:mytag => 'somevalue'} # [Optional]
+ ship.provision_on_start = false # [Optional] defaults to true
end
end
```
View
4 lib/blimpy/box.rb
@@ -14,7 +14,7 @@ class Box
attr_accessor :image_id, :flavor, :group, :ports
attr_accessor :dns, :internal_dns
attr_accessor :name, :tags, :fleet_id, :username, :ssh_port, :livery
-
+ attr_accessor :provision_on_start
def self.from_instance_id(an_id, data)
return if data[:type].nil?
@@ -33,6 +33,7 @@ def self.from_instance_id(an_id, data)
end
def initialize(server=nil)
+ @provision_on_start = true
@livery = nil
@group = nil
@name = 'Unnamed Box'
@@ -161,7 +162,6 @@ def wait_for_state(until_state, &block)
end
end
-
def with_data(ship_id, data)
data.each do |key, value|
next if immutable_attributes.include? key.to_sym
View
6 lib/blimpy/fleet.rb
@@ -124,8 +124,10 @@ def start
print "\n"
puts ">> #{host.name} online at: #{host.dns}"
host.online!
- host.bootstrap
- puts
+ if host.provision_on_start
+ host.bootstrap
+ puts
+ end
end
save!
Please sign in to comment.
Something went wrong with that request. Please try again.