Jump to: navigation, search

Difference between revisions of "SDK-Development/PythonOpenStackSDK"

(Resources)
(20 intermediate revisions by 6 users not shown)
Line 3: Line 3:
 
= Summary =
 
= Summary =
  
This is a '''proposed''' OpenStack project that is designed to improve the experience of OpenStack end-users by consolidating the various OpenStack python-* client back-ends and common code into a unified, well designed and user focused SDK ("Software Development Toolkit").
+
The OpenStack SDK is an project to improve the overall experience of users of OpenStack clouds, from application developers to operators, by providing one place to work with OpenStack's many services. As a a software development kit, the project aims to offer a complete set of libraries to work with OpenStack services, as well as complete documentation and examples for working with the ecosystem.
  
'''Detailed Description''':
+
=== Detailed Description ===
  
Currently, OpenStack's end user stories for both command-line and application developer consumers of OpenStack based clouds is confusing, fractured and inconsistent. This means that if a non-operator or OpenStack developer attempts to consume more than a single service from a deployed OpenStack system they face an uphill battle. With at least 22 individual python-* clients to install to build a consuming application, each with different APIs and nuances, it becomes increasingly difficult to consume OpenStack clouds.
+
Currently, OpenStack's user stories for both command-line and application developer consumers of OpenStack based clouds is confusing, fractured, and inconsistent. If a consumer who is not "in the know" - read: not an operator or developer involved in creation of OpenStack - attempts to consume more than one service, their complexity increases almost linearly. With each service currently providing its own client, which includes both the library and a command line tool, the number of dependencies along with the varying interfaces used by them offers a less than welcoming experience.
  
The Unified SDK proposes a new project with a single API namespace ("openstack") that would provide users with a single point of entry and series of supporting functions/methods from which to build applications and tools. As a side effect of this consolidation, it becomes very easy to derive a unified CLI, such as openstackclient, or specialized per-service CLI tools. However, it is important that the definition of SDK -- the compilation of the APIs and developer functions -- and CLI tools stay separate as it is easy to conflate the idea of "clients," which is the state we have today.  
+
The python-openstacksdk project is an attempt at providing one place for consumers of OpenStack clouds to look for their interactions. It aims to provide a clean and consistent interface to write Python code that works with any service that your OpenStack cloud provides. Given that it will provide one entry point for working with OpenStack, it then becomes easier for tools to build on top of, such as command line tools, including OpenStackClient.
  
Once the initial work to create the Unified SDK is complete; the next stage would be to collapse the individual python-* clients and use this as their logical backends.
+
=== What's in an SDK? ===
  
The project is under active development, and will be moving to the regular OpenStack meeting schedule soon.
+
The root of a complete SDK is a consumer focused set of libraries for interacting with the system. It additionally includes:
 
+
* Documentation aimed at users consuming OpenStack clouds, whether internally at their company or commercially available
'''What's in an SDK?''':
+
* Documentation aimed at OpenStack developers, enabling them to extend libraries or contribute their own libraries, including extensions
 
+
* Examples of usage, including fully functional applications that demo the various services the SDK works with
An SDK is more than just a set of APIs provided to you. A complete SDK provides a consumer focused API for interacting with the system, and it additionally includes:
 
* Documentation aimed at users consuming the SDK and system.
 
* Clear examples of usage, including functioning, executable examples.
 
  
 
= Audience =
 
= Audience =
 
There are two key audiences for this project:
 
There are two key audiences for this project:
  
* '''Application Developers''': Application developers are not OpenStack Operators or Developers. These are developers looking to '''consume''' a feature-rich OpenStack Cloud with its many services. These Developers require a consistent, single namespace API ("Application Programming Interface") that allows them to build and deploy their application with minimal dependencies.
+
* Application Developers: Application developers are consumers of OpenStack clouds. While they can be operators or contributors to the services themselves, the primary application developer persona is anyone wanting to develop an application to leverage one or more services provided by OpenStack. These developers require a consistent set of usable APIs with minimal dependencies to manage.
* '''Command line consumers''': These are similar to the Application Developers, as their requirements are to use a consistent, single binary/script to interact with OpenStack Clouds. The commands they use should follow a consistent command line format, terminology and not require a large number of child dependencies to be installed onto the system.
+
* Command line Users: These are similar to the Application Developers, as their requirements include a consistent set of interactions but they're carried out through a single executable that communicates with their OpenStack cloud. As with Application Developers, minimal dependencies to complete their tasks is of high importance.
 +
 
 +
Important to both audiences is that terminology is jargon free and doesn't use nicknames or require knowledge of project history or internals. For example, working with the compute service should be done through library or command line interactions utilizing the compute name, not Nova.
  
 
= Resources =
 
= Resources =
 
{| border="1" cellpadding="2" cellspacing="0"
 
{| border="1" cellpadding="2" cellspacing="0"
|  Source code  || https://github.com/stackforge/python-openstacksdk
+
|  Source code  || https://github.com/openstack/python-openstacksdk
 
|-
 
|-
|  Bug tracker  || https://launchpad.net/unifiedsdk
+
|  Bug tracker  || https://launchpad.net/python-openstacksdk
 
|-
 
|-
|  Blueprints || https://launchpad.net/unifiedsdk
+
|  Blueprints || https://launchpad.net/python-openstacksdk
 
|-
 
|-
Developer doc
+
User Documentation || http://developer.openstack.org/sdks/python/openstacksdk/users/index.html
 
|-
 
|-
| Etherpad Notes || https://etherpad.openstack.org/p/unified-sdk-notes
+
| Contributor Documentation || http://developer.openstack.org/sdks/python/openstacksdk/contributors/index.html
 
|}
 
|}
 
:
 
:
  
 
= Project Outline =  
 
= Project Outline =  
:
+
 
== Requirements ==
+
=== Requirements ===
 
* Verified mocks/stubs for testing at all layers.
 
* Verified mocks/stubs for testing at all layers.
 
* python-requests based REST client (built as "requests first").
 
* python-requests based REST client (built as "requests first").
Line 53: Line 52:
 
* Vendors / Hosts of OpenStack Clouds should be able to easily layer in or plug into the SDK in order to make necessary changes or customizations, and to easily package and ship without requiring a complete fork of the codebase.  
 
* Vendors / Hosts of OpenStack Clouds should be able to easily layer in or plug into the SDK in order to make necessary changes or customizations, and to easily package and ship without requiring a complete fork of the codebase.  
 
* No "Least Common Denominator". The client (Layer 4) code for keystoneclient might be in openstack.api.auth, but it would be able to be as advanced as it would like from an api standpoint, and whatever subset of functionality could be exposed in higher level abstractions (such as a CLI). Bonus is that horizon could potentially use this work.
 
* No "Least Common Denominator". The client (Layer 4) code for keystoneclient might be in openstack.api.auth, but it would be able to be as advanced as it would like from an api standpoint, and whatever subset of functionality could be exposed in higher level abstractions (such as a CLI). Bonus is that horizon could potentially use this work.
 
== Non-Requirements ("Things Not To Do") ==
 
* Do not use setuptools/distutils "[http://pythonhosted.org/setuptools/setuptools.html#dynamic-discovery-of-services-and-plugins entry points]" for plugins or vendor additions. Doing so prevents single binary builds on Windows and other platforms.
 
* Take code and ideas from the other python-* clients, but ''do not wrap them'' as openstackclient (currently) does.
 
* Do not mix the CLI implementation with the SDK. The SDK can have helpers for auth caching and retries, etc, but should not get involved in the CLI implementation aspect.
 
:
 
  
 
= IRC =
 
= IRC =
 
+
The developers use IRC in #openstack-sdks on freenode for development discussion.
The developers use IRC in ##openstack-sdks on freenode for development discussion.
 
  
 
= Meetings =
 
= Meetings =
* The weekly Unified SDK [[Meetings/UnifiedSDK|IRC meeting]] is held on TBD at [http://www.timeanddate.com/worldclock/fixedtime.html?msg=UnifiedSDK+Meeting&iso=20131015T16 1600 UTC.]
+
* The weekly Python-OpenStackSDK [[Meetings/PythonOpenStackSDK|IRC meeting]] is held at 1900 UTC in #openstack-meeting-3
* [http://eavesdrop.openstack.org/meetings/sdk_team_meeting/2014/ 2014 Unified SDK Meeting Archive]
+
* [http://eavesdrop.openstack.org/meetings/python_openstacksdk/2014/ 2014 python-openstacksdk Meeting Archive]
:
+
* [http://eavesdrop.openstack.org/meetings/python_openstacksdk/2015/ 2015 python-openstacksdk Meeting Archive]
  
 
= Frequently Asked Questions =
 
= Frequently Asked Questions =
Please see our [[UnifiedSDK/FAQ|FAQ]] for answers to common questions about the Unified SDK.
+
Please see our [[PythonOpenStackSDK/FAQ|FAQ]] for answers to common questions about the Python OpenStack SDK.

Revision as of 13:13, 17 February 2016

Summary

The OpenStack SDK is an project to improve the overall experience of users of OpenStack clouds, from application developers to operators, by providing one place to work with OpenStack's many services. As a a software development kit, the project aims to offer a complete set of libraries to work with OpenStack services, as well as complete documentation and examples for working with the ecosystem.

Detailed Description

Currently, OpenStack's user stories for both command-line and application developer consumers of OpenStack based clouds is confusing, fractured, and inconsistent. If a consumer who is not "in the know" - read: not an operator or developer involved in creation of OpenStack - attempts to consume more than one service, their complexity increases almost linearly. With each service currently providing its own client, which includes both the library and a command line tool, the number of dependencies along with the varying interfaces used by them offers a less than welcoming experience.

The python-openstacksdk project is an attempt at providing one place for consumers of OpenStack clouds to look for their interactions. It aims to provide a clean and consistent interface to write Python code that works with any service that your OpenStack cloud provides. Given that it will provide one entry point for working with OpenStack, it then becomes easier for tools to build on top of, such as command line tools, including OpenStackClient.

What's in an SDK?

The root of a complete SDK is a consumer focused set of libraries for interacting with the system. It additionally includes:

  • Documentation aimed at users consuming OpenStack clouds, whether internally at their company or commercially available
  • Documentation aimed at OpenStack developers, enabling them to extend libraries or contribute their own libraries, including extensions
  • Examples of usage, including fully functional applications that demo the various services the SDK works with

Audience

There are two key audiences for this project:

  • Application Developers: Application developers are consumers of OpenStack clouds. While they can be operators or contributors to the services themselves, the primary application developer persona is anyone wanting to develop an application to leverage one or more services provided by OpenStack. These developers require a consistent set of usable APIs with minimal dependencies to manage.
  • Command line Users: These are similar to the Application Developers, as their requirements include a consistent set of interactions but they're carried out through a single executable that communicates with their OpenStack cloud. As with Application Developers, minimal dependencies to complete their tasks is of high importance.

Important to both audiences is that terminology is jargon free and doesn't use nicknames or require knowledge of project history or internals. For example, working with the compute service should be done through library or command line interactions utilizing the compute name, not Nova.

Resources

Source code https://github.com/openstack/python-openstacksdk
Bug tracker https://launchpad.net/python-openstacksdk
Blueprints https://launchpad.net/python-openstacksdk
User Documentation http://developer.openstack.org/sdks/python/openstacksdk/users/index.html
Contributor Documentation http://developer.openstack.org/sdks/python/openstacksdk/contributors/index.html

Project Outline

Requirements

  • Verified mocks/stubs for testing at all layers.
  • python-requests based REST client (built as "requests first").
  • Minimize external dependencies. This includes inter-openstack-project dependencies.
  • Do not dictate a concurrency paradigm. Ensure that the design is sound, but allow users to use gevent/threads/asyncio/etc.
  • Ensure thread safety. Avoid the use of and modification of global objects.
  • Documentation must be assumption free. The target audience are not intimately familiar with the internals or designs of the services exposed by the SDK.
  • Jargon free. APIs should go by program names ("compute", "storage", "messaging"), rather than the project names ("nova", "swift", "marconi") to ensure the library is accessible to people without significant OpenStack familiarity.
  • Vendors / Hosts of OpenStack Clouds should be able to easily layer in or plug into the SDK in order to make necessary changes or customizations, and to easily package and ship without requiring a complete fork of the codebase.
  • No "Least Common Denominator". The client (Layer 4) code for keystoneclient might be in openstack.api.auth, but it would be able to be as advanced as it would like from an api standpoint, and whatever subset of functionality could be exposed in higher level abstractions (such as a CLI). Bonus is that horizon could potentially use this work.

IRC

The developers use IRC in #openstack-sdks on freenode for development discussion.

Meetings

Frequently Asked Questions

Please see our FAQ for answers to common questions about the Python OpenStack SDK.