Skip to content
/ awsm-exec Public

Plugin for https://github.com/awsm/awsm that makes it easy to execute commands on remote AWS instances

Notifications You must be signed in to change notification settings

awsm/awsm-exec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

awsm-exec

Execute arbitrary commands on AWS boxes using SSH.

Exec example:

asciicast

Install:

α> cp awsm-exec.sh ~/.awsm/plugins

Config:

To setup awsm-exec to use sudo for executing commands add the following to ~/.awsm/config.

AWSM_EXEC_SUDO_USER=user_name

Usaage:

α> awsm exec 'ps aux | grep unicorn'

α> awsm exec top 

asciicast

Session:

Create a session with a single instance. All exec commands will be sent to that instance.

α> awsm session
α> awsm exec ls -la /var/log/application.log    # commands executed directly against the selected instance
α> awsm exec tail -f /var/log/application.log
α> awsm session clear

asciicast

App Exec

To make things easier create a local .awsm-profile file and add AWSM_APP_DEPLOY_DIR=/path/to/app. From now on you can run the following and the command will be executed in the dir specified in the .awsm-profile file.

α> awsm app_exec ls -la  # Executes ls -la in the direct specified by AWSM_APP_DEPLOY_DIR in the local .awsm-profile

asciicast

Built in commands

α> awsm diskspace # Executes df -h

α> awsm memory    # Executes vmstat

Rails Helpers

Executes rails commands on the instance selected. Note: You may need to setup the sudo user (as described above) in your config file.

The path to the directory the app lives in must be specified.

α> awsm rails c /path/to/app # Executes rails console in the director specified. 
α> awsm rails c # If there is a local .awsm-profile file with AWSM_APP_DEPLOY_DIR set, then the app path does not need to be specified.

asciicast

α> awsm rails db /path/to/app # Executes rails console in the director specified. 

About

Plugin for https://github.com/awsm/awsm that makes it easy to execute commands on remote AWS instances

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages