module Deployinator
Deployinator
¶ ↑
This is the main entry point for all things in the Deployination.
Constants
- VERSION
Attributes
a hash for context specifics settings (test,dev,production) of deployinator itself
Default username for passwordless ssh
the controller class. defaults to Deployinator::Controller
if you override this it should be a subclass of Deployinator::Controller
Deploy
Host
Your company domain name
Git info per stack
Default github_host
Hostname where deployinator runs
Bug or issue tracker - proc that takes the issue id as an argument ex: Deployinator.issue_tracker
= proc {|issue| “foo/browse/#{issue}”}
File to log to
Log path
Your install root
filter log entries in /stats
exclude stacks in /stats, even if present in stats_included_stacks
include stacks in /stats
list of configurations for grouping historical / renamed stacks in /stats
Timing Log path
Public Class Methods
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
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
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
# File lib/deployinator.rb, line 78 def initialize @stack_plugins = {} @global_plugins = [] @admin_groups = [] end
is a log file defined?
# File lib/deployinator.rb, line 93 def log_file? log_file end
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
# 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