Refactoring and fixing Docs
[ccsdk/cds.git] / docs / cba / index.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0
2 .. International License. http://creativecommons.org/licenses/by/4.0
3 .. Copyright (C) 2019 IBM.
4
5 .. _cds_cba-doc:
6
7 Controller Blueprint Archived Designer Tool (CBA)
8 =================================================
9 .. toctree::
10    :maxdepth: 1
11
12 Introduction
13 ------------
14 The **C**\ ontroller **B**\ lueprint **A**\ rchive is the overall service design, fully model-driven, intent based
15 **package** needed for SELF SERVICE provisioning and configuration management automation.
16
17 The CBA is **.zip** file, comprised of the following folder structure, the files may vary:
18
19 .. code-block language is required for ReadTheDocs to render code-blocks. Python set as default.
20
21 .. code-block:: python
22
23     ├── Definitions
24     │   ├── blueprint.json                          Overall TOSCA service template (workflow + node_template)
25     │   ├── artifact_types.json                     (generated by enrichment)
26     │   ├── data_types.json                         (generated by enrichment)
27     │   ├── policy_types.json                       (generated by enrichment)
28     │   ├── node_types.json                         (generated by enrichment)
29     │   ├── relationship_types.json                 (generated by enrichment)
30     │   ├── resources_definition_types.json         (generated by enrichment, based on Data Dictionaries)
31     │   └── *-mapping.json                          One per Template
32     │
33     ├── Environments                                Contains *.properties files as required by the service
34     │
35     ├── Plans                                       Contains Directed Graph
36     │
37     ├── Tests                                       Contains uat.yaml file for testing cba actions within a cba package
38     │
39     ├── Scripts                                     Contains scripts
40     │   ├── python                                  Python scripts
41     │   └── kotlin                                  Kotlin scripts
42     │
43     ├── TOSCA-Metadata
44     │   └── TOSCA.meta                              Meta-data of overall package
45     │
46     └── Templates                                   Contains combination of mapping and template
47
48 To process a CBA for any service we need to enrich it first. This will gather all the node- type, data-type,
49 artifact-type, data-dictionary definitions provided in the blueprint.json.
50
51
52 Architecture
53 ------------
54 |image1|
55
56
57 Data Flow
58 ---------
59 |image2|
60
61
62 Installation
63 ------------
64
65 Building client html and js files
66 .................................
67
68    * FROM alpine:3.8 as builder
69    * RUN apk add --no-cache npm
70    * WORKDIR /opt/cds-ui/client/
71    * COPY client/package.json /opt/cds-ui/client/
72    * RUN npm install
73    * COPY client /opt/cds-ui/client/
74    * RUN npm run build
75
76 Building and creating server
77 ............................
78
79    * FROM alpine:3.8
80    * WORKDIR /opt/cds-ui/
81    * RUN apk add --no-cache npm
82    * COPY server/package.json /opt/cds-ui/
83    * RUN npm install
84    * COPY server /opt/cds-ui/
85    * COPY --from=builder /opt/cds-ui/server/public /opt/cds-ui/public
86    * RUN npm run build
87    * EXPOSE 3000
88    * CMD [ "npm", "start" ]
89
90
91 Development
92 -----------
93
94 Pre-requiste
95 ............
96    * Visual Studio code editor
97    * Git bash
98    * Node.js & npm
99    * loopback 4 cl
100
101 Steps
102 .....
103    To compile CDS code:
104
105    1. Make sure your local Maven settings file ($HOME/.m2/settings.xml)
106       contains references to the ONAP repositories and OpenDaylight
107       repositories.
108    2. git clone https://(LFID)@gerrit.onap.org/r/a/ccsdk/cds
109    3. cd cds ; mvn clean install ; cd ..
110    4. Open the cds-ui/client code for development
111
112
113 Functional Decomposition
114 ------------------------
115 |image3|
116
117 .. |image1| image:: media/CDS_Architecture.jpg
118    :width: 500pt
119
120 .. |image2| image:: media/CDS_Data_Flow.jpg
121    :width: 500pt
122
123 .. |image3| image:: media/Functional_Decomposition.jpg
124    :width: 500pt
125