andreasgeissler | 6642a72 | 2019-05-31 12:23:38 +0200 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 |
| 2 | .. International License. http://creativecommons.org/licenses/by/4.0 |
Ezhilarasi | 5962087 | 2019-03-08 16:17:22 +0530 | [diff] [blame] | 3 | .. Copyright (C) 2019 IBM. |
| 4 | |
andreasgeissler | 6642a72 | 2019-05-31 12:23:38 +0200 | [diff] [blame] | 5 | .. _cds_cba-doc: |
| 6 | |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 7 | Controller Blueprint Archived Designer Tool (CBA) |
| 8 | ================================================= |
Ezhilarasi | 5962087 | 2019-03-08 16:17:22 +0530 | [diff] [blame] | 9 | .. toctree:: |
| 10 | :maxdepth: 1 |
Ezhilarasi | 5962087 | 2019-03-08 16:17:22 +0530 | [diff] [blame] | 11 | |
andreasgeissler | 6642a72 | 2019-05-31 12:23:38 +0200 | [diff] [blame] | 12 | Introduction |
| 13 | ------------ |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 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. |
andreasgeissler | 6642a72 | 2019-05-31 12:23:38 +0200 | [diff] [blame] | 16 | |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 17 | The CBA is **.zip** file, comprised of the following folder structure, the files may vary: |
Ezhilarasi | 0f15309 | 2019-03-14 12:54:09 +0530 | [diff] [blame] | 18 | |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 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. |
Ezhilarasi | 0f15309 | 2019-03-14 12:54:09 +0530 | [diff] [blame] | 50 | |
Ezhilarasi | 0f15309 | 2019-03-14 12:54:09 +0530 | [diff] [blame] | 51 | |
andreasgeissler | 6642a72 | 2019-05-31 12:23:38 +0200 | [diff] [blame] | 52 | Architecture |
| 53 | ------------ |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 54 | |image1| |
Ezhilarasi | 0f15309 | 2019-03-14 12:54:09 +0530 | [diff] [blame] | 55 | |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 56 | Data Flow |
| 57 | --------- |
| 58 | |image2| |
Ezhilarasi | 91e8342 | 2019-03-15 14:30:05 +0530 | [diff] [blame] | 59 | |
andreasgeissler | 6642a72 | 2019-05-31 12:23:38 +0200 | [diff] [blame] | 60 | |
| 61 | Installation |
| 62 | ------------ |
| 63 | |
| 64 | Building client html and js files |
| 65 | ................................. |
| 66 | |
| 67 | * FROM alpine:3.8 as builder |
| 68 | * RUN apk add --no-cache npm |
| 69 | * WORKDIR /opt/cds-ui/client/ |
| 70 | * COPY client/package.json /opt/cds-ui/client/ |
| 71 | * RUN npm install |
| 72 | * COPY client /opt/cds-ui/client/ |
| 73 | * RUN npm run build |
| 74 | |
| 75 | Building and creating server |
| 76 | ............................ |
| 77 | |
| 78 | * FROM alpine:3.8 |
| 79 | * WORKDIR /opt/cds-ui/ |
| 80 | * RUN apk add --no-cache npm |
| 81 | * COPY server/package.json /opt/cds-ui/ |
| 82 | * RUN npm install |
| 83 | * COPY server /opt/cds-ui/ |
| 84 | * COPY --from=builder /opt/cds-ui/server/public /opt/cds-ui/public |
| 85 | * RUN npm run build |
| 86 | * EXPOSE 3000 |
| 87 | * CMD [ "npm", "start" ] |
| 88 | |
| 89 | Development |
| 90 | ----------- |
| 91 | |
| 92 | Pre-requiste |
| 93 | ............ |
| 94 | * Visual Studio code editor |
| 95 | * Git bash |
| 96 | * Node.js & npm |
| 97 | * loopback 4 cl |
| 98 | |
| 99 | Steps |
| 100 | ..... |
| 101 | To compile CDS code: |
| 102 | |
| 103 | 1. Make sure your local Maven settings file ($HOME/.m2/settings.xml) |
| 104 | contains references to the ONAP repositories and OpenDaylight |
| 105 | repositories. |
| 106 | 2. git clone https://(LFID)@gerrit.onap.org/r/a/ccsdk/cds |
| 107 | 3. cd cds ; mvn clean install ; cd .. |
| 108 | 4. Open the cds-ui/client code for development |
| 109 | |
| 110 | Functional Decomposition |
| 111 | ------------------------ |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 112 | |image3| |
andreasgeissler | 6642a72 | 2019-05-31 12:23:38 +0200 | [diff] [blame] | 113 | |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 114 | .. |image1| image:: media/CDS_Architecture.jpg |
| 115 | :width: 500pt |
andreasgeissler | 6642a72 | 2019-05-31 12:23:38 +0200 | [diff] [blame] | 116 | |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 117 | .. |image2| image:: media/CDS_Data_Flow.jpg |
| 118 | :width: 500pt |
andreasgeissler | 6642a72 | 2019-05-31 12:23:38 +0200 | [diff] [blame] | 119 | |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 120 | .. |image3| image:: media/Functional_Decomposition.jpg |
| 121 | :width: 500pt |
| 122 | |