| 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 | 
| saradpatel | 933827c | 2014-12-19 12:09:05 +0000 | [diff] [blame] | 8 | means that you will need to meet the requirements of the Contributors | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 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 | 
| Sean Dague | 3293046 | 2014-11-18 06:51:16 -0500 | [diff] [blame] | 13 | ============== | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 14 |  | 
| Sean Dague | 3293046 | 2014-11-18 06:51:16 -0500 | [diff] [blame] | 15 | | | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 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 |  | 
| Sean Dague | 3293046 | 2014-11-18 06:51:16 -0500 | [diff] [blame] | 33 | | | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 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 |  | 
| Sean Dague | 3293046 | 2014-11-18 06:51:16 -0500 | [diff] [blame] | 41 | | | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 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 | 
| Sean Dague | 3293046 | 2014-11-18 06:51:16 -0500 | [diff] [blame] | 54 | ==== | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 55 |  | 
| Sean Dague | 3293046 | 2014-11-18 06:51:16 -0500 | [diff] [blame] | 56 | | | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 57 | | **Repo Layout** | 
|  | 58 |  | 
|  | 59 | The DevStack repo generally keeps all of the primary scripts at the root | 
|  | 60 | level. | 
|  | 61 |  | 
| Dean Troyer | ea3cdfa | 2014-11-08 08:29:16 -0600 | [diff] [blame] | 62 | ``doc`` - Contains the Sphinx source for the documentation. | 
|  | 63 | ``tools/build_docs.sh`` is used to generate the HTML versions of the | 
|  | 64 | DevStack scripts.  A complete doc build can be run with ``tox -edocs``. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 65 |  | 
| Dean Troyer | ea3cdfa | 2014-11-08 08:29:16 -0600 | [diff] [blame] | 66 | ``exercises`` - Contains the test scripts used to sanity-check and | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 67 | demonstrate some OpenStack functions. These scripts know how to exit | 
|  | 68 | early or skip services that are not enabled. | 
|  | 69 |  | 
|  | 70 | ``extras.d`` - Contains the dispatch scripts called by the hooks in | 
| Dean Troyer | ea3cdfa | 2014-11-08 08:29:16 -0600 | [diff] [blame] | 71 | ``stack.sh``, ``unstack.sh`` and ``clean.sh``. See :doc:`the plugins | 
|  | 72 | docs <plugins>` for more information. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 73 |  | 
|  | 74 | ``files`` - Contains a variety of otherwise lost files used in | 
|  | 75 | configuring and operating DevStack. This includes templates for | 
|  | 76 | configuration files and the system dependency information. This is also | 
|  | 77 | where image files are downloaded and expanded if necessary. | 
|  | 78 |  | 
|  | 79 | ``lib`` - Contains the sub-scripts specific to each project. This is | 
|  | 80 | where the work of managing a project's services is located. Each | 
|  | 81 | top-level project (Keystone, Nova, etc) has a file here. Additionally | 
|  | 82 | there are some for system services and project plugins. | 
|  | 83 |  | 
|  | 84 | ``samples`` - Contains a sample of the local files not included in the | 
|  | 85 | DevStack repo. | 
|  | 86 |  | 
|  | 87 | ``tests`` - the DevStack test suite is rather sparse, mostly consisting | 
| Dean Troyer | ea3cdfa | 2014-11-08 08:29:16 -0600 | [diff] [blame] | 88 | of test of specific fragile functions in the ``functions`` and | 
|  | 89 | ``functions-common`` files. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 90 |  | 
| Dean Troyer | ea3cdfa | 2014-11-08 08:29:16 -0600 | [diff] [blame] | 91 | ``tools`` - Contains a collection of stand-alone scripts. While these | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 92 | may reference the top-level DevStack configuration they can generally be | 
|  | 93 | run alone. There are also some sub-directories to support specific | 
|  | 94 | environments such as XenServer. |