blob: 41cf34ab273c99358e7a8f97d0923e3853e864e6 [file] [log] [blame]
Lusheng Ji768421b2018-06-01 16:36:54 -04001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
3
Vijay Venkatesh Kumard37317b2022-04-04 18:34:54 -04004DCAE Deployment (using Helm)
5============================
Lusheng Ji768421b2018-06-01 16:36:54 -04006
VENKATESH KUMAR3e2bb4c2020-05-13 16:21:54 -04007This document describes the details of the Helm chart based deployment process for ONAP and how DCAE is deployed through this process.
Lusheng Ji768421b2018-06-01 16:36:54 -04008
9
Vijay VKf9e43442019-05-22 22:10:29 +010010Deployment Overview
11-------------------
Lusheng Ji768421b2018-06-01 16:36:54 -040012
VENKATESH KUMAR3e2bb4c2020-05-13 16:21:54 -040013ONAP deployments are done on kubernetes through OOM/Helm charts. Kubernetes is a container orchestration technology that organizes containers into composites of various patterns for easy deployment, management, and scaling.
Jack Lucas34c40222019-05-16 09:42:56 -040014ONAP uses Kubernetes as the foundation for fulfilling its platform maturity promises.
Lusheng Ji768421b2018-06-01 16:36:54 -040015
VENKATESH KUMAR3e2bb4c2020-05-13 16:21:54 -040016ONAP manages Kubernetes specifications using Helm charts (in OOM project), under which all Kubernetes yaml-formatted resource specifications and additional files
Jack Lucas34c40222019-05-16 09:42:56 -040017are organized into a hierarchy of charts, sub-charts, and resources. These yaml files are further augmented with Helm's templating, which makes dependencies
18and cross-references of parameters and parameter derivatives among resources manageable for a large and complex Kubernetes system such as ONAP.
Lusheng Ji768421b2018-06-01 16:36:54 -040019
Jack Lucas34c40222019-05-16 09:42:56 -040020At deployment time, with a single **helm deploy** command, Helm resolves all the templates and compiles the chart hierarchy into Kubernetes resource definitions,
21and invokes Kubernetes deployment operations for all the resources.
Lusheng Ji768421b2018-06-01 16:36:54 -040022
Jack Lucas34c40222019-05-16 09:42:56 -040023All ONAP Helm charts are organized under the **kubernetes** directory of the **OOM** project, where roughly each ONAP component occupies a subdirectory.
Lusheng Ji768421b2018-06-01 16:36:54 -040024
Vijay Venkatesh Kumar756b1262021-09-21 18:30:12 -040025
Vijay Venkatesh Kumard37317b2022-04-04 18:34:54 -040026With DCAE Transformation to Helm completed in Jakarta/R10 release, all DCAE components deployment will be supported only via helm. Charts for individual MS are available under **dcaegen2-services** directory under OOM project (https://git.onap.org/oom/tree/kubernetes/dcaegen2-services/components). With ONAP deployment, four DCAE services (HV VES collector, VES collector, PNF Registration Handler, and TCA (Gen2) analytics service) are bootstrapped via Helm charts.
27
28Other DCAE Services can be deployed on-demand via their independent helm-charts. For on-demand helm chart, refer to steps described in :ref:`Helm install/upgrade section <dcae-service-deployment>`.
29
30
31.. note::
32 DCAE platform components deployments is optionally available through Helm charts under the **dcaegen2** directory however this mode is not supported with Jakarta release. These charts will be removed in subsequent release.
33
VENKATESH KUMAR7cac7242020-06-04 11:17:10 -040034
Vijay VKf9e43442019-05-22 22:10:29 +010035
Lusheng Ji768421b2018-06-01 16:36:54 -040036DCAE Chart Organization
37-----------------------
38
Vijay Venkatesh Kumard37317b2022-04-04 18:34:54 -040039Following Helm conventions, the DCAE Helm chart directory (``oom/kubernetes/dcaegen2-services`` & ``oom/kubernetes/dcaegen2``) consists of the following files and subdirectories:
Lusheng Ji768421b2018-06-01 16:36:54 -040040
Jack Lucas34c40222019-05-16 09:42:56 -040041* ``Chart.yaml``: metadata.
42* ``requirements.yaml``: dependency charts.
43* ``values.yaml``: values for Helm templating engine to expand templates.
44* ``resources``: subdirectory for additional resource definitions such as configuration, scripts, etc.
VENKATESH KUMAR7cfaea22020-04-22 17:31:32 -040045* ``Makefile``: make file to build DCAE charts
46* ``components``: subdirectory for DCAE sub-charts.
Lusheng Ji768421b2018-06-01 16:36:54 -040047
Lusheng Ji768421b2018-06-01 16:36:54 -040048
Jack Lucas09fd2892021-03-23 10:25:15 -040049The dcaegen2-services chart has the following sub-charts:
50
ajay_dp00139f59df2021-07-14 16:57:46 +053051* ``dcae-datafile-collector``: deploys the DCAE DataFile Collector service.
Jack Lucas09fd2892021-03-23 10:25:15 -040052* ``dcae-hv-ves-collector``: deploys the DCAE High-Volume VES collector service.
53* ``dcae-ms-healthcheck``: deploys a health check component that tests the health of the 4 DCAE services deployed via Helm.
ajay_dp00139f59df2021-07-14 16:57:46 +053054* ``dcae-pm-mapper``: deploys the DCAE PM-Mapper service.
Jack Lucas09fd2892021-03-23 10:25:15 -040055* ``dcae-prh``: deploys the DCAE PNF Registration Handler service.
56* ``dcae-tcagen2``: deploys the DCAE TCA analytics service.
57* ``dcae-ves-collector``: deploys the DCAE VES collector service.
Vijay Venkatesh Kumar756b1262021-09-21 18:30:12 -040058* ``dcae-bbs-eventprocessor-ms``: deploys the DCAE BBS Eventprocessor service.
59* ``dcae-datafile-collector``: deploys the DCAE Datafile collector service.
60* ``dcae-datalake-admin-ui``: deploys the Datalake Admin UI service.
61* ``dcae-datalake-des``: deploys the Datalake Data Extraction service.
62* ``dcae-datalake-feeder``: deploys the Datalake Feeder service.
63* ``dcae-heartbeat``: deploys the DCAE Heartbeat microservice.
64* ``dcae-kpi-ms``: deploys the DCAE KPI computation microservice.
65* ``dcae-ms-healthcheck``: deploys the DCAE healthcheck service that provides API to check health of bootstrapped DCAE service deployed via helm
66* ``dcae-pm-mapper``: deploys the DCAE PM-Mapper service.
67* ``dcae-pmsh``: deploys the DCAE PM Subscription Handler service.
68* ``dcae-restconf-collector``: deploys the DCAE RESTConf collector service.
69* ``dcae-slice-analysis-ms``: deploys the DCAE Slice Analysis service.
70* ``dcae-snmptrap-collector``: deploys the DCAE SNMPTRAP collector service.
71* ``dcae-son-handler``: deploys the DCAE SON-Handler microservice.
72* ``dcae-ves-mapper``: deploys the DCAE VES Mapper microservice.
Vijay Venkatesh Kumard37317b2022-04-04 18:34:54 -040073* ``dcae-ves-openapi-manager``: deploys the DCAE service validator of VES_EVENT type artifacts from distributed services.
Vijay Venkatesh Kumar756b1262021-09-21 18:30:12 -040074
Jack Lucas09fd2892021-03-23 10:25:15 -040075
76The dcaegen2-services sub-charts depend on a set of common templates, found under the ``common`` subdirectory under ``dcaegen2-services``.
77
Jack Lucas2ba8ede2021-06-18 13:53:05 -040078Information about using the common templates to deploy a microservice can be
79found in :doc:`Using Helm to deploy DCAE Microservices <./dcaeservice_helm_template>`.
80
Vijay Venkatesh Kumard37317b2022-04-04 18:34:54 -040081The dcaegen2 chart has the following sub-charts:
82
83* ``dcae-bootstrap``: deploys the DCAE bootstrap service that performs some DCAE initialization and deploys additional DCAE components.
84* ``dcae-cloudify-manager``: deploys the DCAE Cloudify Manager instance.
85* ``dcae-config-binding-service``: deploys the DCAE config binding service.
86* ``dcae-deployment-handler``: deploys the DCAE deployment handler service.
87* ``dcae-healthcheck``: deploys the DCAE healthcheck service that provides an API to check the health of all DCAE components.
88* ``dcae-policy-handler``: deploys the DCAE policy handler service.
89* ``dcae-redis``: deploys the DCAE Redis cluster.
90* ``dcae-dashboard``: deploys the DCAE Dashboard for managing DCAE microservices deployments
91* ``dcae-servicechange-handler``: deploys the DCAE service change handler service.
92* ``dcae-inventory-api``: deploys the DCAE inventory API service.
93
94These components are by default disabled under ONAP for Jakarta release and charts will be removed next release
95
Lusheng Ji768421b2018-06-01 16:36:54 -040096DCAE Deployment
97---------------
98
Vijay Venkatesh Kumar756b1262021-09-21 18:30:12 -040099At deployment time for ONAP, when the **helm deploy** command is executed,
Vijay Venkatesh Kumard37317b2022-04-04 18:34:54 -0400100only the DCAE resources defined within the subcharts - "dcaegen2-services" above are deployed
101(based on override file configuration defined in `values.yaml <https://git.onap.org/oom/tree/kubernetes/dcaegen2-services/values.yaml>`_
102
Jack Lucas34c40222019-05-16 09:42:56 -0400103These include:
Donald Huntera5683c62018-11-06 22:54:51 +0000104
Vijay Venkatesh Kumar756b1262021-09-21 18:30:12 -0400105* DCAE Service components:
106 * VES Collector
107 * HV-VES Collector
108 * PNF-Registration Handler Service
109 * Threshold Crossing Analysis (TCA-gen2)
Vijay Venkatesh Kumard37317b2022-04-04 18:34:54 -0400110* DCAE-Services healthcheck
111* VES OpenAPI Manager
Lusheng Ji768421b2018-06-01 16:36:54 -0400112
Jack Lucas34c40222019-05-16 09:42:56 -0400113Some of the DCAE subcharts include an initContainer that checks to see if
114other services that they need in order to run have become ready. The installation
115of these subcharts will pause until the needed services are available.
Donald Huntera5683c62018-11-06 22:54:51 +0000116
Vijay Venkatesh Kumard37317b2022-04-04 18:34:54 -0400117Since Istanbul release, DCAE bootstrapped Microservice deployment are managed completely under Helm.
Jack Lucas09fd2892021-03-23 10:25:15 -0400118
VENKATESH KUMAR3e2bb4c2020-05-13 16:21:54 -0400119Additionaly tls-init-container invoked during component deployment relies on AAF to generate the required certificate hence AAF
Vijay Venkatesh Kumard37317b2022-04-04 18:34:54 -0400120must be enabled under OOM deployment configuration.
Donald Huntera5683c62018-11-06 22:54:51 +0000121
Vijay Venkatesh Kumard37317b2022-04-04 18:34:54 -0400122As majority of DCAE services rely on DMAAP (MR and DR) interfaces, ONAP/DMAAP must also be enabled under OOM deployment configuration.
Lusheng Ji768421b2018-06-01 16:36:54 -0400123
124DCAE Configuration
125------------------
126
127Deployment time configuration of DCAE components are defined in several places.
128
129 * Helm Chart templates:
130 * Helm/Kubernetes template files can contain static values for configuration parameters;
131 * Helm Chart resources:
132 * Helm/Kubernetes resources files can contain static values for configuration parameters;
133 * Helm values.yaml files:
134 * The values.yaml files supply the values that Helm templating engine uses to expand any templates defined in Helm templates;
135 * In a Helm chart hierarchy, values defined in values.yaml files in higher level supersedes values defined in values.yaml files in lower level;
136 * Helm command line supplied values supersedes values defined in any values.yaml files.
137
Vijay Venkatesh Kumar756b1262021-09-21 18:30:12 -0400138
139.. _dcae-service-deployment:
140On-demand deployment/upgrade through Helm
141-----------------------------------------
142
Vijay Venkatesh Kumard37317b2022-04-04 18:34:54 -0400143Under DCAE Transformation to Helm, all DCAE components has been delivered as helm charts under
Vijay Venkatesh Kumar756b1262021-09-21 18:30:12 -0400144OOM repository (https://git.onap.org/oom/tree/kubernetes/dcaegen2-services).
145
146
Vijay Venkatesh Kumar756b1262021-09-21 18:30:12 -0400147All DCAE component charts follows standard Helm structure. Each Microservice charts has predefined configuration defined under
148``applicationConfig`` which can be modified or overridden at deployment time.
149
150Using helm, any of DCAE microservice can be deployed/upgraded/uninstalled on-demand.
151
Vijay Venkatesh Kumare77efec2021-11-11 12:00:30 -0500152``Pre-Install``
153
154.. note::
155 This step is only required when helm install should be done on different releasename/prefix from rest of ONAP deployment
156
157With Istanbul release, OOM team included support for ServiceAccount in ONAP deployment to limit the pod access to API server.
158
159Following packages has been added under oom/common to support pre-provisioning of cluster roles and ServiceAccount management
160
161 * `ServiceAccount <https://git.onap.org/oom/tree/kubernetes/common/serviceAccount/values.yaml>`_
162 * `RoleWrapper <https://git.onap.org/oom/tree/kubernetes/common/roles-wrapper>`_
163
164When deployed, these chart will create the ServiceAccount and Role (based on override) and required Rolebinding (to associate the Serviceaccount to a role).
165
166ONAP deployment by default includes the required provisioning of roles under release name (such as "dev") under which ONAP is deployed. For subsequent
167helm installation under same release name prefix (i.e dev-) no further action is required.
168
169When Helm install is required under different releasename prefix, then execute following command prior to running helm install.
170
171 .. code-block:: bash
172
173 helm install <DEPLOYMENT_PREFIX>-role-wrapper local/roles-wrapper -n <namespace>
174
175
176Followed by install of required service/chart
177
178 .. code-block:: bash
179
180 helm -n <namespace> install <DEPLOYMENT_PREFIX>-dcaegen2-services oom/kubernetes/dcaegen2-services
181
Vijay Venkatesh Kumar756b1262021-09-21 18:30:12 -0400182
183``Installation``
184
185Review and update local copy of dcaegen2-service ``values.yaml`` oom/kubernetes/dcaegen2-services/values.yaml
186to ensure component is enabled for deployment (or provide as command line override)
187
188 .. code-block:: bash
Vijay Venkatesh Kumare77efec2021-11-11 12:00:30 -0500189
190 helm -n <namespace> install <DEPLOYMENT_PREFIX>-dcaegen2-services oom/kubernetes/dcaegen2-services
Vijay Venkatesh Kumar756b1262021-09-21 18:30:12 -0400191
192
193Service component can also be installed individually from oom/kubernetes/dcaegen2-services/components/<dcae-ms-chart>
194
195 .. code-block:: bash
Vijay Venkatesh Kumare77efec2021-11-11 12:00:30 -0500196
Vijay Venkatesh Kumar756b1262021-09-21 18:30:12 -0400197 helm -n onap install dev-dcaegen2-services-ves-mapper oom/kubernetes/dcaegen2-services/components/dcae-ves-mapper -f values.yaml
198
199Using -f flag override file can be specified which will take precedence over default configuration.
200When commandline override is not provided, default (values.yaml) provided in chart-directory will be used.
201
202``Upgrade``
203
204Helm support upgrade of charts already deployed; using ``upgrade`` component deployment can be modified
205
206 .. code-block:: bash
207
208 helm -n <namespace> upgrade <DEPLOYMENT_PREFIX>-dcaegen2-services --reuse-values --values <updated values.yaml path> <dcaegen2-services helm charts path>
209
210
211For minor configuration updates, helm also supports new values to be provided inline to the upgrade command. Example below -
212
213 .. code-block:: bash
214
215 helm -n onap upgrade dev-dcaegen2-services oom/kubernetes/dcaegen2-services --reuse-values --set dcae-ves-collector.applicationConfig.auth.method="noAuth"
216
217``Uninstall``
218
219Components can be uninstalled using delete command.
220
221 .. code-block:: bash
222
223 helm -n <namespace> delete <DEPLOYMENT_PREFIX>-dcaegen2-services
224
Lusheng Ji768421b2018-06-01 16:36:54 -0400225DCAE Service Endpoints
226----------------------
227
Jack Lucas34c40222019-05-16 09:42:56 -0400228Below is a table of default hostnames and ports for DCAE component service endpoints in Kubernetes deployment:
Jack Lucas09fd2892021-03-23 10:25:15 -0400229 =================== ================================== =======================================================
230 Component Cluster Internal (host:port) Cluster external (svc_name:port)
231 =================== ================================== =======================================================
232 VES dcae-ves-collector:8443 dcae-ves-collector.onap:30417
233 HV-VES dcae-hv-ves-collector:6061 dcae-hv-ves-collector.onap:30222
234 TCA-Gen2 dcae-tcagen2:9091 NA
235 PRH dcae-prh:8100 NA
Jack Lucas09fd2892021-03-23 10:25:15 -0400236 DCAE MS Healthcheck dcae-ms-healthcheck:8080 NA
Jack Lucas09fd2892021-03-23 10:25:15 -0400237 =================== ================================== =======================================================
Lusheng Ji768421b2018-06-01 16:36:54 -0400238
Filip Krzywkacbd2ded2018-09-25 14:43:18 +0200239In addition, a number of ONAP service endpoints that are used by DCAE components are listed as follows
240for reference by DCAE developers and testers:
Donald Huntera5683c62018-11-06 22:54:51 +0000241
Filip Krzywkacbd2ded2018-09-25 14:43:18 +0200242 ==================== ============================ ================================
243 Component Cluster Internal (host:port) Cluster external (svc_name:port)
244 ==================== ============================ ================================
Filip Krzywkacbd2ded2018-09-25 14:43:18 +0200245 Robot robot:88 robot:30209 TCP
Jack Lucas09fd2892021-03-23 10:25:15 -0400246 Message router message-router:3904 NA
247 Message router message-router:3905 message-router-external:30226
Filip Krzywkacbd2ded2018-09-25 14:43:18 +0200248 Message router Kafka message-router-kafka:9092 NA
Filip Krzywkacbd2ded2018-09-25 14:43:18 +0200249 ==================== ============================ ================================
Lusheng Ji768421b2018-06-01 16:36:54 -0400250
Jack Lucas34c40222019-05-16 09:42:56 -0400251Uninstalling DCAE
252-----------------
253
254All of the DCAE components deployed using the OOM Helm charts will be
255deleted by the ``helm undeploy`` command. This command can be used to
256uninstall all of ONAP by undeploying the top-level Helm release that was
257created by the ``helm deploy`` command. The command can also be used to
Vijay Venkatesh Kumard37317b2022-04-04 18:34:54 -0400258uninstall just DCAE, by having the command undeploy the `top_level_release_name`-``dcaegen2-services``
Jack Lucas34c40222019-05-16 09:42:56 -0400259Helm sub-release.
260
261Helm will undeploy only the components that were originally deployed using
262Helm charts. Components deployed by Cloudify Manager are not deleted by
263the Helm operations.
264
265When uninstalling all of ONAP, it is sufficient to delete the namespace
266used for the deployment (typically ``onap``) after running the undeploy
267operation. Deleting the namespace will get rid of any remaining resources
268in the namespace, including the components deployed by Cloudify Manager.
269
Jack Lucas09fd2892021-03-23 10:25:15 -0400270
271To undeploy the DCAE services deployed via Helm (the hv-ves-collector, ves-collector, tcagen2,
272and prh), use the ``helm undeploy`` command against the `top_level_release_name`-``dcaegen2-services``
Vijay Venkatesh Kumar8311cbe2021-09-22 15:24:40 -0400273Helm sub-release.