Cloud 66 Toolbelt

Cloud 66 Toolbelt is a simple command-line tool for the awesome Cloud 66 customers. It allows you to deploy, modify settings and retrieve the current status of your Cloud 66 stacks, and much more!

Installation

You can install the Cloud 66 Toolbelt using RubyGems:

$ gem install c66

Help

With c66 installed, you can display the help with one of the following instructions:

$ c66 help

or

$ c66

or for a specific command:

$ c66 help <command>

Initialize the Toolbelt

Firstly, to use the Toolbelt, you will need to initiate it using:

$ c66 init

Then visit the URL given once authorized, copy and paste the authorization code into the command-line interface. You need to sign in and allow the Cloud 66 Toolbelt application to use your account to access to the authorization code.

Note: This is a one-off task.

List the Stacks

You can list all your stacks using:

$ c66 list

Deploy a Stack

Deploy a stack using the command deploy with a stack UID (Unique Identifer):

$ c66 deploy --stack <stack_UID>

or

$ c66 deploy -s <stack_UID>

You can retrieve the UID of a stack using the list command. Through the Cloud 66 interface, click on your stack, then click on the cog and select the stack information view to retrieve the UID: stack_uid

There is a command to save a default stack UID:

$ c66 save --stack <stack_UID>

or

$ c66 save -s <stack_UID>

Note: The stack is saved in your current folder (.cloud66/stack.json) and only one default stack will be saved per folder.

When your stack UID is saved, you are able to use other commands without specify the stack UID. For instance, it allows you to deploy a stack without putting the stack UID every time:

$ c66 deploy

you can use a short-cut for this command:

$ c66 d

You can save multiple stack UID by giving an alias to a specific stack:

$ c66 save --stack <stack_UID> --alias <stack_alias>

Then you can use commands and specific a stack's alias, like so:

$ c66 deploy -s <stack_alias>

Settings of a Stack

It is possible to retrieve the settings of a specified stack and to easily modify them:

To display the settings:

$ c66 settings --stack <stack_UID>

or

$ c66 settings -s <stack_UID>

If a default stack UID is saved:

$ c66 settings

To modify a setting:

$ c66 set --stack <stack_UID> --setting_name <setting_name> --value <value>

or

$ c66 set -s <stack_UID> -n <setting_name> -v <value>

If a default stack UID is saved:

$ c66 set --setting_name <setting_name> --value <value>

or

$ c66 set -n <setting_name> -v <value>

Lease an IP address (version ≥ 0.1.91)

You can allow an IP address to connect temporarily to the specific stack through ssh (22):

$ c66 lease --stack <stack_UID> --ip-address <ip_address> --time-to-open <time_to_open>

or

$ c66 lease -s <stack_UID> -i <ip_address> -t <time_to_open>

Options ip-address and time-to-open are optional. By default:

  • ip-address : your IP address
  • time-to-open : 20 minutes

To allow your own IP address to connect temporarily to the specific stack:

$ c66 lease --stack <stack_UID>

If a default stack UID is saved:

$ c66 lease

Download your backup (version ≥ 0.1.91)

You can download a backup if you installed managed backups on your stack. This feature will concatenate separate files into one automatically if your backup consists of numerous files.

$ c66 download_backup -b <backup_id>

You can retrieve the backup ID by accessing the "Managed backups" page through the Cloud 66 interface. Click on your stack and then on the managed backup icon in front of your database group, and your backup IDs should be visible.

Information of your toolbelt settings

At any time, you can see your toolbelt settings, it includes the version of the toolbelt but also some information about your saved stacks:

$ c66 info

Contributing

  1. Fork it
  2. Create your feature branch git checkout -b my-new-feature
  3. Commit your changes git commit -am 'Add some feature'
  4. Push to the branch git push origin my-new-feature
  5. Create new Pull Request