2015/07/20 - Apache Deltacloud has been retired.

For more information, please explore the Attic.


deltacloudc is being deprecated

The deltacloudc command line tool is being deprecated. For now the code making up deltacloudc has been moved to the /deltacloud/clients/console directory but will ultimately be removed from the repo. If the command line client is important to you then please let us know. A new command line client may be put onto the roadmap if there is demand for one.

The deltacloud core developers use (almost exclusively) cURL as a command line client for working with a deltacloud server. You can find more information on working with cURL against deltacloud here.



/deprecated:




Using Deltacloud command tool

Installing the Deltacloud Ruby client also gives you the deltacloudc command line tool. This executable uses the Deltacloud client library to speak to the Deltacloud server through the Deltacloud REST API. This means that you can control your cloud infrastructure from the command line. The general usage pattern for deltacloudc is:

$ deltacloudc collection operation [options]
Collection
refers to the Deltacloud object collections, such as Instances, Images, Buckets, Realms etc., as described in a greater detail in the Deltacloud REST API documentation.
Operation
is collection dependant. All collections respond to 'index' and 'show' operations (retrieve details on all objects in a given collection or on a specific object). Some collections respond to 'create' and 'destroy' operations. The collection of instances (realized virtual servers) responds to operations for managing the instance lifecycle, such as 'stop' or 'reboot'.
Options
are listed by invoking deltacloudc -h. The important option is -u, which specifies the API_URL, where the Deltacloud server is running. The API_URL takes the form of http://[user]:[password]@[api_url]:[port]/[api]. Alternatively, you can set the API_URL environment variable (e.g., export API_URL=http://mockuser:mockpassword@localhost:3001/api). If your username or your password contains special characters, it's necessary to use options -U and -P in addition to the option -u. Check the list of credentials you need for each back-end cloud provider.

The following examples assume that the Deltacloud server is running on your local machine port 3001 (the deltacloudd server daemon defaults to 'localhost:3001') and that it was started with the 'mock' provider (i.e. deltacloudd -i mock ).

List all collections available in the current driver:

$ deltacloudc -l -u http://mockuser:mockpassword@localhost:3001/api

Get a list of all images:

$ deltacloudc images index -u http://mockuser:mockpassword@localhost:3001/api

List all operations for the buckets collection:

$ deltacloudc buckets -l -u http://mockuser:mockpassword@localhost:3001/api

Create a new blob in the bucket called 'bucket1':

$ deltacloudc blob create -i 'my_new_blob' -b 'bucket1' -f /home/marios/file.txt