Class: Opsicle::ChefUpdate
- Inherits:
-
Object
- Object
- Opsicle::ChefUpdate
- Defined in:
- lib/opsicle/commands/chef_update.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#stack ⇒ Object
readonly
Returns the value of attribute stack.
-
#tar_file ⇒ Object
readonly
Returns the value of attribute tar_file.
Instance Method Summary collapse
- #execute(options = { monitor: true }) ⇒ Object
-
#initialize(environment) ⇒ ChefUpdate
constructor
A new instance of ChefUpdate.
Constructor Details
#initialize(environment) ⇒ ChefUpdate
Returns a new instance of ChefUpdate.
11 12 13 14 15 16 |
# File 'lib/opsicle/commands/chef_update.rb', line 11 def initialize(environment) @environment = environment @client = Client.new(environment) @stack = Stack.new(@client) @tar_file = "#{@stack.name}.tgz" end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
7 8 9 |
# File 'lib/opsicle/commands/chef_update.rb', line 7 def client @client end |
#stack ⇒ Object (readonly)
Returns the value of attribute stack.
9 10 11 |
# File 'lib/opsicle/commands/chef_update.rb', line 9 def stack @stack end |
#tar_file ⇒ Object (readonly)
Returns the value of attribute tar_file.
8 9 10 |
# File 'lib/opsicle/commands/chef_update.rb', line 8 def tar_file @tar_file end |
Instance Method Details
#execute(options = { monitor: true }) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/opsicle/commands/chef_update.rb', line 18 def execute(={ monitor: true }) tar_cookbooks([:path]) s3_upload([:"bucket-name"]) cleanup_tar update_custom_cookbooks launch_stack_monitor() end |