Class: EY::Metadata

Inherits:
Object
  • Object
show all
Defined in:
lib/engineyard-metadata/metadata.rb,
lib/engineyard-metadata/insider.rb,
lib/engineyard-metadata/version.rb,
lib/engineyard-metadata/chef_dna.rb,
lib/engineyard-metadata/outsider.rb,
lib/engineyard-metadata/amazon_ec2_api.rb,
lib/engineyard-metadata/ssh_alias_helper.rb,
lib/engineyard-metadata/engine_yard_cloud_api.rb

Overview

All methods are defined on this module. For example, you’re supposed to say

EY::Metadata.database_username

instead of trying to call it from a particular adapter.

Direct Known Subclasses

Insider, Outsider

Defined Under Namespace

Modules: SshAliasHelper Classes: AmazonEc2Api, CannotGetFromHere, ChefDna, EngineYardCloudApi, Insider, Outsider

Constant Summary collapse

VERSION =
'0.2.5'
DEFAULT_IDENTIFIER =

The default instance identifier for selector methods

'public_hostname'
METHODS =
%w{
  app_master
  app_name
  app_servers
  app_slaves
  current_path
  database_host
  database_name
  database_password
  database_username
  db_master
  db_servers
  db_slaves
  environment_name
  environment_names
  mysql_command
  mysqldump_command
  present_instance_id
  present_instance_role
  present_public_hostname
  present_security_group
  repository_uri
  shared_path
  solo
  ssh_aliases
  ssh_password
  ssh_username
  stack_name
  utilities
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#app_name=(value) ⇒ Object (writeonly)

Sets the attribute app_name

Parameters:

  • value

    the value to set the attribute app_name to.



22
23
24
# File 'lib/engineyard-metadata/metadata.rb', line 22

def app_name=(value)
  @app_name = value
end

Instance Method Details

#current_pathObject

The path to the current deploy on app servers.



56
57
58
# File 'lib/engineyard-metadata/metadata.rb', line 56

def current_path
  "/data/#{app_name}/current"
end

#shared_pathObject

The path to the shared directory on app servers.



61
62
63
# File 'lib/engineyard-metadata/metadata.rb', line 61

def shared_path
  "/data/#{app_name}/shared"
end