Sha256: b5233ab1a1e5221da1aebc74c85ce40983f86a4e9b377b78985f781183d4107b
Contents?: true
Size: 1.89 KB
Versions: 1
Compression:
Stored size: 1.89 KB
Contents
= engineyard-metadata Presents a simple, unchanging 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. == 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 the full method list in {the engineyard-metadata rdoc}[http://rdoc.info/github/seamusabshere/engineyard-metadata]. == Use === From the inside When you're executing the gem from your instances, you don't have to configure anything. Just require the gem. === From the outside You need to provide... * <tt>ENV['EY_CLOUD_TOKEN']</tt> or have <tt>~/.eyrc</tt> * <tt>ENV['REPOSITORY_URI']</tt> or execute the gem from the local copy of your application's repo. === 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. [...] >> require 'rubygems' [...] >> require 'engineyard-metadata' [...] >> EY::Metadata.database_host => "external_db_master.compute-1.amazonaws.com" >> EY::Metadata.app_servers => [ 'app_1.compute-1.amazonaws.com' , 'app_master.compute-1.amazonaws.com' ] >> EY::Metadata.db_servers => [ 'db_master.compute-1.amazonaws.com', 'db_slave_1.compute-1.amazonaws.com' ] [...and many more...] == History This is the second generation of http://rubygems.org/gems/ey_cloud_awareness. == Copyright Copyright (c) 2010 Seamus Abshere. See LICENSE for details.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
engineyard-metadata-0.0.5 | README.rdoc |