Sha256: 22f33d934734251552482e058ee850e3f815983d2fe5a0582d32e963cd5bf615

Contents?: true

Size: 849 Bytes

Versions: 124

Compression:

Stored size: 849 Bytes

Contents

namespace :rubber do

  desc "Describes all your spot instance requests"
  required_task :describe_spot_instance_requests do
    requests = cloud.describe_spot_instance_requests()
    requests.each do |request|
      logger.info "======================"
      logger.info "ID: #{request[:id]}"
      logger.info "Created at: #{request[:created_at]}"
      logger.info "Max. price: $#{request[:spot_price]}"
      logger.info "State: #{request[:state]}"
      logger.info "Instance type: #{request[:type]}"
      logger.info "AMI: #{request[:image_id]}"
    end
  end

  desc "Cancel the spot instances request for the given id"
  required_task :cancel_spot_instances_request do
    request_id = get_env('SPOT_INSTANCE_REQUEST_ID', 'The id of the spot instances request to cancel', true)
    cloud.destroy_spot_instance_request(request_id)
  end

end

Version data entries

124 entries across 124 versions & 6 rubygems

Version Path
rubber-3.2.2 lib/rubber/recipes/rubber/spot_requests.rb
rubber-3.2.1 lib/rubber/recipes/rubber/spot_requests.rb
rubber-3.2.0 lib/rubber/recipes/rubber/spot_requests.rb
rubber-3.1.0 lib/rubber/recipes/rubber/spot_requests.rb
rubber-3.0.1 lib/rubber/recipes/rubber/spot_requests.rb
rubber-3.0.0 lib/rubber/recipes/rubber/spot_requests.rb
rubber-2.16.0 lib/rubber/recipes/rubber/spot_requests.rb
rubber-2.15.2 lib/rubber/recipes/rubber/spot_requests.rb
rubber-2.15.1 lib/rubber/recipes/rubber/spot_requests.rb
rubber-2.15.0 lib/rubber/recipes/rubber/spot_requests.rb
rubber-2.14.0 lib/rubber/recipes/rubber/spot_requests.rb
rubber-2.13.1 lib/rubber/recipes/rubber/spot_requests.rb
rubber-2.13.0 lib/rubber/recipes/rubber/spot_requests.rb
rubber-2.12.2 lib/rubber/recipes/rubber/spot_requests.rb
rubber-2.12.1 lib/rubber/recipes/rubber/spot_requests.rb
rubber-2.12.0 lib/rubber/recipes/rubber/spot_requests.rb
rubber-2.11.0 lib/rubber/recipes/rubber/spot_requests.rb
rubber-2.10.2 lib/rubber/recipes/rubber/spot_requests.rb
rubber-2.10.1 lib/rubber/recipes/rubber/spot_requests.rb
rubber-2.10.0 lib/rubber/recipes/rubber/spot_requests.rb