New inventory library

Registered by Kevin Carter

Overview
########

Ponder the idea of moving the dynamic_inventory.py script into an application that has entry points and a library that can be extended to support multiple storage backends; ie sql, reddis, json...

Problem Description
-------------------

Presently the dynamic_inventory.py script is a bit one dementional. while it works well enough to build / scale out an infrastructure of both physical and container nodes it could be better developed, implement testing, and provide for a user importable API.

Proposed Change
---------------

* The present dynamic_inventory.py would be changed to a wrapper script / function.
* The new lib would be installable with the ability to provide / scale inventory as well as manage it.

Playbook Impact
---------------

None

Alternatives
------------

leave things the way they are.

Security Impact
---------------

No impact on the library, though providing multiple storage backends for the library would open the inventory storage to possible attack vectors assuming the user used a shared storage system as the backend.

Performance Impact
------------------

None

End User Impact
---------------

None

Deployer Impact
---------------

The deployer would have to be aware of the inventory library in the sense that they would need to install it. Besides the added dependencies there shouldnt be a specific deployer impact.

Developer Impact
----------------

Added software dependencies.

Dependencies
------------

None

Documentation Impact
--------------------

The new lib / entry point scripts would need to be documented.

References
----------

None

Blueprint information

Status:
Started
Approver:
None
Priority:
Medium
Drafter:
Kevin Carter
Direction:
Needs approval
Assignee:
None
Definition:
Discussion
Series goal:
Accepted for trunk
Implementation:
Started
Milestone target:
None
Started by
Jesse Pretorius

Related branches

Sprints

Whiteboard

This should probably also incorporate changes to the inventory-manage.py script, so that operators can have fine-grained control over the inventory.

Gerrit topic: https://review.openstack.org/#q,topic:bp/dynamic-inventory-lib,n,z

Addressed by: https://review.openstack.org/242225
    Add testing for dynamic_inventory.py

Addressed by: https://review.openstack.org/269236
    WIP New Inventory Library

Addressed by: https://review.openstack.org/287586
    WIP Dynamic Inventory Library

Addressed by: https://review.openstack.org/375757
    Move base environment directory to an argument

Gerrit topic: https://review.openstack.org/#q,topic:dynamic-inventory-lib,n,z

Addressed by: https://review.openstack.org/383084
    Move management code to inventory lib.

Addressed by: https://review.openstack.org/383159
    Move inventory generation code into lib

Addressed by: https://review.openstack.org/383920
    Check for configured groups in the environment

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.