Skip to content

Run rails consoles (and other things) on ec2 instances. 💻

Notifications You must be signed in to change notification settings

stefansundin/ec2-run

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ec2-run

Use this tool to easily connect to an EC2 server and run a rails console on it (or whatever command you specify).

Note: What you run using this tool will be run on the EC2 server you select, so if you run a destructive action on a production server, you will break that production server.

Invoke with -t to start a tmux session on the remote server. For a tutorial on tmux, see: https://danielmiessler.com/study/tmux/

Install

You can install this tool by using our Homebrew tap:

brew tap fullscreen/tap
brew install ec2-run

ProTips

Stack name

This tool assumes that you want to run commands on EC2 instances that are launched from CloudFormation stacks, so it looks up instances based on the tag tag:aws:cloudformation:stack-name.

If you don't specify -s, the tool will try to figure out a stack name from your git remotes, but you can set a git config to override that.

$ git config --local ec2-run.stack stage-datascience

Now if you omit the -s flag, stage-datascience will automatically be used.

Revert with:

$ git config --local --unset ec2-run.stack

Use tmux by default

$ git config --global ec2-run.tmux true

Revert with:

$ git config --global --unset ec2-run.tmux

Contribute

To download and hack on the source code, run:

$ go get -u github.com/Fullscreen/ec2-run
$ cd $GOPATH/src/github.com/Fullscreen/ec2-run
$ go build

About

Run rails consoles (and other things) on ec2 instances. 💻

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published