Add documentation
[dcaegen2.git] / docs / sections / build.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3
4 Build
5 =====
6
7 Build
8 =====
9
10
11 Description
12 -----------
13 DCAE has multiple code repos and these repos are in several different languages.  All DCAE projects are built in similar fashion, following Maven framework as Maven projects.  Although many DCAE projects are not written in Java, adopting the Maven framework does help including DCAE projects in  the overall ONAP building methodology and CICD process.
14
15 All DCAE projects use ONAP oparent project POM as ancestor.  That is, DCAE projects inherent all parameters defined in oparent project which include many ONAP wide configuration parameters such as the location of various artifact repos.
16
17 A number of DCAE projects are not written Java.  For these projects we use the CodeHaus Maven Execution plugin for triggering a Bash script at various stages of Maven lifecycle. The script is  mvn-phase-script.sh, located at the root of each non-Java DACE project.  It is in this script that the actual build operation is performed at different Maven phases.  For example, for a Python project, Maven test will actually trigger a call to tox to conduct project unit tests.
18
19 Below is a list of the repos and their sub-modules, and the language they are written in.
20
21 * dcaegen2
22
23  - docs (rst)
24  - platformdoc (mkdoc)
25
26 * dcaegen2.analytics
27
28 * dcaegen2.analytics.tca
29
30  - dcae-analytics-aai (Java)
31  - dcae-analytics-cdap-common (Java)
32  - dcae-analytics-cdap-plugins (Java)
33  - dcae-analytics-cdap-tca (Java)
34  - dcae-analytics-common (Java)
35  - dcae-analytics-dmaap (Java)
36  - dcae-analytics-it (Java)
37  - dcae-analytics-model (Java)
38  - dcae-analytics-tca (Java)
39  - dcae-analytics-test (Java)
40  - dpo (Java)
41
42 * dcaegen2.collectors
43
44  - dcaegen2.collectors.snmptrap (Java)
45  - dcaegen2.collectors.ves (Python)
46
47 * dcaegen2.deployments
48
49  - bootstrap (bash)
50  - cloud_init (bash)
51  - scripts (bash, python)
52
53 * dcaegen2.platform
54
55 * dcaegen2.platform.blueprints
56
57  - blueprints (yaml)
58  - check-blueprint-vs-input (yaml)
59  - input-templates (yaml)
60
61 * dcaegen2.platform.cdapbroker (Erlang)
62
63 * dcaegen2.platform.cli
64
65  - component-json-schemas (yaml)
66  - dcae-cli (Python)
67
68 * dcaegen2.platform.configbinding (Python)
69
70 * dcaegen2.platform.deployment-handler (Python)
71
72 * dcaegen2.platform.inventory-api (Clojure) 
73
74 * dcaegen2.platform.plugins
75
76  - cdap (Python)
77  - dcae-policy (Python)
78  - docker (Python)
79  - relationships (Python)
80
81 * dcaegen2.platform.policy-handler (Python)
82
83 * dcaegen2.platform.servicechange-handler (Python)
84
85 * dcaegen2.utils
86
87  - onap-dcae-cbs-docker-client (Python)
88  - onap-dcae-dcaepolicy-lib (Python)
89  - python-discovery-client (Python)
90  - python-dockering (Python)
91  - scripts (bash)
92
93
94
95 Environment
96 -----------
97 Building is conducted in a Linux environment that has the basic building tools such as JDK 8, Maven 3, Python 2.7 and 3.6, docker engine, etc.
98
99
100 Steps
101 -----
102 Because of the uniform adoption of Maven framework, each project can be built by running the standard Maven build commands:  mvn clean, install, deploy, etc.  For projects with submodules, the pom file in the project root will descent to the submodules and complete the submodule building.
103
104
105 Artifacts
106 ---------
107 Building of DCAE projects produce three different kinds of artifacts: Java jar files, raw file artifacts (including yaml files, scripts, wagon packages, etc), Pypi packages, and docker container images.  
108
109
110