blob: ceb2eb0e65b36c525dea177ed1871f3fdffc1443 [file] [log] [blame]
Rich Bennettd504dc82018-05-31 08:40:36 -04001.. 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 Bennettac93e0e2017-07-19 01:36:52 -04004
Rich Bennett1da30462017-08-24 12:11:36 -04005Introduction
6============
7This guide describes how to create documentation for the Open Network
Rich Bennettd504dc82018-05-31 08:40:36 -04008Automation Platform (ONAP). ONAP projects create a variety of
9content depending on the nature of the project. For example projects
10delivering a platform component may have different types of content than
Rich Bennett5baea462017-09-13 03:19:19 -040011a project that creates libraries for a software development kit.
Rich Bennettd504dc82018-05-31 08:40:36 -040012The content from each project may be used together as a reference for
Rich Bennett7fc6d942018-11-27 09:36:32 -050013that project and/or be used in documents that are tailored to a specific
14user audience and tasks they are performing.
Rich Bennettac93e0e2017-07-19 01:36:52 -040015
Rich Bennettd504dc82018-05-31 08:40:36 -040016Much of the content in this document is derived from similar
17documentation processes used in other Linux Foundation
Rich Bennett1da30462017-08-24 12:11:36 -040018Projects including OPNFV and Open Daylight.
Rich Bennettac93e0e2017-07-19 01:36:52 -040019
Andrea Visnyeia2eb2e22020-09-25 12:23:47 +020020When is documentation required?
21~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22All ONAP project contributions should have corresponding documentation.
23This includes all new features and changes to features that impact users.
24
25How do I create ONAP documentation?
26~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27ONAP documentation is written in ReStructuredText_ (an easy-to-read,
28what-you-see-is-what-you-get, plain text markup syntax). The process for
29creating ONAP documentation and what documents are required are
30described in later sections of this Developer Documentation Guide.
31
32.. _ReStructuredText: http://docutils.sourceforge.net/rst.html
33
Spencer Seidelf7100652017-09-06 12:39:15 -040034Why reStructuredText/Sphinx?
35~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36
Rich Bennettd504dc82018-05-31 08:40:36 -040037In the past, standard documentation methods included ad-hoc Word documents,
38PDFs, poorly organized Wikis, and other, often closed, tools like
39Adobe FrameMaker. The rise of DevOps, Agile, and Continuous Integration,
40however, created a paradigm shift for those who care about documentation
41because:
Spencer Seidelf7100652017-09-06 12:39:15 -040042
Rich Bennettd504dc82018-05-31 08:40:36 -0400431. 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 Seidelf7100652017-09-06 12:39:15 -040048
492. Resources are often tight, volunteers scarce. With a large software base
Rich Bennettd504dc82018-05-31 08:40:36 -040050 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 Seidelf7100652017-09-06 12:39:15 -040054
Rich Bennettd504dc82018-05-31 08:40:36 -040055Plain-text formatting syntaxes, such as reStructuredText, Markdown,
56and Textile, are a good choice for documentation because:
Rich Bennett5baea462017-09-13 03:19:19 -040057
58a. They are editor agnostic
Rich Bennettd504dc82018-05-31 08:40:36 -040059
Rich Bennett5baea462017-09-13 03:19:19 -040060b. The source is nearly as easy to read as the rendered text
Rich Bennettd504dc82018-05-31 08:40:36 -040061
Rich Bennett5baea462017-09-13 03:19:19 -040062c. Documentation can be treated exactly as source code is (e.g. versioned,
Rich Bennettd504dc82018-05-31 08:40:36 -040063 diff'ed, associated with commit messages that can be included
64 in rendered docs)
65
Rich Bennett5baea462017-09-13 03:19:19 -040066d. Shallow learning curve
Spencer Seidelf7100652017-09-06 12:39:15 -040067
Rich Bennettd504dc82018-05-31 08:40:36 -040068The documentation team chose reStructuredText largely because of Sphinx,
69a Python-based documentation build system, which uses reStructuredText
70natively. In a code base as large as ONAP's, cross-referencing between
71component documentation was deemed critical. Sphinx and reStructuredText
72have built-in functionality that makes collating and cross-referencing
73component documentation easier.
Spencer Seidelf7100652017-09-06 12:39:15 -040074
75Which docs should go where?
76~~~~~~~~~~~~~~~~~~~~~~~~~~~
77
Rich Bennettd504dc82018-05-31 08:40:36 -040078Frequently, developers ask where documentation should be created. Should
79they always use reStructuredText/Sphinx? Not necessarily. Is the wiki
80appropriate for anything at all? Yes.
Spencer Seidelf7100652017-09-06 12:39:15 -040081
82It's really up to the development team. Here is a simple rule:
83
Rich Bennettd504dc82018-05-31 08:40:36 -040084The more tightly coupled the documentation is to a particular version
85of the code, the more likely it is that it should be stored with the
86code in reStructuredText.
Spencer Seidelf7100652017-09-06 12:39:15 -040087
Rich Bennettd504dc82018-05-31 08:40:36 -040088The doc team encourages component teams to store as much documentation
89as reStructuredText as possible because:
Spencer Seidelf7100652017-09-06 12:39:15 -040090
Rich Bennettd504dc82018-05-31 08:40:36 -0400911. It is easier to edit component documentation for grammar,
92 spelling, clarity, and consistency.
Spencer Seidelf7100652017-09-06 12:39:15 -040093
Rich Bennettd504dc82018-05-31 08:40:36 -0400942. A consistent formatting syntax across components will allow
95 flexibility in producing different kinds of output.
Spencer Seidelf7100652017-09-06 12:39:15 -040096
Rich Bennettd504dc82018-05-31 08:40:36 -0400973. It is easier to re-organize the documentation.
Spencer Seidelf7100652017-09-06 12:39:15 -040098
Rich Bennettd504dc82018-05-31 08:40:36 -0400994. Wiki articles tend to grow in size and not maintained making it hard
100 to find current information.
Rich Bennettac93e0e2017-07-19 01:36:52 -0400101
Rich Bennett1da30462017-08-24 12:11:36 -0400102Structure
103---------
Rich Bennettd504dc82018-05-31 08:40:36 -0400104A top level master document structure is used to organize all
105documents created by ONAP projects and this resides in the gerrit doc
106repository. Complete documents or guides may reside here and
107reference parts of source for documentation from other project
108repositories. Other ONAP projects will provide content that
109is referenced from this structure.
Rich Bennettac93e0e2017-07-19 01:36:52 -0400110
111::
112
Andrea Visnyei3f018832020-06-18 13:25:04 +0200113docs
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 Bennett1da30462017-08-24 12:11:36 -0400187
188Source Files
189------------
Rich Bennettd504dc82018-05-31 08:40:36 -0400190All documentation for project repositories should be structured and stored
Rich Bennett1da30462017-08-24 12:11:36 -0400191in or below `<your_project_repo>/docs/` directory as Restructured Text.
192ONAP jenkins jobs that verify and merge documentation are triggered by
Rich Bennett5baea462017-09-13 03:19:19 -0400193RST file changes in the top level docs directory and below.
Rich Bennett1da30462017-08-24 12:11:36 -0400194
Rich Bennett5baea462017-09-13 03:19:19 -0400195Licensing
Rich Bennett1da30462017-08-24 12:11:36 -0400196---------
197All contributions to the ONAP project are done in accordance with the
198ONAP licensing requirements. Documentation in ONAP is contributed
199in accordance with the `Creative Commons 4.0 <https://creativecommons.org/licenses/by/4.0/>`_ license.
Rich Bennettd504dc82018-05-31 08:40:36 -0400200All documentation files need to be licensed using the text below.
201The license may be applied in the first lines of all contributed RST
Rich Bennett1da30462017-08-24 12:11:36 -0400202files:
203
204.. code-block:: bash
205
206 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
Rich Bennettc5995662017-10-18 15:27:52 -0400207 .. http://creativecommons.org/licenses/by/4.0
208 .. Copyright YEAR ONAP or COMPANY or INDIVIDUAL
Rich Bennett1da30462017-08-24 12:11:36 -0400209
210 These lines will not be rendered in the html and pdf files.
211
Rich Bennettd504dc82018-05-31 08:40:36 -0400212When there are subsequent, significant contributions to a source file
213from a different contributor, a new copyright line may be appended
214after the last existing copyright line.