Module: Aerosol

Defined in:
lib/aerosol/version.rb,
lib/aerosol.rb

Overview

Copyright Swipely, Inc. All rights reserved.

Defined Under Namespace

Modules: AWS, AWSModel, Util Classes: AbstractCommand, AutoScaling, Cli, Connection, Deploy, DeployCommand, Env, Instance, LaunchConfiguration, LaunchTemplate, Runner, SshCommand

Constant Summary collapse

LOAD_FILE =
'aerosol.rb'
VERSION =
'1.10.0'

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#instanceObject (readonly)

Returns the value of attribute instance.



23
24
25
# File 'lib/aerosol.rb', line 23

def instance
  @instance
end

Class Method Details

.auto_scalingObject

.auto_scalingsObject

.deployObject

Returns the value of attribute deploy.



23
24
25
# File 'lib/aerosol.rb', line 23

def deploy
  @deploy
end

.deploysObject

.envObject

.envsObject

.git_shaObject

Returns the value of attribute git_sha.



23
24
25
# File 'lib/aerosol.rb', line 23

def git_sha
  @git_sha
end

.instObject



32
33
34
# File 'lib/aerosol.rb', line 32

def inst
  @instance ||= load_inst
end

.launch_configurationObject

.launch_configurationsObject

.launch_templateObject

.launch_templatesObject

.load_fileObject



28
29
30
# File 'lib/aerosol.rb', line 28

def load_file
  @load_file || LOAD_FILE
end

.load_file=(value) ⇒ Object

Sets the attribute load_file

Parameters:

  • value

    the value to set the attribute load_file to.



24
25
26
# File 'lib/aerosol.rb', line 24

def load_file=(value)
  @load_file = value
end

.load_instObject



36
37
38
39
40
41
42
# File 'lib/aerosol.rb', line 36

def load_inst
  setup.tap do |state|
    if File.exists?(load_file)
      instance_eval(IO.read(load_file), load_file)
    end
  end
end

.namespace(value = nil) ⇒ Object

Returns the value of attribute namespace.



23
24
25
# File 'lib/aerosol.rb', line 23

def namespace
  @namespace
end

.region(value = nil) ⇒ Object



52
53
54
55
56
57
58
# File 'lib/aerosol.rb', line 52

def region(value = nil)
  if value.nil?
    Aws.config[:region]
  else
    Aws.config.update(region: value)
  end
end

.setupObject



60
61
62
63
64
65
66
67
68
69
# File 'lib/aerosol.rb', line 60

def setup
  {
    :auto_scalings => Aerosol::AutoScaling.instances,
    :deploys => Aerosol::Deploy.instances,
    :launch_configurations => Aerosol::LaunchConfiguration.instances,
    :launch_templates => Aerosol::LaunchTemplate.instances,
    :sshs => Aerosol::Connection.instances,
    :envs => Aerosol::Env.instances
  }
end

.sshObject

.sshsObject