Merge pull request #2 from abayer/master

Fix sshj spam
tree: 864930ff33b3d2529ddafb50fd80ff098cf76cb6
  1. assembly/
  2. branding/
  3. runner/
  4. .gitignore
  5. pom.xml
  6. README.md
README.md

jclouds-cli

Jclouds CLI provides two types of command line interface:

  • An interactive shell.
  • A shell script.

Installation

To install the jclouds cli you just need to download the zip or the tarball and extract it to the folder of your choice.

Using the interactive shell

To start the interactive shell: ./bin/jclouds-cli

The are two ways of configuring a provider or api, when using the interactive mode:

  • As command options
  • As a Service

All commands support the following options that you can use: --provider (use this for apis too), --identity, --credential --endpoint.

For example, in a fresh installation you can simple:

If you want to avoid passing the same options all the time, you can configure the provider or the api once and reuse it. To configure the provider or the api:

For compute providers & apis:

For blobstore providers or apis:

These commands, will create a new configuration with the filename specified as an argument. Each configuration will be assigned a new unique id, which you can use if you need to edit or delete the config in the future.

Once the service is configured, you can verify the service installation using:

Using the CLI

To use the cli: ./bin/jclouds [category] [action] [options] [arguments].

  • Categories: node, group, image, location, hardware.
  • Actions: list, create, destroy, runscript.
  • Options: --provider(use this for apis too), --identity, --credential --endpoint etc.

Some examples: To create 10 nodes on EC2 under group: myGroupName using Ubuntu 10.04

To list all nodes:

To destroy a node:

Leveraging environmental variables

Both in the interactive shell and cli modes, you may find repeating the provider information again and again not really friendly. You can completely skip those options by sepcifying them as environmental variables.

Supported variables:

  • JCLOUDS_PROVIDER
  • JCLOUDS_IDENTITY
  • JCLOUDS_CREDENTIAL