Project

opsworks

0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Amazon OpsWorks CLI
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 1.11.3
~> 2.0.2
~> 2.0
 Project Readme

OpsWorks CLI

Command line interface for Amazon OpsWorks.

Commands

Run opsworks with one of the following commands:

  • ssh Generate and update SSH configuration files.

    Instances are added in stack order to the SSH configuration. If you have instances with the same name in multiple stacks, the one from the first stack will be used by SSH.

  • dsh Generate and update dsh configuration files.

    Instances are added in stack order to the dsh machines.list in $HOME/.dsh, as per ssh above. A file is created in $HOME/.dsh/group for each layer in each stack.

Configuration

This gem uses the same configuration file as the AWS CLI. This requires you to have a working AWS CLI setup before continuing.

Add the following section to ~/.aws/config or to the file pointed out by the AWS_CONFIG_FILE environment variable:

[opsworks]
stack-id=<MY STACK IDs>
ssh-user-name=<MY SSH USER NAME>

The stack ID can be found in the stack settings, under OpsWorks ID (or in the address bar of your browser as console.aws.amazon.com/opsworks/home?#/stack/<STACK_ID>/stack). You can add several stack IDs belonging to the same IAM account separated by commas (stack-id=STACK1,...,STACKN). If no stack-id is specified all accessible stacks are used.

The ssh-user-name value should be set to the username you want to use when logging in remotely, most probably the user name from your My Settings page on OpsWorks.

Installation

Install for use on the command line (requires Ruby and Rubygems):

$ gem install opsworks

Then run opsworks:

$ opsworks --help

To use the gem in a project, add this to your Gemfile:

gem 'opsworks'

And then execute:

$ bundle

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request