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.
This commit is contained in:
parent
8494a4b66b
commit
5535fc09c6
|
@ -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
|
||||
```
|
||||
|
|
|
@ -14,7 +14,7 @@ module Blimpy
|
|||
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 @@ module Blimpy
|
|||
end
|
||||
|
||||
def initialize(server=nil)
|
||||
@provision_on_start = true
|
||||
@livery = nil
|
||||
@group = nil
|
||||
@name = 'Unnamed Box'
|
||||
|
@ -161,7 +162,6 @@ module Blimpy
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
def with_data(ship_id, data)
|
||||
data.each do |key, value|
|
||||
next if immutable_attributes.include? key.to_sym
|
||||
|
|
|
@ -124,8 +124,10 @@ module Blimpy
|
|||
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!
|
||||
|
|
Loading…
Reference in New Issue