Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tongueroo/ey_info
Provides more detailed information about your ey environments and quick set up your ~/.ssh/config shortcuts.
https://github.com/tongueroo/ey_info
Last synced: about 1 month ago
JSON representation
Provides more detailed information about your ey environments and quick set up your ~/.ssh/config shortcuts.
- Host: GitHub
- URL: https://github.com/tongueroo/ey_info
- Owner: tongueroo
- Created: 2010-11-03T01:17:26.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2012-02-29T20:37:23.000Z (almost 13 years ago)
- Last Synced: 2024-04-26T18:21:27.778Z (8 months ago)
- Language: Ruby
- Homepage:
- Size: 102 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
Ey Info
=======Summary
-------
Quickly set up your ~/.ssh/config shortcuts for your ey cloud servers.Install
-------
gem install --no-ri --no-rdoc ey_info # sudo if you need toUsage Command Line
-------
# will set up your ~/ssh/config shortcuts.
$ ey_info -i "id_rsa" -u "root" # same as defaults
$ ey_info # same as aboveIf you're environment in the ey cloud dashboard is called 'production' with an app_master, and 2 app instances.
$ ssh production_app_master
vs
$ ssh -i ~/.ssh/id-rsa [email protected]$ ssh production_app1
$ ssh production_app2
$ ssh production_db_master
$ ssh production_db_slave1Usage With Capistrano
-------I still find capistrano a very useful utility for debugging and still use wanted to use it with EY's cloud.
$ cap invoke COMMAND="..." is extremely useful. The engineyard gem provides a
"ey ssh 'uptime' --all -e production" command but it loops through the servers one by one instead of running
the commands in parallel, which can be slow if you have lots of servers.You can use this gem to dynamically grab the ec2 hosts information from your ey environment and set up your
capistrano roles.Here are a few examples of how you can use it in your config/deploy.rb:
require 'ey_info'
task :production do
@info = EyInfo::Hosts.new
hosts = @info.hosts("production") # parameter is the environment name in EY's gui interfacerole :db, hosts.find {|x| x[:role] == "app_master" }[:ssh_key], :primary => true
# app instances
hosts.select {|x| x[:role] =~ /app/ }.each do |h|
role :web, h[:ssh_key]
role :app, h[:ssh_key], :sphinx => true
end
# utility instances
hosts.select {|x| x[:role] =~ /util/ }.each do |h|
role :web, h[:ssh_key]
role :app, h[:ssh_key], :sphinx => true
end
end