README.rdoc in engineyard-metadata-0.1.2 vs README.rdoc in engineyard-metadata-0.2.0

- old
+ new

@@ -1,47 +1,47 @@ = engineyard-metadata -Presents a simple, unchanging interface to get metadata about your EngineYard AppCloud instances running on Amazon EC2. +Presents a simple interface to get metadata about your EngineYard AppCloud instances running on Amazon EC2. == Purpose -To define an unchanging interface to useful metadata (passwords, IP addresses, etc.) that is otherwise buried deep inside EngineYard's chef config files and various API calls. +To define a simple interface to useful metadata (passwords, IP addresses, etc.) that is otherwise buried deep inside EngineYard's chef config files and various API calls. == Examples -* Get a dynamically updated list of all running app servers so that you can pool memcached over all of them. (<tt>EY::Metadata.app_servers</tt>) -* Get the current database password so that you can write a script that connects to it. (<tt>EY::Metadata.database_password</tt>) +* Get a dynamically updated list of all running app servers so that you can pool memcached over all of them. (<tt>EY.metadata.app_servers</tt>) +* Get the current database password so that you can write a script that connects to it. (<tt>EY.metadata.database_password</tt>) Here's the current method list: - EY::Metadata.app_master - EY::Metadata.app_name - EY::Metadata.app_servers - EY::Metadata.app_slaves - EY::Metadata.current_path - EY::Metadata.database_host - EY::Metadata.database_name - EY::Metadata.database_password (only works from cloud instances) - EY::Metadata.database_username - EY::Metadata.db_master - EY::Metadata.db_servers - EY::Metadata.db_slaves - EY::Metadata.environment_name - EY::Metadata.mysql_command (only works from cloud instances) - EY::Metadata.mysqldump_command (only works from cloud instances) - EY::Metadata.present_instance_id (only works from cloud instances) - EY::Metadata.present_instance_role (only works from cloud instances) - EY::Metadata.present_public_hostname (only works from cloud instances) - EY::Metadata.present_security_group (only works from cloud instances) - EY::Metadata.repository_uri - EY::Metadata.shared_path - EY::Metadata.solo - EY::Metadata.ssh_aliases - EY::Metadata.ssh_password (only works from cloud instances) - EY::Metadata.ssh_username - EY::Metadata.stack_name - EY::Metadata.utilities + EY.metadata.app_master + EY.metadata.app_name + EY.metadata.app_servers + EY.metadata.app_slaves + EY.metadata.current_path + EY.metadata.database_host + EY.metadata.database_name + EY.metadata.database_password (only works from cloud instances) + EY.metadata.database_username + EY.metadata.db_master + EY.metadata.db_servers + EY.metadata.db_slaves + EY.metadata.environment_name + EY.metadata.mysql_command (only works from cloud instances) + EY.metadata.mysqldump_command (only works from cloud instances) + EY.metadata.present_instance_id (only works from cloud instances) + EY.metadata.present_instance_role (only works from cloud instances) + EY.metadata.present_public_hostname (only works from cloud instances) + EY.metadata.present_security_group (only works from cloud instances) + EY.metadata.repository_uri + EY.metadata.shared_path + EY.metadata.solo + EY.metadata.ssh_aliases + EY.metadata.ssh_password (only works from cloud instances) + EY.metadata.ssh_username + EY.metadata.stack_name + EY.metadata.utilities == Use See the rdoc at {the engineyard-metadata rdoc}[http://rubydoc.info/gems/engineyard-metadata]. @@ -51,27 +51,27 @@ === When you're executing this gem from OUTSIDE the cloud You must... -* have <tt>~/.eyrc</tt> or set <tt>EY::Metadata.ey_cloud_token=</tt> or set <tt>ENV['EY_CLOUD_TOKEN']</tt>. -* execute the gem from the local copy of your application's repo or set <tt>EY::Metadata.environment_name=</tt> or set <tt>ENV['EY_ENVIRONMENT_NAME']</tt>. +* have <tt>~/.eyrc</tt> or set <tt>EY.metadata.ey_cloud_token=</tt> or set <tt>ENV['EY_CLOUD_TOKEN']</tt>. +* execute the gem from the local copy of your application's repo or set <tt>EY.metadata.environment_name=</tt> or set <tt>ENV['EY_ENVIRONMENT_NAME']</tt>. === Where the methods are defined -Metadata getters are defined directly on <tt>EY::Metadata</tt> (which in turn delegates out to various adapters). Even if EngineYard changes the structure of the config files or Amazon EC2's API changes, these methods will stay the same. +Metadata getters are defined directly on <tt>EY.metadata</tt> (which in turn delegates out to various adapters). Even if EngineYard changes the structure of the config files or Amazon EC2's API changes, these methods will stay the same. [...] >> require 'rubygems' [...] >> require 'engineyard-metadata' [...] - >> EY::Metadata.database_host + >> EY.metadata.database_host => "external_db_master.compute-1.amazonaws.com" - >> EY::Metadata.app_servers + >> EY.metadata.app_servers => [ 'app_1.compute-1.amazonaws.com' , 'app_master.compute-1.amazonaws.com' ] - >> EY::Metadata.db_servers + >> EY.metadata.db_servers => [ 'db_master.compute-1.amazonaws.com', 'db_slave_1.compute-1.amazonaws.com' ] [...and many more...] == SSH alias helper @@ -88,11 +88,11 @@ User deploy StrictHostKeyChecking no == Known issues -* Doesn't work with multiple apps per environment. -* It's not always clear what environment you're running in. For example, you say <tt>EY::Metadata.something</tt> and you're just supposed to know what environment you're in. You can use <tt>.environment_name=</tt>, but you might not remember. +* Doesn't work with multiple apps per environment. [FIXED!] +* It's not always clear what environment you're running in. For example, you say <tt>EY.metadata.something</tt> and you're just supposed to know what environment you're in. You can use <tt>.environment_name=</tt>, but you might not remember. * There are no factory methods. If we fully fleshed this out, it might be like <tt>my_env = EY::Environment.find('my_env')</tt> and <tt>my_app_master = my_env.app_master</tt>. Not sure that complexity would add a lot of value. == History This is the second generation of http://rubygems.org/gems/ey_cloud_awareness.