Module: Rudy

Extended by:
Rudy
Included in:
Rudy
Defined in:
lib/rudy.rb,
lib/rudy/aws.rb,
lib/rudy/cli.rb,
lib/rudy/scm.rb,
lib/rudy/utils.rb,
lib/rudy/config.rb,
lib/rudy/global.rb,
lib/rudy/aws/ec2.rb,
lib/rudy/aws/sdb.rb,
lib/rudy/scm/git.rb,
lib/rudy/scm/svn.rb,
lib/rudy/huxtable.rb,
lib/rudy/machines.rb,
lib/rudy/metadata.rb,
lib/rudy/routines.rb,
lib/rudy/cli/candy.rb,
lib/rudy/cli/disks.rb,
lib/rudy/cli/config.rb,
lib/rudy/guidelines.rb,
lib/rudy/cli/machines.rb,
lib/rudy/cli/routines.rb,
lib/rudy/aws/sdb/error.rb,
lib/rudy/metadata/disks.rb,
lib/rudy/routines/helper.rb,
lib/rudy/routines/reboot.rb,
lib/rudy/cli/aws/s3/store.rb,
lib/rudy/metadata/backups.rb,
lib/rudy/routines/release.rb,
lib/rudy/routines/startup.rb,
lib/rudy/cli/aws/ec2/candy.rb,
lib/rudy/cli/aws/ec2/zones.rb,
lib/rudy/routines/shutdown.rb,
lib/rudy/cli/aws/ec2/groups.rb,
lib/rudy/cli/aws/ec2/images.rb,
lib/rudy/cli/aws/s3/buckets.rb,
lib/rudy/cli/aws/ec2/volumes.rb,
lib/rudy/cli/aws/sdb/domains.rb,
lib/rudy/metadata/objectbase.rb,
lib/rudy/cli/aws/ec2/keypairs.rb,
lib/rudy/routines/passthrough.rb,
lib/rudy/cli/aws/ec2/addresses.rb,
lib/rudy/cli/aws/ec2/instances.rb,
lib/rudy/cli/aws/ec2/snapshots.rb,
lib/rudy/routines/helpers/scmhelper.rb,
lib/rudy/routines/helpers/diskhelper.rb,
lib/rudy/routines/helpers/userhelper.rb,
lib/rudy/routines/helpers/scripthelper.rb,
lib/rudy/routines/helpers/dependshelper.rb

Overview

Rudy

Rudy is a development and deployment tool for the Amazon Elastic Compute Cloud (EC2). <a href=“wiki.github.com/solutious/rudy/getting-started”>Getting Started</a> today!

Defined Under Namespace

Modules: AWS, CLI, Guidelines, Huxtable, MetaData, Routines, SCM, Utils, VERSION Classes: Backups, Config, Disks, Error, Global, InsecureKeyPermissions, Machine, MachineGroupAlreadyRunning, MachineGroupNotDefined, MachineGroupNotRunning, Machines, NoConfig, NoGlobal, NoMachinesConfig, NoRoutinesConfig, PrivateKeyFileExists, PrivateKeyNotFound, ServiceUnavailable

Constant Summary collapse

DOMAIN =

SimpleDB accepts dashes in the domain name on creation and with the query syntax. However, with select syntax it says: “The specified query expression syntax is not valid”

"rudy_state".freeze
DELIM =
'-'.freeze
CONFIG_DIR =
File.join(ENV['HOME'] || ENV['USERPROFILE'], '.rudy').freeze
CONFIG_FILE =
File.join(Rudy::CONFIG_DIR, 'config').freeze
DEFAULT_REGION =
'us-east-1'.freeze
DEFAULT_ZONE =
'us-east-1b'.freeze
DEFAULT_ENVIRONMENT =
'stage'.freeze
DEFAULT_ROLE =
'app'.freeze
DEFAULT_POSITION =
'01'.freeze
DEFAULT_USER =
'rudy'.freeze
DEFAULT_LOCALHOST =
'localhost'.freeze
DEFAULT_EC2_HOST =
"ec2.amazonaws.com"
DEFAULT_EC2_PORT =
443
MAX_INSTANCES =
5.freeze
SUPPORTED_SCM_NAMES =
[:svn, :git].freeze
ID_MAP =
{
  :disk => 'disk',
  :instance => 'i',
  :backup => 'back',
  :machine => 'm',
  :volume => 'vol',
  :snapshot => 'snap',
  :kernel => 'aki',
  :image => 'ami',
  :ram => 'ari',
  :log => 'log',
  :key => 'key',
  :awspk => 'pk',
  :awscert => 'cert',
  :reservation => 'r',
  :dns_public => 'ec2',
  :dns_private => 'domU',
}.freeze
@@quiet =
false
@@yes =
false
@@debug =
false
@@sysinfo =
SysInfo.new.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.debug?Boolean

Returns:

  • (Boolean)


99
# File 'lib/rudy.rb', line 99

def Rudy.debug?; @@debug == true; end

.disable_debugObject



105
# File 'lib/rudy.rb', line 105

def Rudy.disable_debug; @@debug = false; end

.disable_quietObject



106
# File 'lib/rudy.rb', line 106

def Rudy.disable_quiet; @@quiet = false; end

.disable_yesObject



107
# File 'lib/rudy.rb', line 107

def Rudy.disable_yes; @@yes = false; end

.enable_debugObject



102
# File 'lib/rudy.rb', line 102

def Rudy.enable_debug; @@debug = true; end

.enable_quietObject



103
# File 'lib/rudy.rb', line 103

def Rudy.enable_quiet; @@quiet = true; end

.enable_yesObject



104
# File 'lib/rudy.rb', line 104

def Rudy.enable_yes; @@yes = true; end

.in_situ?Boolean

Determine if we’re running directly on EC2 or “some other machine”. We do this by checking if the file /etc/ec2/instance-id exists. This file is written by /etc/init.d/rudy-ec2-startup. NOTE: Is there a way to know definitively that this is EC2? We could make a request to the metadata IP addresses.

Returns:

  • (Boolean)


65
66
67
# File 'lib/rudy/utils.rb', line 65

def Rudy.in_situ?
  File.exists?('/etc/ec2/instance-id')
end

.quiet?Boolean

Returns:

  • (Boolean)


100
# File 'lib/rudy.rb', line 100

def Rudy.quiet?; @@quiet == true; end

.sysinfoObject



109
# File 'lib/rudy.rb', line 109

def Rudy.sysinfo; @@sysinfo; end

.yes?Boolean

Returns:

  • (Boolean)


101
# File 'lib/rudy.rb', line 101

def Rudy.yes?; @@yes == true; end

Instance Method Details

#sysinfoObject



110
# File 'lib/rudy.rb', line 110

def sysinfo; @@sysinfo;  end