Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

What is

...

cloudmonkey?

Panel

CloudMokey cloudmonkey is a command line interface (CLI) tool written in python that leverages CloudStack APIs. You configure CloudMonkey once, from then on - its an interactive shell that Marvin that provides cloudstackAPI. cloudmonkey can be use both as an interactive shell and as a command line tool which simplifies CS configuration and management. CloudMonkey is created as python egg and presently resides on It is unofficially distributed by community maintained distribution at the cheese shop http://pypi.python.org/pypi/cloudmonkey/ as well as source code of within the git repository in tools/cli/. It can be used with Apache CloudStack 4.0-incubating and above.

Features

  • All commands are lowercase unlike API
  • Auto-completion via double <tab>
  • Caching to speedup runtime
  • Color and Parsing fixes

...

  • Pipeable output and shell execution
  • Colored output

Installation

Requirements

cloudmonkey requires Python 2.5 or above and has following dependencies:

Code Block

readline
clint

Platform independent installation

For installing any Python package, pip is recommended: http://www.pip-installer.org/en/latest/installing.html

Code Block

$ pip install cloudmonkey

To upgrade:

Code Block

$ pip install --upgrade cloudmonkey

Thought a clean upgrade is recommended:

Code Block

$ pip uninstall cloudmonkey
$ pip install cloudmonkey

RHEL/CentOS 6.x (internet access required for python eggs repository)

Code Block
$ yum install python-setuptools
$ easy_install cloudmonkey

or if pip available (pip is recommended)

Code Block
$ pip install cloudmonkey

Ubuntu/Debian

Code Block
$ apt get python-setuptools

$ easy_install cloudmonkey

or if pip available (pip is recommended)

Code Block
$ pip install cloudmonkey

...

Building from source code withing source code

Code Block
wget http$ git clone https://pypi.python.org/packages/source/c/cloudmonkey/cloudmonkey-0.0.4.tar.gz
mkdir cloudmonkey
cd cloudmonkey-0.0.4
sudogit-wip-us.apache.org/repos/asfgit clone https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git
$ mvn clean install -P developer
$ cd tools/cli # cloudmonkey-x.x.x.tar.gz will be built in dist
$ python setup.py build
$ python setup.py install

Configuration

Test

Help

Author

cloudmonkey gets configuration from ~/.cloudmonkey_config which is it's config file in user's home directory.

Further it logs in ~/.cloudmonkey_log and stores history in ~/.cloudmonkey_history. The log and history files can be custom paths and can be configured by setting appropriate file paths in ~/.cloudmonkey_config or by command:

Code Block

$ cloudmonkey
> set history_file /usr/share/cloudmonkey_history
> set log_file /var/log/cloudmonkey

There are other parameters which can be customized:

Key

Purpose

Default

host

IP or resolvable domain of management server

localhost

port

Api server port, 8080 is encouraged over 8096

8080

apikey

User api key

""

secretkey

User secret key

""

prompt

cloudmonkey prompt, default prompt has a UTF-8 char which can be an issue

🐵 cloudmonkey>

asyncblock

Poll for async commands, making it false will cause cloudmonkey to return jobid

true

timeout

Timeout interval for polling async commands

3600

color

Enable coloured output, set to false to disable

true

log_file

Log file

~/.cloudmonkey_log

history_file

History file

~/.cloudmonkey_history

Usage

Getting started

Automation using shell

Text processing using pipes

Async Job execution

TODOs

1. Reverse search
2. Bash/zsh completion
3. Documentation

About

CloudMonkey was named after the beloved mascot of Apache CloudStack and is powered by Marvin.
Author: The Apache CloudStack Team <cloudstack-dev@incubator.apache.org>
Maintainer: Rohit Yadav <bhaisaab@apache.org>CloudMonkey CLI is written by Rohit Yadav.