README.rst 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. cloudbridge
  2. ===========
  3. cloudbridge aims to provide a simple layer of abstraction over
  4. different cloud providers, reducing or eliminating the need to write
  5. conditional code for each cloud. It is currently under development and is in
  6. the Alpha state.
  7. .. image:: https://landscape.io/github/gvlproject/cloudbridge/master/landscape.svg?style=flat
  8. :target: https://landscape.io/github/gvlproject/cloudbridge/master
  9. :alt: Landscape Code Health
  10. .. image:: https://coveralls.io/repos/gvlproject/cloudbridge/badge.svg?branch=master&service=github
  11. :target: https://coveralls.io/github/gvlproject/cloudbridge?branch=master
  12. :alt: Code Coverage
  13. .. image:: https://travis-ci.org/gvlproject/cloudbridge.svg?branch=master
  14. :target: https://travis-ci.org/gvlproject/cloudbridge
  15. :alt: Travis Build Status
  16. .. image:: https://codeclimate.com/github/gvlproject/cloudbridge/badges/gpa.svg
  17. :target: https://codeclimate.com/github/gvlproject/cloudbridge
  18. :alt: Code Climate
  19. .. image:: https://img.shields.io/pypi/status/cloudbridge.svg
  20. :target: https://pypi.python.org/pypi/cloudbridge/
  21. :alt: latest version available on PyPI
  22. .. image:: https://readthedocs.org/projects/cloudbridge/badge/?version=latest
  23. :target: http://cloudbridge.readthedocs.org/en/latest/?badge=latest
  24. :alt: Documentation Status
  25. Usage example
  26. ~~~~~~~~~~~~~
  27. To `get started`_ with cloudbridge, export your cloud access credentials
  28. (e.g., AWS_ACCESS_KEY and AWS_SECRET_KEY for your AWS credentials) and start
  29. exploring the API:
  30. .. code-block:: python
  31. from cloudbridge.cloud.factory import CloudProviderFactory, ProviderList
  32. provider = CloudProviderFactory().create_provider(ProviderList.AWS, {})
  33. print(provider.security.key_pairs.list())
  34. Documentation
  35. ~~~~~~~~~~~~~
  36. Documentation can be found at https://cloudbridge.readthedocs.org.
  37. Design Goals
  38. ~~~~~~~~~~~~
  39. 1. Create a cloud abstraction layer which minimises or eliminates the need for
  40. cloud specific special casing (i.e., Not require clients to write
  41. ``if EC2 do x else if OPENSTACK do y``.)
  42. 2. Have a suite of conformance tests which are comprehensive enough that goal
  43. 1 can be achieved. This would also mean that clients need not manually test
  44. against each provider to make sure their application is compatible.
  45. 3. Opt for a minimum set of features that a cloud provider will support,
  46. instead of a lowest common denominator approach. This means that reasonably
  47. mature clouds like Amazon and OpenStack are used as the benchmark against
  48. which functionality & features are determined. Therefore, there is a
  49. definite expectation that the cloud infrastructure will support a compute
  50. service with support for images and snapshots and various machine sizes.
  51. The cloud infrastructure will very likely support block storage, although
  52. this is currently optional. It may optionally support object storage.
  53. 4. Make the cloudbridge layer as thin as possible without compromising goal 1.
  54. By wrapping the cloud provider's native SDK and doing the minimal work
  55. necessary to adapt the interface, we can achieve greater development speed
  56. and reliability since the native provider SDK is most likely to have both
  57. properties.
  58. Contributing
  59. ~~~~~~~~~~~~
  60. Community contributions for any part of the project are welcome. If you have
  61. a completely new idea or would like to bounce your idea before moving forward
  62. with the implementation, feel free to create an issue to start a discussion.
  63. Contributions should come in the form or a pull request. We strive for 100% test
  64. coverage so code will only be accepted if it comes with appropriate tests and it
  65. does not break existing functionality. Further, the code needs to be well
  66. documented and all methods have docstrings. We are largely adhering to the
  67. `PEP8 style guide`_ with 80 character lines, 4-space indentation (spaces
  68. instead of tabs), explicit, one-per-line imports among others. Please keep the
  69. style consistent with the rest of the project.
  70. Conceptually, the library is laid out such that there is a factory used to
  71. create a reference to a cloud provider. Each provider offers a set of services
  72. and resources. Services typically perform actions while resources offer
  73. information (and can act on itself, when appropriate). The structure of each
  74. object is defined via an abstract interface (see
  75. ``cloudbridge/providers/interfaces``) and any object should implement the
  76. defined interface. If adding a completely new provider, take a look at the
  77. `provider development page`_ in the documentation.
  78. .. _`get started`: http://cloudbridge.readthedocs.org/en/latest/
  79. getting_started.html
  80. .. _`PEP8 style guide`: https://www.python.org/dev/peps/pep-0008/
  81. .. _`provider development page`: http://cloudbridge.readthedocs.org/en/latest/
  82. topics/provider_development.html