TurnKey Linux Virtual Appliance Library

Command-line tools

The API Key displayed in your Hub user profile must be set in the environment variable HUB_APIKEY, for example:

export HUB_APIKEY="AAAAAAAAAAAAAAA"

HubTools includes the following commands:

hub-list-appliances - List appliances
hub-list-servers    - List servers
hub-list-backups    - List backup records
hub-launch          - Launch a new cloud server
hub-stop            - Stop an EBS backed cloud server
hub-start           - Start an EBS backed cloud server
hub-destroy         - Destroy a cloud server

Example usage:

$ hub-list-appliances
# Name               Ver.  Preseeds
  appengine          11.1  root_pass
  bugzilla           11.1  root_pass db_pass app_pass app_email
  core               11.1  root_pass
  deki               11.1  root_pass db_pass app_pass app_email
  django             11.1  root_pass db_pass app_pass app_email
  ...

$ hub-list-servers
# Status      ID         IP Address      Region          Label
  running     i-1234131  88.45.24.203    us-east-1       TurnKey Core
  running     1-1234132  88.193.28.52    us-west-1       TurnKey LAMP Stack
  terminated  i-1234133  -               ap-southeast-1  TurnKey Wordpress

$ hub-list-backups
# ID  SKPP  Created     Updated     Size (MB)  Label
   1  No    2011-03-16  2011-04-16  304.46     TurnKey Core VM
   2  Yes   2011-04-16  2011-04-18  64.93      TurnKey LAMP

$ hub-launch -h
Syntax: hub-launch <appliance|backup_id> [options]

Launch a new cloud server

Arguments:
    appliance       Appliance name to launch (e.g. core)
    OR
    backup_id       Restore backup to a new cloud server (e.g. 2)

Options:
    --region        Region for instance launch (default: us-east-1)
    --size          Instance size (default: m1.small)
    --type          Instance type <s3|ebs> (default: s3)
    --label         Optional server descriptive label

    --root-pass     Root password to set (default: random)
    --db-pass       Database password
    --app-pass      Admin password for application
    --app-email     Admin email address for application
    --app-domain    Domain for application

    --fqdn          Fully qualified domain name to associate
                    e.g., www.tklapp.com. | www.example.com.

Environment variables:
    HUB_APIKEY      Displayed in your Hub account's user profile

$ hub-launch wordpress --app-pass=foo --db-pass=bar --app-email=a@b.com
# Status      ID         IP Address      Region          Label
  pending     i-1234134  -               us-east-1       TurnKey Wordpress

$ hub-launch  1
# Status      ID         IP Address      Region          Label
  pending     i-1234135  -               us-east-1       TurnKey Core