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
  ansible            16.1  root_pass app_pass
  asp-net-core       16.1  root_pass db_pass
  avideo             16.1  root_pass app_pass app_email app_domain
  b2evolution        16.1  root_pass db_pass app_pass app_email
  bagisto            16.1  root_pass db_pass app_pass app_email
  bugzilla           16.1  root_pass db_pass app_pass app_email
  cakephp            16.1  root_pass db_pass
  canvas             16.2  root_pass db_pass app_pass app_email app_domain
  codeigniter        16.1  root_pass db_pass
  collabtive         16.1  root_pass db_pass app_pass app_email
  concrete5          16.1  root_pass db_pass app_pass app_email
  core               16.1  root_pass 
  ...

$ 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    2021-03-16  2021-04-16  304.46     TurnKey Core VM
   2  Yes   2021-04-16  2021-04-18  64.93      TurnKey LAMP

$ hub-launch -h
Syntax: /usr/bin/hub-launch  [opts]

Launch a new cloud server

Arguments:

    appliance          Appliance name to launch (e.g. core)

Options:

    --region=          Region for instance launch (default: us-east-1)
    --size=            Instance size (default: m1.small)
    --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

    --backup-id=       TurnKey Backup ID to restore on launch
    --fqdn=            Fully qualified domain name to associate
                       e.g., www.tklapp.com. | www.example.com.

    --skip-secalerts   Skip firstboot security updates
    --skip-secupdates  Skip security alerts and notifications setup

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  core --backup-id=1
# Status      ID         IP Address      Region          Label
  pending     i-1234135  -               us-east-1       TurnKey Core