An opinionated CLI for Rackspace interactions
This repo is under active development and is not ready for anything but testing and development.
For complete documentation, see the docs.
Make sure you have Go installed and the GOPATH environment variable set.
go get github.com/jrperritt/rack
go build -o $GOPATH/bin/rack
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)
You can set auth parameters on the command-line using global flags:
rack --username user1 --api-key 123456789 --region DFW servers instance list
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
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