Class: EbDeployer::Environment
- Inherits:
-
Object
- Object
- EbDeployer::Environment
- Defined in:
- lib/eb_deployer/environment.rb
Instance Method Summary collapse
- #cname_prefix ⇒ Object
- #deploy(version_label, strategy_name) ⇒ Object
-
#initialize(app, name, resource_stacks, settings, creation_opts, bs_driver) ⇒ Environment
constructor
A new instance of Environment.
- #new_eb_env(suffix = nil, cname_prefix_overriding = nil) ⇒ Object
Constructor Details
#initialize(app, name, resource_stacks, settings, creation_opts, bs_driver) ⇒ Environment
Returns a new instance of Environment.
4 5 6 7 8 9 10 11 |
# File 'lib/eb_deployer/environment.rb', line 4 def initialize(app, name, resource_stacks, settings, creation_opts, bs_driver) @app = app @name = name @resource_stacks = resource_stacks @settings = settings @creation_opts = creation_opts @bs_driver = bs_driver end |
Instance Method Details
#cname_prefix ⇒ Object
13 14 15 |
# File 'lib/eb_deployer/environment.rb', line 13 def cname_prefix @creation_opts[:cname_prefix] || default_cname_prefix end |
#deploy(version_label, strategy_name) ⇒ Object
17 18 19 20 21 |
# File 'lib/eb_deployer/environment.rb', line 17 def deploy(version_label, strategy_name) strategy = create_strategy(strategy_name) strategy.deploy(version_label, @settings + @resource_stacks.provision(resource_stack_name)) end |
#new_eb_env(suffix = nil, cname_prefix_overriding = nil) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/eb_deployer/environment.rb', line 23 def new_eb_env(suffix=nil, cname_prefix_overriding=nil) EbEnvironment.new(@app.name, [@name, suffix].compact.join('-'), @bs_driver, @creation_opts.merge(:cname_prefix => cname_prefix_overriding || cname_prefix)) end |