Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Configuration file

wbailey edited this page · 8 revisions
Clone this wiki locally

There is a lot of information about instances available in EC2 that can be displayed and what everyone wants to see is different. Much like the web console is customizable so is the claws application via a configuration file written in YAML.

Initialization

To initialize claws with a configuration file run the --init option:

claws --init

This will generate a configuration file in your home directory:

$HOME/.claws.yml

Properties

This file is certainly going to change over time but at present the default generated file looks like:

---
capistrano:
  home: 
ssh:
  user: 
  identity: 
aws:
  access_key_id: 
  secret_access_key: 
ec2:
  regions:
    - us-east-1
    - eu-east-1
  fields:
    id:
      width: 10
      title: ID
    name:
      width: 20
      title: Name
    status:
      width: 8
      title: Status
    dns_name:
      width: 42
      title: DNS Name
    instance_type:
      width: 13
      title: Instance Type
    public_ip_address:
      width: 16
      title: Public IP
    private_ip_address:
      width: 16
      title: Private IP
    tags:
      width: 30
      title: tags

To make claws really work all you have to do is enter you AWS credentials and the ssh user and you should be able to connect to the host you select.

Capistrano

Though not supported yet you will be able to enter the home directory of your projects capistrano configuration files. Once this is enabled you will be able to display and filter hosts by their defined environment and role.

SSH

  • user - The username for ssh to use when connecting to the selected host
  • identity - The path to the identity file to use

AWS

  • access_key_id - An active access key id for your account
  • secret_access_key - The secret access key that is generated when you generate and access key

You can find your credentials by logging in to your AWS account, clicking the My Account link in the upper right, and then selecting Security Credentials under the Account tab on the left.

Regions

If you have hosts in multiple regions claws will automatically display all of the instances in them. If you want to limit the regions that you want to report on you can indicate that using this stanza. Remember to uses dashes to delineate the region indicating an array in yaml:

regions:
  - us-east-1
  - eu-east-1

Fields

This section has the most significant content because it controls what you want to see in the status table. From the example it is clear that you can enter the following in the fields stanza:

  • field name - This is the amazon name of the field. Consult the ruby aws-sdk documentation for a list of all of the available methods that can be entered.
  • width - The visible width in characters to display on the screen. The default width is 10 characters.
  • title - This is an optional field that can used for a more readable column heading title.

Special Fields

There are some special fields that claws defines for you that make it easier to manipulate the display. They are listed below:

  • name - AWS stores the name of a the server as a tag so claws extracts this for usage in your configuration file
  • tags - AWS allows you define any number of tags to identify your instance. The configuration allows for the usage of the tags field which is a formatted string of the available tags (minus the Name key/value pair)
  • roles - Just like the tags special field, security groups can be accessed via security_groups that displays a formatted string of the key/values
Something went wrong with that request. Please try again.