module Deployinator

Deployinator

This is the main entry point for all things in the Deployination.

Constants

VERSION

Attributes

admin_groups[RW]
app_context[RW]

a hash for context specifics settings (test,dev,production) of deployinator itself

default_user[RW]

Default username for passwordless ssh

deploy_controller[RW]

the controller class. defaults to Deployinator::Controller if you override this it should be a subclass of Deployinator::Controller

deploy_host[RW]

Deploy Host

domain[RW]

Your company domain name

git_info_for_stack[RW]

Git info per stack

git_sha_length[RW]
github_host[RW]

Default github_host

global_plugins[RW]
hostname[RW]

Hostname where deployinator runs

issue_tracker[RW]

Bug or issue tracker - proc that takes the issue id as an argument ex: Deployinator.issue_tracker = proc {|issue| “foo/browse/#{issue}”}

log_file[RW]

File to log to

log_path[RW]

Log path

maintenance_contact[RW]
maintenance_mode[RW]
root_dir[RW]

Your install root

stack_plugins[RW]
stack_tailer_port[RW]
stats_extra_grep[RW]

filter log entries in /stats

stats_ignored_stacks[RW]

exclude stacks in /stats, even if present in stats_included_stacks

stats_included_stacks[RW]

include stacks in /stats

stats_renamed_stacks[RW]

list of configurations for grouping historical / renamed stacks in /stats

timing_log_path[RW]

Timing Log path

Public Class Methods

env() click to toggle source

Running environment for deployinator This is taken from RACK_ENV or RAILS_ENV note this is different from deployinator’s concept of stacks/environments

# File lib/deployinator.rb, line 100
def env
  ENV["RACK_ENV"] || ENV["RAILS_ENV"] || "development"
end
get_stack_files() click to toggle source

Gets all the stack files in the stack directory

# File lib/deployinator.rb, line 105
def get_stack_files
  Dir[Deployinator.root(["stacks", "*.rb"])]
end
get_stacks() click to toggle source

Gets all the stack names without the .rb extension

# File lib/deployinator.rb, line 110
def get_stacks
  self.get_stack_files.sort.map do |file|
    File.basename(file, ".rb")
  end
end
initialize() click to toggle source
# File lib/deployinator.rb, line 78
def initialize
  @stack_plugins = {}
  @global_plugins = []
  @admin_groups = []
end
log_file?() click to toggle source

is a log file defined?

# File lib/deployinator.rb, line 93
def log_file?
  log_file
end
root(path = nil) click to toggle source

Base root path Takes an optional argument of a string or array and returns the path(s) From the root of deployinator

# File lib/deployinator.rb, line 87
def root(path = nil)
  base = Deployinator.root_dir
  path ? File.join(base, path) : base
end
setup_logging() click to toggle source
# File lib/deployinator/logging.rb, line 2
def self.setup_logging
  if Deployinator.log_file?
    $deployinator_log_handle = File.new(Deployinator.log_file, "a")
    def $stdout.write(string)
      $deployinator_log_handle.write string
      super
    end
    $stdout.sync = true
    $stderr.reopen($deployinator_log_handle)
    puts "Logging #{Deployinator.log_file}"
  end
end