Fix: Run both sonar and clm scans in parallel
[ccsdk/cds.git] / docs / userguides / installation.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright (C) 2019 IBM.
4
5
6 Installation Guide
7 ==================
8
9 Installation
10 ------------
11
12 ONAP is meant to be deployed within a Kubernetes environment.
13 Hence, the de-facto way to deploy CDS is through Kubernetes.
14 ONAP also packages Kubernetes manifest as Charts, using Helm.
15
16 Prerequisites
17 -------------
18
19 https://docs.onap.org/en/latest/guides/onap-operator/settingup/index.html#installation
20
21 Get the chart
22 -------------
23
24 Make sure to checkout the release to use, by replacing $release-tag in bellow command
25
26 git clone https://gerrit.onap.org/r/oom
27 git checkout tags/$release-tag
28
29
30 Customize blueprint-processor kafka messaging config (Optional)
31 ---------------------------------------------------------------
32 Optionally, cds can use kafka native messaging to execute a blueprint use case.
33 The blueprint-processor self-service api is the main api for interacting with CDS at runtime.
34 The self-service-api topics carry actual request and response payloads,
35 whereas blueprint-processor self-service-api.audit topics will carry redacted payloads
36 (without sensitive data) for audit purposes.
37
38 By default, cds will target the strimzi kafka cluster in ONAP.
39 The strimzi kafka config is as follows:
40
41 # strimzi kafka config
42
43 useStrimziKafka: <true|false>
44
45 If useStrimziKafka is true, the following also applies:
46
47 1. Strimzi will create an associated kafka user and the topics
48    defined for Request and Audit elements below.
49
50 2. The type must be kafka-scram-plain-text-auth.
51
52 3. The bootstrapServers will target the strimzi kafka cluster by default.
53
54 The following fields are configurable via the charts values.yaml
55 (oom/kubernetes/cds/components/cds-blueprints-processor/values.yaml)
56
57 .. code-block:: bash
58
59         kafkaRequestConsumer:
60           enabled: false
61           type: kafka-basic-auth
62           groupId: cds-consumer
63           topic: cds.blueprint-processor.self-service-api.request
64           clientId: request-receiver-client-id
65           pollMillSec: 1000
66         kafkaRequestProducer:
67           type: kafka-basic-auth
68           clientId: request-producer-client-id
69           topic: cds.blueprint-processor.self-service-api.response
70           enableIdempotence: false
71         kafkaAuditRequest:
72           enabled: false
73           type: kafka-basic-auth
74           clientId: audit-request-producer-client-id
75           topic: cds.blueprint-processor.self-service-api.audit.request
76           enableIdempotence: false
77         kafkaAuditResponse:
78           type: kafka-basic-auth
79           clientId: audit-response-producer-client-id
80           topic: cds.blueprint-processor.self-service-api.audit.response
81           enableIdempotence: false
82
83 Note:
84 If more fine grained customization is required, this can be done manually
85 in the application.properties file before making the helm chart.
86 (oom/kubernetes/cds/components/cds-blueprints-processor/resources/config/application.properties)
87
88
89 Make the chart
90 --------------
91
92 cd oom/kubernetes
93 make cds
94
95 Install CDS
96 -----------
97
98 helm install --name cds cds
99
100 Result
101 ------
102
103 .. code-block:: bash
104    :linenos:
105
106    $ kubectl get all --selector=release=cds
107    NAME                                             READY     STATUS    RESTARTS   AGE
108    pod/cds-blueprints-processor-54f758d69f-p98c2    0/1       Running   1          2m
109    pod/cds-cds-6bd674dc77-4gtdf                     1/1       Running   0          2m
110    pod/cds-cds-db-0                                 1/1       Running   0          2m
111    pod/cds-controller-blueprints-545bbf98cf-zwjfc   1/1       Running   0          2m
112
113    NAME                            TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)             AGE
114    service/blueprints-processor    ClusterIP   10.43.139.9     <none>        8080/TCP,9111/TCP   2m
115    service/cds                     NodePort    10.43.254.69    <none>        3000:30397/TCP      2m
116    service/cds-db                  ClusterIP   None            <none>        3306/TCP            2m
117    service/controller-blueprints   ClusterIP   10.43.207.152   <none>        8080/TCP            2m
118
119    NAME                                        DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
120    deployment.apps/cds-blueprints-processor    1         1         1            0           2m
121    deployment.apps/cds-cds                     1         1         1            1           2m
122    deployment.apps/cds-controller-blueprints   1         1         1            1           2m
123
124    NAME                                                   DESIRED   CURRENT   READY     AGE
125    replicaset.apps/cds-blueprints-processor-54f758d69f    1         1         0         2m
126    replicaset.apps/cds-cds-6bd674dc77                     1         1         1         2m
127    replicaset.apps/cds-controller-blueprints-545bbf98cf   1         1         1         2m
128
129    NAME                          DESIRED   CURRENT   AGE
130    statefulset.apps/cds-cds-db   1         1         2m
131
132
133
134 Running CDS UI:
135 ---------------
136
137 :ref:`running_cds_ui_locally`
138
139 Client:
140 ~~~~~~~
141 Install Node.js and angularCLI. Refer https://angular.io/guide/quickstart
142 npm install in the directory cds/cds-ui/client
143 npm run build - to build UI module
144
145 Loopback Server:
146 ~~~~~~~~~~~~~~~~
147
148 npm install in the directory cds/cds-ui/server
149 npm start should bring you the CDS UI page in your local machine with the link https://127.0.0.1:3000/
150