README.rst 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. ===========================================
  2. Mico: a monkey driven cloud management tool
  3. ===========================================
  4. Mico is a tool-toy to manage a number of hosts deployed in cloud services
  5. (currently only support Amazon AWS), and also allows you to deploy new hosts
  6. with specified template or create autoscaling groups and manage them easily.
  7. Installation
  8. ------------
  9. As usual, mico is available from pypi_, and can be installed using ``pip``
  10. or ``easy_install``::
  11. pip install mico
  12. Or::
  13. easy_install mico
  14. .. _pypi: http://pypi.python.org/pypi
  15. Configure Mico
  16. --------------
  17. Mico just need an AWS key ID and AWS secret key to run. By default mico just
  18. take this variables from the OS environment::
  19. export AWS_ACCESS_KEY_ID="*foo*"
  20. export AWS_SECRET_ACCESS_KEY="*bar*"
  21. Creating templates
  22. ------------------
  23. Mico works using the concept of template. A template is just a python code
  24. (with steroids which we call *libraries*), the template can implements
  25. a number of functions. Here are a simple and stupid template (``stupid.py``)
  26. .. code:: python
  27. def hello():
  28. print "Hello world!"
  29. def bye():
  30. print "Bye cruel world!"
  31. def hola(args):
  32. print "Hola %s" % args
  33. Once, your template is created, you need to put it into a mico template path
  34. (by default uses ``/etc/mico`` and ``~/.config/mico/``, and the current
  35. working directory.
  36. Then you can just run mico::
  37. mico -H my_new_host stupid:hello
  38. Hello world!
  39. mico -H my_new_host stupid:bye
  40. Bye cruel world!
  41. mico stupid:hola everyone
  42. Hola everyone
  43. You can see more complex (and useful!) templates in `examples directory`_.
  44. .. _`examples directory`: tree/master/examples