CloudMonkey

5,610 views
5,433 views

Published on

This is a presentation of CloudMonkey the Apache CloudStack CLI and interfactive shell. Entirely written in Python it features auto-completion, history, help, colored output, optional prompt, raw api calls, api discovery, tabularize output. See the screencast at http://youtu.be/y6wX4UhJ_Vg

Perfect tool for sys admins to manage their cloud from the comfort of the command line. Perfect tool for developers to test new API and services on top of the CloudStack API.

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,610
On SlideShare
0
From Embeds
0
Number of Embeds
55
Actions
Shares
0
Downloads
37
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

CloudMonkey

  1. 1. CloudMonkeyThe Apache CloudStack CLI andInteractive ShellSebastien Goasguen@sebgoa
  2. 2. CloudMonkey• The CloudStack CLI and interactive shell,developed by Rohit Yadav• ~600 lines of Python• Lots of features:– Auto-completion– Tabular output– Help , scriptable, interactive shell…https://cwiki.apache.org/CLOUDSTACK/cloudstack-cloudmonkey-cli.htmlhttps://pypi.python.org/pypi/cloudmonkey/http://rohityadav.in/logs/cloudmonkey/http://www.youtube.com/watch?v=BjkGp3egv9g
  3. 3. Documentationhttps://cwiki.apache.org/CLOUDSTACK/cloudstack-cloudmonkey-cli.htmlhttp://cloudstack.apache.org/docs/en-US/index.html
  4. 4. Requirements• Cloudmonkey….– Installed from CloudStack releases– Installed via pypi• A CloudStack based cloud (remote or local viaDevCloud):– URL– API keys
  5. 5. Installation• From CloudStack releases• Unofficial releases via the pypi:$ pip install cloudmonkey• Upgrade with:$ pip install –upgrade cloudmonkeyhttp://cloudstack.apache.org/downloads.htmlhttps://pypi.python.org/pypi/cloudmonkey/http://www.pip-installer.org/en/latest/installing.html
  6. 6. API Keys• Generate API keys for the user that will accessthe cloud
  7. 7. Intro• $ cloudmonkey• ☁ Apache CloudStack ? cloudmonkey 4.0.0. Typehelp or ? to list commands.• ? cloudmonkey> set apikey plgWJfZK4gyS3mOMTVmjUVg-X-jlWlnfaUJ9GAbBbf9EdM-kAYMmAiLqzzq1ElZLYq_u38zCm0bewzGUdP66mg• ? cloudmonkey> set secretkeyVDaACYb0LV9eNjTetIOElcVQkvJck_J_QljX_FcHRj87ZKiy0z0ty0ZsYBkoXkY9b7eq1EhwJaw7FF3akA3KBQ
  8. 8. Setvariables>set port 8080>set host localhost>set color true>set prompt #>set tabularize false
  9. 9. List APIs• To list all APIs available the tab key is yourfriend.• Enter tab twice to list all possibilities• Enter tab once to auto-complete• --help to get the help for a specific call,including the required parameters
  10. 10. Config files$cd ~/.cloudmonkey$lsconfig history log$cat config[core]cache_file = /Users/sebastiengoasguen/.cloudmonkey/cachelog_file = /Users/sebastiengoasguen/.cloudmonkey/logasyncblock = trueparamcompletion = falsehistory_file =/Users/sebastiengoasguen/.cloudmonkey/history[ui]color = falseprompt = #tabularize = true…
  11. 11. Examples? cloudmonkey> list users? cloudmonkey> list virtualmachines? cloudmonkey> help list templates? cloudmonkey> deploy virtualmachine –help? cloudmonkey> list templates templatefilter=all? cloudmonkey> list serviceofferings | grep id? cloudmonkey> stop virtualmachine id=2c650856-a080-4766-a8b3-4166042ccec7
  12. 12. As a CLI(cli)sebmini:cli sebastiengoasguen$ cloudmonkey set tabularize true(cli)sebmini:cli sebastiengoasguen$ cloudmonkey list usersfilter=id,username,accountcount = 2user:+--------------------------------------+----------+---------+| id | username | account |+--------------------------------------+----------+---------+| 7ed6d5da-93b2-4545-a502-23d20b48ef2a | admin | admin || 1fea6418-5576-4989-a21e-4790787bbee3 | runseb | admin |+--------------------------------------+----------+---------+
  13. 13. Info• Apache Top Level Project (TLP)• http://cloudstack.apache.org• #cloudstack and #cloudstack-dev on irc.freenode.net• @CloudStack on Twitter• http://www.slideshare.net/cloudstack• dev-subscribe@cloudstack.apache.org• users-subscribe@cloudstack.apache.orgWelcoming contributions and feedback, Join the fun !

×