Reading Time: 5 minutes

In the past you might have experienced the Command Line Cloudhub tools, and if so, you might have encountered many limitations regarding usability and options of commands.

Now, a new version with improvements that will be appreciated for any user looking for a simplified usage of CH without losing any feedback nor visibility of their actions. This tool will be of good use for support and clients especially when needing to search quickly for answers regarding entitlements and information regarding organizations and environments.

latest report
Learn why we are the Leaders in API management and iPaaS

Installing CloudHub-CLI Tool

npm install -g cloudhub-cli

Starting to use CloudHub-CLI:

cloudhub-cli [params] [command]

export CLOUDHUB_USERNAME=UserName (example)

export CLOUDHUB_PASSWORD=Password123 (example)

cloudhub-cli

 User can put the export lines in their ~/.bash_profile file or similar, type cloudhub-cli and the tool will use those values.

Another optional commands:

 export CLOUDHUB_ORG=orgName

 export CLOUDHUB_ENV=envName

Notice: If none of this commands are added, cloudhub-cli will run in interactive mode

An interesting option this tool provides user is granting the capability of logging in directly into an environment just by adding @environmentName after username when logging in.

Once logged in, a table listing all applications for the selected environment will display, providing information regarding app name, zip file, status, latest update, vcores and workers.

Screen Shot 2016-02-22 at 11.12.14 AM

Thought the command help, the system will provide not only available courses of action, but the description for each one and in case needed more information regarding syntax of usage, writing the command name next to help, will provide the information needed with required parameters and optional fields.

Screen Shot 2016-02-22 at 11.14.46 AM

A valuable feature for this tool is related to the responses regarding Environments and Business groups information. When executing environment command user will see listed information regarding permissions to and types of Environment organization has,  while business-group will show Owner, Type, Entitlements and Environments.

Screen Shot 2016-02-22 at 11.15.34 AM
Screen Shot 2016-02-22 at 11.15.16 AM

Deploying an application

The only required parameters are application name and zip file.  All other parameters are optional and will use the Cloudhub defaults if not specified

Screen Shot 2016-02-22 at 11.17.24 AM

An unique feature for the Cloudhub-CLI, is that it has the option to add properties directly from a .txt file by executing the --propertiesFile command. If you wish to add more properties, --property will add properties without overwriting the ones already in the application.Modify your app, add persistent queues, enable and disable static IP, almost all actions that can be used in deployment and settings page in CloudHub. When in need, hitting tab button will autocomplete the text and also show the available options for each command.

update

With this tool, users can modify and manage their apps, add persistent queues, enable and disable static IP, tail and download logs.This tool is really useful for integrating your workflow with CloudHub. You can use it to deploy or update a CloudHub application when your CI build succeeds, or automatically move your CloudHub application to a different region. You could even use it to warn you if someone deploys an application into your environment which is using an old runtime.  And sometimes, using your terminal is just more fun!