lib/simple_deploy/stack.rb in simple_deploy-0.5.6 vs lib/simple_deploy/stack.rb in simple_deploy-0.6.0
- old
+ new
@@ -1,7 +1,8 @@
require 'stackster'
require 'simple_deploy/stack/deployment'
+require 'simple_deploy/stack/execute'
require 'simple_deploy/stack/stack_attribute_formater'
module SimpleDeploy
class Stack
@@ -41,14 +42,17 @@
false
end
end
def deploy(force = false)
- deployment.create_deployment
deployment.execute force
end
+ def execute(args)
+ executer.execute args
+ end
+
def ssh
deployment.ssh
end
def destroy
@@ -114,9 +118,19 @@
def stack_attribute_formater
@saf ||= StackAttributeFormater.new :config => @config,
:environment => @environment,
:main_attributes => attributes
+ end
+
+ def executer
+ @executer ||= Stack::Execute.new :config => @config,
+ :environment => @environment,
+ :name => @name,
+ :stack => stack,
+ :instances => instances,
+ :ssh_user => ssh_user,
+ :ssh_key => ssh_key
end
def deployment
@deployment ||= Stack::Deployment.new :config => @config,
:environment => @environment,