Project

infra-ctrl

0.0
No commit activity in last 3 years
No release in over 3 years
Simple way to ls / ssh into vpns
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.14
~> 1.12
= 0.14
~> 10.0
~> 3.0

Runtime

~> 1.9
~> 1.0
 Project Readme

Ctrl

This is a simple gem to ease listing and sshing to instances in an AWS VPC.

Installation

$ gem install infra-ctrl

Add environment variables for AWS (direnv.net FTW):

  • AWS_DEFAULT_REGION
  • AWS_SECRET_ACCESS_KEY
  • AWS_ACCESS_KEY_ID

As well as a couple for specifying the users to log in as when sshing to the nat and internal instances:

  • CTRL_SSH_USER
  • CTRL_SSH_NAT_USER

Notes

Assumptions about your infrastructure:

  1. Instances with public ips are connected to directly using the CTRL_SSH_USER
  2. Each instance has a tag:Environment
  3. VPC private instances use the same user to log in
  4. You have the necessary keys locally, and are fine forwarding your agent

Usage

$ ctrl ls <env> <instance name>
$ ctrl ssh <env> <instance name>

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/MattHall/ctrl