You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

What is cloudmonkey?

cloudmonkey is a command line interface (CLI) tool written in python that leverages 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. It is unofficially distributed by community maintained distribution at the cheese shop http://pypi.python.org/pypi/cloudmonkey/ as well as 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>
  • Pipeable output and shell execution
  • Colored output

Installation

Requirements

cloudmonkey requires Python 2.5 or above and has following dependencies:

readline
clint

Platform independent installation

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

$ pip install cloudmonkey

To upgrade:

$ pip install --upgrade cloudmonkey

Thought a clean upgrade is recommended:

$ pip uninstall cloudmonkey
$ pip install cloudmonkey

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

$ yum install python-setuptools
$ easy_install cloudmonkey

or if pip available (pip is recommended)

$ pip install cloudmonkey

Ubuntu/Debian

$ apt get python-setuptools
$ easy_install cloudmonkey

or if pip available (pip is recommended)

$ pip install cloudmonkey

Building from source code withing source code

$ git clone https://git-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

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:

$ 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>

  • No labels