From e1e8921b10a7a00afc99994d66039cdacc5aac8c Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Tue, 25 Nov 2014 14:17:35 +0100 Subject: [PATCH] Add devstack external plugin spec Change-Id: I173dee3d57967b1d2ffd30e4868a2832aeac97ce --- doc/source/index.rst | 2 +- specs/devstack/devstack-external-plugins.rst | 97 ++++++++++++++++++++ tools/rstcheck.py | 2 +- tox.ini | 1 + 4 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 specs/devstack/devstack-external-plugins.rst diff --git a/doc/source/index.rst b/doc/source/index.rst index 093d99e..fc3884a 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -20,7 +20,7 @@ DevStack Project Specifications :glob: :maxdepth: 2 -.. specs/devstack/* + specs/devstack/* Implemented Specifications -------------------------- diff --git a/specs/devstack/devstack-external-plugins.rst b/specs/devstack/devstack-external-plugins.rst new file mode 100644 index 0000000..d0507e6 --- /dev/null +++ b/specs/devstack/devstack-external-plugins.rst @@ -0,0 +1,97 @@ +.. + This work is licensed under a Creative Commons Attribution 3.0 Unported + License. + http://creativecommons.org/licenses/by/3.0/legalcode + +========================= +Devstack external plugins +========================= + +https://blueprints.launchpad.net/tempest/+spec/devstack-external-plugins + +Support external plugins for devstack. + +Problem description +=================== + +Devstack has a pretty strong plugin support, you just have to drop +your extra feature in the extras.d/ directory and it will +automatically parse the file and install the feature as long you have +enabled it in your local.conf. + +This all works very well but that's not very flexible for projects +that are not able to be integrated directly in devstack +core. Currently an external OpenStack project who wants to tell its +users how to test a feature has to explain how to download a file to +put in the `extras.d` directory and enabling it. + +As for integrated projects they may wants to take care of how they do +devstack directly in their own repo and get devstack to use that +instead of having to request for a change in devstack repository. + +Proposed change +=============== + +Devstack would provide a new enable_plugin function call that would be +of the following format:: + + enable_plugin + [refname] + +`name` is an arbitrary name picked for enablement, `repo` is the +full url to a git repo, and `refname` is the optional ref +description (defaulting to `master` if none is provided). + +Devstack would then checkout that repository in `${DEST}/name` and +look for a `/devstack/` directory in there from the root of the repo. + +Files in there would have : + +* `/devstack/settings` - a file that gets sourced to override global settings, + those variables become instantly available in the global namespace. +* `/devstack/plugin.sh` - dispatcher for the various phases + +Devstack when executed will then: + +* Get the configuration of the `extras.d` repos. +* Clone the extras repository to `${DEST}` +* Run all the `extras.d` scripts at a particular phase +* Run all the plugins `plugin.sh` at a particular phase + +This would let the out of tree projects that needs to communicate about their +config to export data via settings that would let the other configure based on +their setup. + +Alternatives +------------ + +The alternative would be to stay as the status quo like we have now and have +them to curl the extras file from the external repository and place it in the +`extras.d` directory. + +Implementation +============== + +Assignee(s) +----------- + +Primary assignee: + * Chmouel Boudjnah + +Other contributors: + * Sean Dague + + +Milestones +---------- + +Target Milestone for completion: + Kilo-2 + +Work Items +---------- + +* Add support in devstack. +* Get an example repository setup. +* Get a project like nova-docker to use it. + * (glusterfs is a good current candidate) diff --git a/tools/rstcheck.py b/tools/rstcheck.py index 9bf1bf5..4af6314 100755 --- a/tools/rstcheck.py +++ b/tools/rstcheck.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # Copyright 2014 Samsung Electronics # All Rights Reserved. diff --git a/tox.ini b/tox.ini index 90bd760..434ee06 100644 --- a/tox.ini +++ b/tox.ini @@ -24,3 +24,4 @@ commands = sphinx-build -b spelling doc/source doc/build/spelling [testenv:rstcheck] commands = ./tools/rstcheck.py -d specs +# ./tools/rstcheck.py -d backlog