blob: b6fcdc81cc2846b46e5d8bc47a27ef56f66dd579 [file] [log] [blame]
Lusheng Ji72c4fba2017-10-10 18:12:22 +00001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
VENKATESH KUMAR7f3e4532020-11-18 16:30:36 -05003.. _build:
Lusheng Ji72c4fba2017-10-10 18:12:22 +00004
Lusheng Jieaac78d2018-06-06 00:20:03 -04005Building DCAE
6=============
Lusheng Ji72c4fba2017-10-10 18:12:22 +00007
Lusheng Ji72c4fba2017-10-10 18:12:22 +00008
Lusheng Jia73548f2017-11-05 19:24:05 -05009Description
10-----------
11DCAE 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.
12
Lusheng Jieaac78d2018-06-06 00:20:03 -040013All DCAE projects use ONAP **oparent** project POM as ancestor. That is, DCAE projects inherent all parameters defined in the oparent project which include many ONAP wide configuration parameters such as the location of various artifact repos.
Lusheng Jia73548f2017-11-05 19:24:05 -050014
15A 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.
16
VENKATESH KUMARe21c8482020-11-12 15:00:02 -050017Below is a list of the repositories and their sub-modules, and the language they are written in.
Lusheng Jia73548f2017-11-05 19:24:05 -050018
19* dcaegen2
20
21 - docs (rst)
22 - platformdoc (mkdoc)
23
24* dcaegen2.analytics
25
Lusheng Jia73548f2017-11-05 19:24:05 -050026
Vijay VK2648c6d2018-09-19 04:30:37 +010027* dcaegen2.analytics.tca-gen2
VENKATESH KUMARe21c8482020-11-12 15:00:02 -050028
Vijay VK2648c6d2018-09-19 04:30:37 +010029 - dcae-analytics (Java)
30 - eelf-logger (Java)
31
Lusheng Jia73548f2017-11-05 19:24:05 -050032* dcaegen2.collectors
33
Lusheng Jieaac78d2018-06-06 00:20:03 -040034 - dcaegen2.collectors.snmptrap (Python)
35 - dcaegen2.collectors.ves (Java)
Vijay VK2648c6d2018-09-19 04:30:37 +010036 - dcaegen2.collectors.hv-ves (Kotlin)
37 - dcaegen2.collectors.datafile (Java)
Vijay VK6b0fa462019-05-20 16:06:11 +010038 - dcaegen2.collectors.restconf (Java)
Vijay VK2648c6d2018-09-19 04:30:37 +010039
40* dcaegen2.services
41
42 - dcaegen2.services.heartbeat (Python)
43 - dcaegen2.services.prh (Java)
Vijay VK6b0fa462019-05-20 16:06:11 +010044 - dcaegen2.services.bbs-eventprocessor (Java)
45 - dcaegen2.services.pm-mapper (Java)
46 - dcaegen2.services.ves-mapper (Java)
47 - dcaegen2.services.son-handler (Java)
Lusheng Jia73548f2017-11-05 19:24:05 -050048
49* dcaegen2.deployments
50
Lusheng Jia73548f2017-11-05 19:24:05 -050051 - scripts (bash, python)
Vijay VK2648c6d2018-09-19 04:30:37 +010052 - tls-init-container (bash)
53 - k8s-bootstrap-container (bash)
54 - healthcheck-container (Node.js)
55 - k8s-bootstrap-container (bash)
Vijay VK6b0fa462019-05-20 16:06:11 +010056 - tca-cdap-container (bash)
57 - multisite-init-container (python)
58 - dcae-remote-site (helm chart)
Lusheng Jia73548f2017-11-05 19:24:05 -050059
60* dcaegen2.platform
61
62* dcaegen2.platform.blueprints
63
64 - blueprints (yaml)
Lusheng Jia73548f2017-11-05 19:24:05 -050065 - input-templates (yaml)
66
Lusheng Jieaac78d2018-06-06 00:20:03 -040067* dcaegen2.platform.cli (Python)
Lusheng Jia73548f2017-11-05 19:24:05 -050068
69 - component-json-schemas (yaml)
70 - dcae-cli (Python)
71
72* dcaegen2.platform.configbinding (Python)
73
VENKATESH KUMARbe32a312019-06-07 01:31:10 -040074* dcaegen2.platform.deployment-handler (NodeJS)
Lusheng Jia73548f2017-11-05 19:24:05 -050075
VENKATESH KUMARbe32a312019-06-07 01:31:10 -040076* dcaegen2.platform.inventory-api (Java)
Lusheng Jia73548f2017-11-05 19:24:05 -050077
78* dcaegen2.platform.plugins
79
80 - cdap (Python)
81 - dcae-policy (Python)
82 - docker (Python)
83 - relationships (Python)
Vijay VK6b0fa462019-05-20 16:06:11 +010084 - k8splugin (Python)
Lusheng Jia73548f2017-11-05 19:24:05 -050085
86* dcaegen2.platform.policy-handler (Python)
87
VENKATESH KUMARbe32a312019-06-07 01:31:10 -040088* dcaegen2.platform.servicechange-handler (Clojure)
Lusheng Jia73548f2017-11-05 19:24:05 -050089
90* dcaegen2.utils
91
92 - onap-dcae-cbs-docker-client (Python)
93 - onap-dcae-dcaepolicy-lib (Python)
94 - python-discovery-client (Python)
95 - python-dockering (Python)
96 - scripts (bash)
97
Lusheng Ji72c4fba2017-10-10 18:12:22 +000098
Lusheng Ji72c4fba2017-10-10 18:12:22 +000099Environment
100-----------
Lusheng Jia73548f2017-11-05 19:24:05 -0500101Building 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.
Lusheng Ji72c4fba2017-10-10 18:12:22 +0000102
103
104Steps
105-----
Lusheng Jia73548f2017-11-05 19:24:05 -0500106Because 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.
107
108
109Artifacts
110---------
111Building 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.
112
113
114