Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 |
| 2 | .. International License. http://creativecommons.org/licenses/by/4.0 |
| 3 | .. Copyright 2017 AT&T Intellectual Property. All rights reserved. |
Rich Bennett | ac93e0e | 2017-07-19 01:36:52 -0400 | [diff] [blame] | 4 | |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 5 | Introduction |
| 6 | ============ |
| 7 | This guide describes how to create documentation for the Open Network |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 8 | Automation Platform (ONAP). ONAP projects create a variety of |
| 9 | content depending on the nature of the project. For example projects |
| 10 | delivering a platform component may have different types of content than |
Rich Bennett | 5baea46 | 2017-09-13 03:19:19 -0400 | [diff] [blame] | 11 | a project that creates libraries for a software development kit. |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 12 | The content from each project may be used together as a reference for |
Rich Bennett | 7fc6d94 | 2018-11-27 09:36:32 -0500 | [diff] [blame] | 13 | that project and/or be used in documents that are tailored to a specific |
| 14 | user audience and tasks they are performing. |
Rich Bennett | ac93e0e | 2017-07-19 01:36:52 -0400 | [diff] [blame] | 15 | |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 16 | Much of the content in this document is derived from similar |
| 17 | documentation processes used in other Linux Foundation |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 18 | Projects including OPNFV and Open Daylight. |
Rich Bennett | ac93e0e | 2017-07-19 01:36:52 -0400 | [diff] [blame] | 19 | |
Andrea Visnyei | a2eb2e2 | 2020-09-25 12:23:47 +0200 | [diff] [blame] | 20 | When is documentation required? |
| 21 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 22 | All ONAP project contributions should have corresponding documentation. |
| 23 | This includes all new features and changes to features that impact users. |
| 24 | |
| 25 | How do I create ONAP documentation? |
| 26 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 27 | ONAP documentation is written in ReStructuredText_ (an easy-to-read, |
| 28 | what-you-see-is-what-you-get, plain text markup syntax). The process for |
| 29 | creating ONAP documentation and what documents are required are |
| 30 | described in later sections of this Developer Documentation Guide. |
| 31 | |
| 32 | .. _ReStructuredText: http://docutils.sourceforge.net/rst.html |
| 33 | |
Spencer Seidel | f710065 | 2017-09-06 12:39:15 -0400 | [diff] [blame] | 34 | Why reStructuredText/Sphinx? |
| 35 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 36 | |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 37 | In the past, standard documentation methods included ad-hoc Word documents, |
| 38 | PDFs, poorly organized Wikis, and other, often closed, tools like |
| 39 | Adobe FrameMaker. The rise of DevOps, Agile, and Continuous Integration, |
| 40 | however, created a paradigm shift for those who care about documentation |
| 41 | because: |
Spencer Seidel | f710065 | 2017-09-06 12:39:15 -0400 | [diff] [blame] | 42 | |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 43 | 1. Documentation must be tightly coupled with code/product releases. |
| 44 | In many cases, particularly with open-source products, many different |
| 45 | versions of the same code can be installed in various production |
| 46 | environments. DevOps personnel must have access to the correct version |
| 47 | of documentation. |
Spencer Seidel | f710065 | 2017-09-06 12:39:15 -0400 | [diff] [blame] | 48 | |
| 49 | 2. Resources are often tight, volunteers scarce. With a large software base |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 50 | like ONAP, a small team of technical writers, even if they are also |
| 51 | developers, cannot keep up with a constantly changing, large code base. |
| 52 | Therefore, those closest to the code should document it as best they can, |
| 53 | and let professional writers edit for style, grammar, and consistency. |
Spencer Seidel | f710065 | 2017-09-06 12:39:15 -0400 | [diff] [blame] | 54 | |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 55 | Plain-text formatting syntaxes, such as reStructuredText, Markdown, |
| 56 | and Textile, are a good choice for documentation because: |
Rich Bennett | 5baea46 | 2017-09-13 03:19:19 -0400 | [diff] [blame] | 57 | |
| 58 | a. They are editor agnostic |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 59 | |
Rich Bennett | 5baea46 | 2017-09-13 03:19:19 -0400 | [diff] [blame] | 60 | b. The source is nearly as easy to read as the rendered text |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 61 | |
Rich Bennett | 5baea46 | 2017-09-13 03:19:19 -0400 | [diff] [blame] | 62 | c. Documentation can be treated exactly as source code is (e.g. versioned, |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 63 | diff'ed, associated with commit messages that can be included |
| 64 | in rendered docs) |
| 65 | |
Rich Bennett | 5baea46 | 2017-09-13 03:19:19 -0400 | [diff] [blame] | 66 | d. Shallow learning curve |
Spencer Seidel | f710065 | 2017-09-06 12:39:15 -0400 | [diff] [blame] | 67 | |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 68 | The documentation team chose reStructuredText largely because of Sphinx, |
| 69 | a Python-based documentation build system, which uses reStructuredText |
| 70 | natively. In a code base as large as ONAP's, cross-referencing between |
| 71 | component documentation was deemed critical. Sphinx and reStructuredText |
| 72 | have built-in functionality that makes collating and cross-referencing |
| 73 | component documentation easier. |
Spencer Seidel | f710065 | 2017-09-06 12:39:15 -0400 | [diff] [blame] | 74 | |
| 75 | Which docs should go where? |
| 76 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 77 | |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 78 | Frequently, developers ask where documentation should be created. Should |
| 79 | they always use reStructuredText/Sphinx? Not necessarily. Is the wiki |
| 80 | appropriate for anything at all? Yes. |
Spencer Seidel | f710065 | 2017-09-06 12:39:15 -0400 | [diff] [blame] | 81 | |
| 82 | It's really up to the development team. Here is a simple rule: |
| 83 | |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 84 | The more tightly coupled the documentation is to a particular version |
| 85 | of the code, the more likely it is that it should be stored with the |
| 86 | code in reStructuredText. |
Spencer Seidel | f710065 | 2017-09-06 12:39:15 -0400 | [diff] [blame] | 87 | |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 88 | The doc team encourages component teams to store as much documentation |
| 89 | as reStructuredText as possible because: |
Spencer Seidel | f710065 | 2017-09-06 12:39:15 -0400 | [diff] [blame] | 90 | |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 91 | 1. It is easier to edit component documentation for grammar, |
| 92 | spelling, clarity, and consistency. |
Spencer Seidel | f710065 | 2017-09-06 12:39:15 -0400 | [diff] [blame] | 93 | |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 94 | 2. A consistent formatting syntax across components will allow |
| 95 | flexibility in producing different kinds of output. |
Spencer Seidel | f710065 | 2017-09-06 12:39:15 -0400 | [diff] [blame] | 96 | |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 97 | 3. It is easier to re-organize the documentation. |
Spencer Seidel | f710065 | 2017-09-06 12:39:15 -0400 | [diff] [blame] | 98 | |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 99 | 4. Wiki articles tend to grow in size and not maintained making it hard |
| 100 | to find current information. |
Rich Bennett | ac93e0e | 2017-07-19 01:36:52 -0400 | [diff] [blame] | 101 | |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 102 | Structure |
| 103 | --------- |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 104 | A top level master document structure is used to organize all |
| 105 | documents created by ONAP projects and this resides in the gerrit doc |
| 106 | repository. Complete documents or guides may reside here and |
| 107 | reference parts of source for documentation from other project |
| 108 | repositories. Other ONAP projects will provide content that |
| 109 | is referenced from this structure. |
Rich Bennett | ac93e0e | 2017-07-19 01:36:52 -0400 | [diff] [blame] | 110 | |
| 111 | :: |
| 112 | |
Andrea Visnyei | 3f01883 | 2020-06-18 13:25:04 +0200 | [diff] [blame] | 113 | docs |
| 114 | ├── guides |
| 115 | │ ├── active-projects |
| 116 | │ ├── onap-developer |
| 117 | │ │ ├── apiref |
| 118 | │ │ ├── architecture |
| 119 | │ │ │ └── media |
| 120 | │ │ ├── developing |
| 121 | │ │ ├── how-to-use-docs |
| 122 | │ │ ├── tutorials |
| 123 | │ │ └── use-cases |
| 124 | │ ├── onap-operator |
| 125 | │ │ ├── cloud_site |
| 126 | │ │ │ ├── aws |
| 127 | │ │ │ ├── azure |
| 128 | │ │ │ ├── k8s |
| 129 | │ │ │ ├── openstack |
| 130 | │ │ │ └── vmware |
| 131 | │ │ ├── onap-portal-admin |
| 132 | │ │ │ └── attachments |
| 133 | │ │ └── settingup |
| 134 | │ ├── onap-provider |
| 135 | │ ├── onap-user |
| 136 | │ │ ├── configure |
| 137 | │ │ │ ├── change_config |
| 138 | │ │ │ ├── pnf_connect |
| 139 | │ │ │ └── vnf_connect |
| 140 | │ │ ├── design |
| 141 | │ │ │ ├── control-loop |
| 142 | │ │ │ │ └── media |
| 143 | │ │ │ ├── media |
| 144 | │ │ │ ├── parameter_resolution |
| 145 | │ │ │ │ └── ubuntu_example |
| 146 | │ │ │ │ ├── cba-after-enrichment |
| 147 | │ │ │ │ │ ├── Definitions |
| 148 | │ │ │ │ │ ├── Templates |
| 149 | │ │ │ │ │ └── TOSCA-Metadata |
| 150 | │ │ │ │ ├── cba-before-enrichment |
| 151 | │ │ │ │ │ ├── Definitions |
| 152 | │ │ │ │ │ ├── Templates |
| 153 | │ │ │ │ │ └── TOSCA-Metadata |
| 154 | │ │ │ │ └── ubuntuCDS_heat |
| 155 | │ │ │ ├── pre-onboarding |
| 156 | │ │ │ │ └── media |
| 157 | │ │ │ ├── resource-onboarding |
| 158 | │ │ │ │ └── media |
| 159 | │ │ │ ├── service-design |
| 160 | │ │ │ │ └── media |
| 161 | │ │ │ ├── service-distribution |
| 162 | │ │ │ │ └── media |
| 163 | │ │ │ └── vfcreation |
| 164 | │ │ │ └── media |
| 165 | │ │ ├── instantiate |
| 166 | │ │ │ ├── instantiation |
| 167 | │ │ │ │ ├── nbi |
| 168 | │ │ │ │ ├── pnf_instance |
| 169 | │ │ │ │ ├── service_instance |
| 170 | │ │ │ │ ├── so1 |
| 171 | │ │ │ │ ├── so2 |
| 172 | │ │ │ │ ├── uui |
| 173 | │ │ │ │ ├── vid |
| 174 | │ │ │ │ ├── virtual_link_instance |
| 175 | │ │ │ │ └── vnf_instance |
| 176 | │ │ │ └── pre_instantiation |
| 177 | │ │ └── onap-portal-user |
| 178 | │ │ └── attachments |
| 179 | │ └── overview |
| 180 | │ └── media |
| 181 | ├── release |
| 182 | ├── templates |
| 183 | │ ├── collections |
| 184 | │ └── sections |
| 185 | └── use-cases |
| 186 | |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 187 | |
| 188 | Source Files |
| 189 | ------------ |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 190 | All documentation for project repositories should be structured and stored |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 191 | in or below `<your_project_repo>/docs/` directory as Restructured Text. |
| 192 | ONAP jenkins jobs that verify and merge documentation are triggered by |
Rich Bennett | 5baea46 | 2017-09-13 03:19:19 -0400 | [diff] [blame] | 193 | RST file changes in the top level docs directory and below. |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 194 | |
Rich Bennett | 5baea46 | 2017-09-13 03:19:19 -0400 | [diff] [blame] | 195 | Licensing |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 196 | --------- |
| 197 | All contributions to the ONAP project are done in accordance with the |
| 198 | ONAP licensing requirements. Documentation in ONAP is contributed |
| 199 | in accordance with the `Creative Commons 4.0 <https://creativecommons.org/licenses/by/4.0/>`_ license. |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 200 | All documentation files need to be licensed using the text below. |
| 201 | The license may be applied in the first lines of all contributed RST |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 202 | files: |
| 203 | |
| 204 | .. code-block:: bash |
| 205 | |
| 206 | .. This work is licensed under a Creative Commons Attribution 4.0 International License. |
Rich Bennett | c599566 | 2017-10-18 15:27:52 -0400 | [diff] [blame] | 207 | .. http://creativecommons.org/licenses/by/4.0 |
| 208 | .. Copyright YEAR ONAP or COMPANY or INDIVIDUAL |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 209 | |
| 210 | These lines will not be rendered in the html and pdf files. |
| 211 | |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 212 | When there are subsequent, significant contributions to a source file |
| 213 | from a different contributor, a new copyright line may be appended |
| 214 | after the last existing copyright line. |