Jclouds CLI provides two types of command line interface:
To install the jclouds cli you just need to download the zip or the tarball and extract it to the folder of your choice.
You can use the jclouds cli to perform misc operations, such as creating a node, run scripts on a node, list nodes, destroy a node etc. The cli also supports blobstore, so you can create, delete or access a blobstore.
To use the cli: ./bin/jclouds [category] [action] [options] [arguments].
Some examples: To create 10 nodes on EC2 under group: myGroupName using Ubuntu 10.04
To list all nodes:
To destroy a node:
APIs work in the same manner as providers, but you will also need to specify the endpoint.
To start the interactive shell: ./bin/jclouds-cli
The are two ways of configuring a provider or api, when using the interactive mode:
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:
To list the available compute or blobstore services:
You can also remove one of the services:
Installing additional providers and api The interactive version of the cli will have out of the box installed support for the mainstream providers and apis. To enable the any other provider or api, you will need to enable it. This is done using the features commands.
List the available jclouds modules:
To install an additional api (say cloudstack)
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_COMPUTE_PROVIDER
JCLOUDS_COMPUTE_API
JCLOUDS_COMPUTE_ENDPOINT
JCLOUDS_COMPUTE_IDENTITY
JCLOUDS_COMPUTE_CREDENTIAL
JCLOUDS_BLOBSTORE_PROVIDER
JCLOUDS_BLOBSTORE_API
JCLOUDS_BLOBSTORE_ENDPOINT
JCLOUDS_BLOBSTORE_IDENTITY
JCLOUDS_BLOBSTORE_CREDENTIAL