Release v0.2.1
righteous is a Python client implementation of the RightScale API for EC2 instance management.
righteous provides an API and CLI to create, start/stop, delete, remove and introspect RightScale EC2 Servers. This library implements RightScale API 1.0 and has only been tested with EC2 instances using ServerTemplates and managed in a Deployment.
Create a file called ~/.righteous with the following customised contents:
[auth]
username: username@domain.com
password: password
account_id: 123
[server-defaults]
default_deployment_id: 45623
ec2_security_groups_href: https://my.rightscale.com/api/acct/123/ec2_security_groups/789
ec2_availability_zone: us-east-1a
ec2_ssh_key_href: https://my.rightscale.com/api/acct/123/ec2_ssh_keys/998
cloud_id: 1
server_template_href: https://my.rightscale.com/api/acct/123/ec2_server_templates/74732
instance_type: m1.small
m1.small: https://my.rightscale.com/api/acct/123/ec2_server_templates/74732
m1.large: https://my.rightscale.com/api/acct/123/ec2_server_templates/117240
righteous
Interact with the RightScale Server API.
Usage:
righteous [options] list
righteous [options] create <environment> <instance-type> (<server-template-key>=<server-template-value>)...
righteous [options] stop <environment>...
righteous [options] status <environment>...
righteous [options] delete <environment>...
righteous --version
Options:
-c FILE --config=FILE Specify the configuration file location, default is ~/.righteous
-v --verbose Show debug output
-h --help Show this screen.
Initialises righteous configuration
Parameters: |
|
---|---|
Params kwargs: | Key word arguments for additional configuration |
Logins to RightScale and stores the auth cookie for future requests
Parameters: |
|
---|
Lists servers in a deployment
Returns JSON
Parameters: | deployment_id – (optional) String representing Deployment to list servers from |
---|
Finds a server based on nickname
Parameters: | nickname – (optional) String representing the nickname of the server to lookup |
---|
Detailed server information
Parameters: |
|
---|
Current server settings
Parameters: |
|
---|
Creates and starts a server. Returns a tuple of operation status, href of the created, started server
Parameters: |
|
---|
Stops a server.
Parameters: |
|
---|
Deletes a server from RightScale
Parameters: |
|
---|