Sha256: 6ba0a7e1c9b13ec3298768bdf271118ee8017959862bd34c11d9b176c2c1a0dc
Contents?: true
Size: 973 Bytes
Versions: 18
Compression:
Stored size: 973 Bytes
Contents
require 'opsicle/config' module Opsicle class Client attr_reader :opsworks attr_reader :s3 attr_reader :config def initialize(environment) @config = Config.new(environment) @config.configure_aws! @opsworks = AWS::OpsWorks.new.client @s3 = AWS::S3.new end def run_command(command, command_args={}, options={}) opts = command_options(command, command_args, options) Output.say_verbose "OpsWorks call: create_deployment(#{opts})" opsworks.create_deployment(opts) end def api_call(command, options={}) opsworks.public_send(command, options) end def opsworks_url "https://console.aws.amazon.com/opsworks/home?#/stack/#{@config.opsworks_config[:stack_id]}" end def command_options(command, command_args={}, options={}) config.opsworks_config.merge(options).merge({ command: { name: command, args: command_args } }) end private :command_options end end
Version data entries
18 entries across 18 versions & 1 rubygems