Dean Troyer | 0986a7b | 2014-10-29 22:08:13 -0500 | [diff] [blame] | 1 | ============ |
| 2 | Contributing |
| 3 | ============ |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 4 | |
| 5 | DevStack uses the standard OpenStack contribution process as outlined in |
| 6 | `the OpenStack wiki 'How To |
| 7 | Contribute' <https://wiki.openstack.org/wiki/How_To_Contribute>`__. This |
| 8 | means that you will need to meet the requirements of the Contribututors |
| 9 | License Agreement (CLA). If you have already done that for another |
| 10 | OpenStack project you are good to go. |
| 11 | |
| 12 | Things To Know |
| 13 | ~~~~~~~~~~~~~~ |
| 14 | |
| 15 | | |
| 16 | | **Where Things Are** |
| 17 | |
| 18 | The official DevStack repository is located at |
| 19 | ``git://git.openstack.org/openstack-dev/devstack.git``, replicated from |
| 20 | the repo maintained by Gerrit. GitHub also has a mirror at |
| 21 | ``git://github.com/openstack-dev/devstack.git``. |
| 22 | |
| 23 | The `blueprint <https://blueprints.launchpad.net/devstack>`__ and `bug |
| 24 | trackers <https://bugs.launchpad.net/devstack>`__ are on Launchpad. It |
| 25 | should be noted that DevStack generally does not use these as strongly |
| 26 | as other projects, but we're trying to change that. |
| 27 | |
| 28 | The `Gerrit review |
| 29 | queue <https://review.openstack.org/#/q/project:openstack-dev/devstack,n,z>`__ |
| 30 | is, however, used for all commits except for the text of this website. |
| 31 | That should also change in the near future. |
| 32 | |
| 33 | | |
| 34 | | **HACKING.rst** |
| 35 | |
| 36 | Like most OpenStack projects, DevStack includes a ``HACKING.rst`` file |
| 37 | that describes the layout, style and conventions of the project. Because |
| 38 | ``HACKING.rst`` is in the main DevStack repo it is considered |
| 39 | authoritative. Much of the content on this page is taken from there. |
| 40 | |
| 41 | | |
| 42 | | **bashate Formatting** |
| 43 | |
| 44 | Around the time of the OpenStack Havana release we added a tool to do |
| 45 | style checking in DevStack similar to what pep8/flake8 do for Python |
| 46 | projects. It is still \_very\_ simplistic, focusing mostly on stray |
| 47 | whitespace to help prevent -1 on reviews that are otherwise acceptable. |
| 48 | Oddly enough it is called ``bashate``. It will be expanded to enforce |
| 49 | some of the documentation rules in comments that are used in formatting |
| 50 | the script pages for devstack.org and possibly even simple code |
| 51 | formatting. Run it on the entire project with ``./run_tests.sh``. |
| 52 | |
| 53 | Code |
| 54 | ~~~~ |
| 55 | |
| 56 | | |
| 57 | | **Repo Layout** |
| 58 | |
| 59 | The DevStack repo generally keeps all of the primary scripts at the root |
| 60 | level. |
| 61 | |
| 62 | ``docs`` - Contains the source for this website. It is built using |
| 63 | ``tools/build_docs.sh``. |
| 64 | |
| 65 | ``exercises`` - Contains the test scripts used to validate and |
| 66 | demonstrate some OpenStack functions. These scripts know how to exit |
| 67 | early or skip services that are not enabled. |
| 68 | |
| 69 | ``extras.d`` - Contains the dispatch scripts called by the hooks in |
| 70 | ``stack.sh``, ``unstack.sh`` and ``clean.sh``. See `the plugins |
| 71 | docs <plugins.html>`__ for more information. |
| 72 | |
| 73 | ``files`` - Contains a variety of otherwise lost files used in |
| 74 | configuring and operating DevStack. This includes templates for |
| 75 | configuration files and the system dependency information. This is also |
| 76 | where image files are downloaded and expanded if necessary. |
| 77 | |
| 78 | ``lib`` - Contains the sub-scripts specific to each project. This is |
| 79 | where the work of managing a project's services is located. Each |
| 80 | top-level project (Keystone, Nova, etc) has a file here. Additionally |
| 81 | there are some for system services and project plugins. |
| 82 | |
| 83 | ``samples`` - Contains a sample of the local files not included in the |
| 84 | DevStack repo. |
| 85 | |
| 86 | ``tests`` - the DevStack test suite is rather sparse, mostly consisting |
| 87 | of test of specific fragile functions in the ``functions`` file. |
| 88 | |
| 89 | ``tools`` - Contains a collection of stand-alone scripts, some of which |
| 90 | have aged a bit (does anyone still do ramdisk installs?). While these |
| 91 | may reference the top-level DevStack configuration they can generally be |
| 92 | run alone. There are also some sub-directories to support specific |
| 93 | environments such as XenServer. |