Class: Opsicle::ChefUpdate
- Inherits:
-
Object
- Object
- Opsicle::ChefUpdate
- Includes:
- DeployHelper
- 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.
Methods included from DeployHelper
#launch_stack_monitor, #open_deploy
Constructor Details
#initialize(environment) ⇒ ChefUpdate
Returns a new instance of ChefUpdate.
13 14 15 16 17 18 |
# File 'lib/opsicle/commands/chef_update.rb', line 13 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.
9 10 11 |
# File 'lib/opsicle/commands/chef_update.rb', line 9 def client @client end |
#stack ⇒ Object (readonly)
Returns the value of attribute stack.
11 12 13 |
# File 'lib/opsicle/commands/chef_update.rb', line 11 def stack @stack end |
#tar_file ⇒ Object (readonly)
Returns the value of attribute tar_file.
10 11 12 |
# File 'lib/opsicle/commands/chef_update.rb', line 10 def tar_file @tar_file end |
Instance Method Details
#execute(options = { monitor: true }) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/opsicle/commands/chef_update.rb', line 20 def execute(={ monitor: true }) if [:"bucket-name"] tar_cookbooks([:path]) s3_upload([:"bucket-name"]) cleanup_tar end response = update_custom_cookbooks launch_stack_monitor(response, ) end |