newbamboo / manec2
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
.gitignore | ||
| |
README.markdown | ||
| |
manec2.rb |
Assign names to your EC2 instances and images (stored in SimpleDB). Very handy when you have more than a few running at any one time!
Add environment variables to your .profile with your AWS keys.
export MANEC2_ACCESS_KEY_ID=<key>
export MANEC2_SECRET_ACCESS_KEY=<sekret>
export MANEC2_SIMPLEDB_DOMAIN=<string_of_your_choice>
Run ./manec2.rb create_domain to create the SimpleDB domain.
Symlink the manec2.rb script to something like /usr/local/bin/manec2 so it's easily accessible.
List your instances with manec2 instances or manec2 i for short. List images with manec2 images
Set the name of an instance or image with manec2 i-12345 my_staging_server or manec2 a-54321 my_staging_image.
You can ssh into an instance by name like so manec2 ssh my_staging_image. It will lookup the domain of the ec2 instance and run ssh -i ~/.ec2/id_rsa-#{pv_or_gsg}-keypair root@ec2-123-456-789-902.compute-1.amazonaws.com for you. If you know the instance id you can use that instead of the name, for example manec2 ssh i-12345.

