Class: SimpleDeploy::Stack
- Inherits:
-
Object
- Object
- SimpleDeploy::Stack
- Defined in:
- lib/simple_deploy/stack.rb
Class Method Summary collapse
Instance Method Summary collapse
- #attributes ⇒ Object
- #create(args) ⇒ Object
- #deploy ⇒ Object
- #destroy ⇒ Object
- #events ⇒ Object
-
#initialize(args) ⇒ Stack
constructor
A new instance of Stack.
- #instances ⇒ Object
- #outputs ⇒ Object
- #resources ⇒ Object
- #status ⇒ Object
- #template ⇒ Object
- #update(args) ⇒ Object
Constructor Details
Class Method Details
.list(args) ⇒ Object
14 15 16 |
# File 'lib/simple_deploy/stack.rb', line 14 def self.list(args) StackLister.new(:config => args[:config]).all end |
Instance Method Details
#attributes ⇒ Object
59 60 61 |
# File 'lib/simple_deploy/stack.rb', line 59 def attributes stack.attributes end |
#create(args) ⇒ Object
18 19 20 21 |
# File 'lib/simple_deploy/stack.rb', line 18 def create(args) stack.create :attributes => args[:attributes], :template => args[:template] end |
#deploy ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/simple_deploy/stack.rb', line 27 def deploy deployment = Deployment.new :config => @config, :environment => @environment, :instances => instances, :attributes => attributes deployment.execute end |
#destroy ⇒ Object
35 36 37 |
# File 'lib/simple_deploy/stack.rb', line 35 def destroy stack.destroy end |
#events ⇒ Object
39 40 41 |
# File 'lib/simple_deploy/stack.rb', line 39 def events stack.events end |
#instances ⇒ Object
51 52 53 |
# File 'lib/simple_deploy/stack.rb', line 51 def instances stack.instances_public_ip_addresses end |
#outputs ⇒ Object
43 44 45 |
# File 'lib/simple_deploy/stack.rb', line 43 def outputs stack.outputs end |
#resources ⇒ Object
47 48 49 |
# File 'lib/simple_deploy/stack.rb', line 47 def resources stack.resources end |
#status ⇒ Object
55 56 57 |
# File 'lib/simple_deploy/stack.rb', line 55 def status stack.status end |
#template ⇒ Object
63 64 65 |
# File 'lib/simple_deploy/stack.rb', line 63 def template JSON.parse stack.template end |
#update(args) ⇒ Object
23 24 25 |
# File 'lib/simple_deploy/stack.rb', line 23 def update(args) stack.update :attributes => args[:attributes] end |