1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
4 DCAE Deployment (using Helm)
5 ============================
7 This document describes the details of the Helm chart based deployment process for ONAP and how DCAE is deployed through this process.
13 ONAP 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.
14 ONAP uses Kubernetes as the foundation for fulfilling its platform maturity promises.
16 ONAP manages Kubernetes specifications using Helm charts (in OOM project), under which all Kubernetes yaml-formatted resource specifications and additional files
17 are organized into a hierarchy of charts, sub-charts, and resources. These yaml files are further augmented with Helm's templating, which makes dependencies
18 and cross-references of parameters and parameter derivatives among resources manageable for a large and complex Kubernetes system such as ONAP.
20 At deployment time, with a single **helm deploy** command, Helm resolves all the templates and compiles the chart hierarchy into Kubernetes resource definitions,
21 and invokes Kubernetes deployment operations for all the resources.
23 All ONAP Helm charts are organized under the **kubernetes** directory of the **OOM** project, where roughly each ONAP component occupies a subdirectory.
26 With DCAE Transformation to Helm completed in Jakarta/R10 release, all DCAE components deployment is 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.
28 Other 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>`.
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.
36 DCAE Chart Organization
37 -----------------------
39 Following Helm conventions, the DCAE Helm chart directory (``oom/kubernetes/dcaegen2-services`` & ``oom/kubernetes/dcaegen2``) consists of the following files and subdirectories:
41 * ``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.
45 * ``Makefile``: make file to build DCAE charts
46 * ``components``: subdirectory for DCAE sub-charts.
49 The dcaegen2-services chart has the following sub-charts:
51 * ``dcae-datafile-collector``: deploys the DCAE DataFile Collector service.
52 * ``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.
54 * ``dcae-pm-mapper``: deploys the DCAE PM-Mapper service.
55 * ``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.
58 * ``dcae-datafile-collector``: deploys the DCAE Datafile collector service.
59 * ``dcae-datalake-admin-ui``: deploys the Datalake Admin UI service.
60 * ``dcae-datalake-des``: deploys the Datalake Data Extraction service.
61 * ``dcae-datalake-feeder``: deploys the Datalake Feeder service.
62 * ``dcae-heartbeat``: deploys the DCAE Heartbeat microservice.
63 * ``dcae-kpi-ms``: deploys the DCAE KPI computation microservice.
64 * ``dcae-ms-healthcheck``: deploys the DCAE healthcheck service that provides API to check health of bootstrapped DCAE service deployed via helm
65 * ``dcae-pm-mapper``: deploys the DCAE PM-Mapper service.
66 * ``dcae-pmsh``: deploys the DCAE PM Subscription Handler service.
67 * ``dcae-restconf-collector``: deploys the DCAE RESTConf collector service.
68 * ``dcae-slice-analysis-ms``: deploys the DCAE Slice Analysis service.
69 * ``dcae-snmptrap-collector``: deploys the DCAE SNMPTRAP collector service.
70 * ``dcae-son-handler``: deploys the DCAE SON-Handler microservice.
71 * ``dcae-ves-mapper``: deploys the DCAE VES Mapper microservice.
72 * ``dcae-ves-openapi-manager``: deploys the DCAE service validator of VES_EVENT type artifacts from distributed services.
75 The dcaegen2-services sub-charts depend on a set of common templates, found under the ``common`` subdirectory under ``dcaegen2-services``.
77 Information about using the common templates to deploy a microservice can be
78 found in :doc:`Using Helm to deploy DCAE Microservices <./dcaeservice_helm_template>`.
84 At deployment time for ONAP, when the **helm deploy** command is executed,
85 only the DCAE resources defined within the subcharts - "dcaegen2-services" above are deployed
86 (based on override file configuration defined in `values.yaml <https://git.onap.org/oom/tree/kubernetes/dcaegen2-services/values.yaml>`_
90 * DCAE Service components:
93 * PNF-Registration Handler Service
94 * Threshold Crossing Analysis (TCA-gen2)
95 * DCAE-Services healthcheck
98 Some of the DCAE subcharts include an initContainer that checks to see if
99 other services that they need in order to run have become ready. The installation
100 of these subcharts will pause until the needed services are available.
102 Since Istanbul release, DCAE bootstrapped Microservice deployment are managed completely under Helm.
104 Additionaly tls-init-container invoked during component deployment relies on AAF to generate the required certificate hence AAF
105 must be enabled under OOM deployment configuration.
107 As majority of DCAE services rely on DMAAP (MR and DR) interfaces, ONAP/DMAAP must also be enabled under OOM deployment configuration.
112 Deployment time configuration of DCAE components are defined in several places.
114 * Helm Chart templates:
115 * Helm/Kubernetes template files can contain static values for configuration parameters;
116 * Helm Chart resources:
117 * Helm/Kubernetes resources files can contain static values for configuration parameters;
118 * Helm values.yaml files:
119 * The values.yaml files supply the values that Helm templating engine uses to expand any templates defined in Helm templates;
120 * In a Helm chart hierarchy, values defined in values.yaml files in higher level supersedes values defined in values.yaml files in lower level;
121 * Helm command line supplied values supersedes values defined in any values.yaml files.
124 .. _dcae-service-deployment:
125 On-demand deployment/upgrade through Helm
126 -----------------------------------------
128 Under DCAE Transformation to Helm, all DCAE components has been delivered as helm charts under
129 OOM repository (https://git.onap.org/oom/tree/kubernetes/dcaegen2-services).
132 All DCAE component charts follows standard Helm structure. Each Microservice charts has predefined configuration defined under
133 ``applicationConfig`` which can be modified or overridden at deployment time.
135 Using helm, any of DCAE microservice can be deployed/upgraded/uninstalled on-demand.
140 This step is only required when helm install should be done on different releasename/prefix from rest of ONAP deployment
142 With Istanbul release, OOM team included support for ServiceAccount in ONAP deployment to limit the pod access to API server.
144 Following packages has been added under oom/common to support pre-provisioning of cluster roles and ServiceAccount management
146 * `ServiceAccount <https://git.onap.org/oom/tree/kubernetes/common/serviceAccount/values.yaml>`_
147 * `RoleWrapper <https://git.onap.org/oom/tree/kubernetes/common/roles-wrapper>`_
149 When deployed, these chart will create the ServiceAccount and Role (based on override) and required Rolebinding (to associate the Serviceaccount to a role).
151 ONAP deployment by default includes the required provisioning of roles under release name (such as "dev") under which ONAP is deployed. For subsequent
152 helm installation under same release name prefix (i.e dev-) no further action is required.
154 When Helm install is required under different releasename prefix, then execute following command prior to running helm install.
158 helm install <DEPLOYMENT_PREFIX>-role-wrapper local/roles-wrapper -n <namespace>
161 Followed by install of required service/chart
165 helm -n <namespace> install <DEPLOYMENT_PREFIX>-dcaegen2-services oom/kubernetes/dcaegen2-services
170 Review and update local copy of dcaegen2-service ``values.yaml`` oom/kubernetes/dcaegen2-services/values.yaml
171 to ensure component is enabled for deployment (or provide as command line override)
175 helm -n <namespace> install <DEPLOYMENT_PREFIX>-dcaegen2-services oom/kubernetes/dcaegen2-services
178 Service component can also be installed individually from oom/kubernetes/dcaegen2-services/components/<dcae-ms-chart>
182 helm -n onap install dev-dcaegen2-services-ves-mapper oom/kubernetes/dcaegen2-services/components/dcae-ves-mapper -f values.yaml
184 Using -f flag override file can be specified which will take precedence over default configuration.
185 When commandline override is not provided, default (values.yaml) provided in chart-directory will be used.
189 Helm support upgrade of charts already deployed; using ``upgrade`` component deployment can be modified
193 helm -n <namespace> upgrade <DEPLOYMENT_PREFIX>-dcaegen2-services --reuse-values --values <updated values.yaml path> <dcaegen2-services helm charts path>
196 For minor configuration updates, helm also supports new values to be provided inline to the upgrade command. Example below -
200 helm -n onap upgrade dev-dcaegen2-services oom/kubernetes/dcaegen2-services --reuse-values --set dcae-ves-collector.applicationConfig.auth.method="noAuth"
204 Components can be uninstalled using delete command.
208 helm -n <namespace> delete <DEPLOYMENT_PREFIX>-dcaegen2-services
210 DCAE Service Endpoints
211 ----------------------
213 Below is a table of default hostnames and ports for DCAE component service endpoints in Kubernetes deployment:
214 =================== ================================== =======================================================
215 Component Cluster Internal (host:port) Cluster external (svc_name:port)
216 =================== ================================== =======================================================
217 VES dcae-ves-collector:8443 dcae-ves-collector.onap:30417
218 HV-VES dcae-hv-ves-collector:6061 dcae-hv-ves-collector.onap:30222
219 TCA-Gen2 dcae-tcagen2:9091 NA
221 DCAE MS Healthcheck dcae-ms-healthcheck:8080 NA
222 =================== ================================== =======================================================
224 In addition, a number of ONAP service endpoints that are used by DCAE components are listed as follows
225 for reference by DCAE developers and testers:
227 ==================== ============================ ================================
228 Component Cluster Internal (host:port) Cluster external (svc_name:port)
229 ==================== ============================ ================================
230 Robot robot:88 robot:30209 TCP
231 Message router message-router:3904 NA
232 Message router message-router:3905 message-router-external:30226
233 Message router Kafka message-router-kafka:9092 NA
234 ==================== ============================ ================================
239 All of the DCAE components deployed using the OOM Helm charts will be
240 deleted by the ``helm undeploy`` command. This command can be used to
241 uninstall all of ONAP by undeploying the top-level Helm release that was
242 created by the ``helm deploy`` command. The command can also be used to
243 uninstall just DCAE, by having the command undeploy the `top_level_release_name`-``dcaegen2-services``
246 Helm will undeploy only the components that were originally deployed using
247 Helm charts. When uninstalling all of ONAP, it is sufficient to delete the namespace
248 used for the deployment (typically ``onap``) after running the undeploy
249 operation. Deleting the namespace will get rid of any remaining resources
253 To undeploy the DCAE services deployed via Helm (the hv-ves-collector, ves-collector, tcagen2,
254 and prh), use the ``helm undeploy`` command against the `top_level_release_name`-``dcaegen2-services``