Skip to content
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.

harshalhshah/rack

 
 

Repository files navigation

rack

An opinionated CLI for Rackspace interactions

Warning

This repo is under active development and is not ready for anything but testing and development.

Documentation

For complete documentation, see the docs.

Installation

Make sure you have Go installed and the GOPATH environment variable set.

go get github.com/jrperritt/rack
go build -o $GOPATH/bin/rack

Setting Authentication Credentials

Environment Variables

Export the following environment variables:
RS_REGION_NAME (DFW, IAD, ORD, LON, SYD, HKG)
RS_USERNAME (Your Rackspace username)
RS_API_KEY (Your Rackspace API key)

Command-line

You can set auth parameters on the command-line using global flags: rack --username user1 --api-key 123456789 --region DFW servers instance list

Config file

You can create a config file in ~/.rack/config:

[DEFAULT]
username=user1
api-key=123456789
region=DFW

[PROFILE2]
username=user2
api-key=987654321
region=IAD

If you're using the default profile, you can call a command without additional flags:

rack servers instance list

However, if you'd like to use a different profile (such as PROFILE2 above):

rack --profile PROFILE2 servers instance list

Bash Completion

Add the following line to your .bashrc file:

PROG=rack source $GOPATH/src/github.com/codegangsta/cli/autocomplete/bash_autocomplete

and source it:

source ~/.bashrc

About

A CLI for Rackspace

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.7%
  • Shell 0.3%