Class: DeployGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/ebx/deploy_group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDeployGroup

Returns a new instance of DeployGroup.



4
5
6
# File 'lib/ebx/deploy_group.rb', line 4

def initialize
  @global_settings = AwsEnvironmentConfig.read_config[ENV['AWS_ENV']]
end

Instance Attribute Details

#global_settingsObject

Returns the value of attribute global_settings.



2
3
4
# File 'lib/ebx/deploy_group.rb', line 2

def global_settings
  @global_settings
end

Instance Method Details

#createObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/ebx/deploy_group.rb', line 8

def create
  global_settings['environments'].each do |env_settings|
    AWS.config(region: env_settings['region'] || Ebx::DEFAULT_REGION)
    ElasticBeanstalk.instance.update_settings

    env_settings = global_settings.merge(env_settings)

    app = AwsApplication.new(env_settings)
    app.create

    ver = AwsApplicationVersion.new(env_settings)
    ver.create

    env = AwsEnvironment.new(env_settings)
    env.create
  end
end