module Bolts::Defaults

To include this module must have this in initialize:

def initialize(optiions, …)

@options = options
...

end

So @options must be set

Public Instance Methods

default_cluster() click to toggle source

user: 123456789.dkr.ecr.us-east-1.amazonaws.com/bolts service_cluster:

default: prod-lo
hi-web-prod: prod-hi
hi-clock-prod: prod-lo
hi-worker-prod: prod-lo

Assumes that @service is set in the class that the Defaults module is included in.

# File lib/bolts/defaults.rb, line 19
def default_cluster
  service_cluster = settings.data["service_cluster"]
  service_cluster[@service] || service_cluster["default"]
end
default_user() click to toggle source
# File lib/bolts/defaults.rb, line 24
def default_user
  settings.data["user"] || "ec2-user"
end
settings() click to toggle source
# File lib/bolts/defaults.rb, line 28
def settings
  @settings ||= Settings.new(@options[:project_root])
end