1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
4 Onboarding Pre-requisite
5 ========================
7 Before a component is onboarded into DCAE, the component developer must ensure it
8 is compliant with ONAP & DCAE goals and requirement in order to correctly be deployed and be managed. This
9 page will discuss the changes which are grouped into the following
12 - :any:`Configuration management via ConfigBindingService <configuration_management>`
13 - :any:`Docker images <docker_images>`
14 - :any:`Policy Reconfiguration flow support <policy_reconfiguration>`
15 - :any:`Operational Requirement <operation_requirement>`
18 .. _configuration_management:
20 Configuration Management
21 ------------------------
23 All configuration for a component is stored in CONSUL under the
24 components uniquely generated name which is provided by the environment
25 variable ``HOSTNAME`` as well as ``SERVICE_NAME``. It is then made
26 available to the component via a remote HTTP service call to CONFIG
29 The main entry in CONSUL for the component contains its
30 **generated application configuration**. This is based on the submitted
31 component specification, and consists of the *interfaces* (streams and
32 services/calls) and *parameters* sections. Other entries may exist as
33 well, under specific keys, such as :dmaap . Each key represents a
34 specific type of information and is also available to the component by
35 calling CONFIG BINDING SERVICE. More on this below.
37 Components are required to pull their
38 **generated application configuration** at application startup using the environment
39 setting exposed during deployment.
45 The platform provides a set of environment variables into each Docker
48 +----------------------------+--------------+----------------------------------------+
49 | Name | Type | Description |
50 +============================+==============+========================================+
51 | ``HOSTNAME`` | string | Unique name of the component instance |
52 | | | that is generated |
53 +----------------------------+--------------+----------------------------------------+
54 | ``CONSUL_HOST`` | string | Hostname of the platform's Consul |
56 +----------------------------+--------------+----------------------------------------+
57 | ``CONFIG_BINDING_SERVICE`` | string | Hostname of the platform's config |
58 | | | binding service instance |
60 +----------------------------+--------------+----------------------------------------+
61 | ``DOCKER_HOST`` | string | Host of the target platform Docker |
62 | | | host to run the container on |
63 +----------------------------+--------------+----------------------------------------+
64 | ``CBS_CONFIG_URL`` | string | Fully resolved URL to query config |
65 | | | from CONSUL via CBS |
66 +----------------------------+--------------+----------------------------------------+
69 .. _config_binding_service:
71 Config Binding Service
72 ~~~~~~~~~~~~~~~~~~~~~~
74 The config binding service is a platform HTTP service that is
75 responsible for providing clients with its fully resolve configuration
76 JSON at startup, and also other configurations objects
79 At runtime, components should make an HTTP GET on:
83 <config binding service hostname>:<port>/service_component/NAME
85 For Docker components, NAME should be set to ``HOSTNAME``, which is
86 provided as an ENV variable to the container.
88 The binding service integrates with the streams and services section of
89 the component specification. For example, if you specify that you call a
96 "config_key": "vnf-db",
98 "format": "dcae.vnf.meta",
102 "format": "dcae.vnf.kpi",
109 Then the config binding service will find all available IP addresses of
110 services meeting the containers needs, and provide them to the container
111 under your ``config_key``:
115 // your configuration
117 "vbf-db" : // see above
118 [IP:Port1, IP:Port2,…] // all of these meet your needs, choose one.
121 Regarding ``<config binding service hostname>:<port>``, there is DNS
122 work going on to make this resolvable in a convenient way inside of your
125 For all Kubernetes deployments since El-Alto, an environment variable ``CBS_CONFIG_URL`` will be exposed
126 by platform (k8s plugins) providing the exact URL to be used for configuration retrieval.
127 Application can use this URL directly instead of constructing URL from HOSTNAME (which refers to ServiceComponentName)
128 and CONFIG_BINDING_SERVICE env's. By default, this URL will use HTTPS CBS interface
130 If you are integrating with CBS SDK, then the DNS resolution and configuration fetch
131 are handled via library functions.
133 Generated Application Configuration
134 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
136 The DCAE platform uses the component specification to generate the
137 component’s application configuration provided at deployment time. The
138 component developer should expect to use this configuration JSON in the
142 The following component spec snippet (from String Matching):
148 "format": "VES_specification",
150 "type": "message_router",
151 "config_key" : "mr_input"
154 "format": "VES_specification",
156 "config_key": "mr_output",
157 "type": "message_router"
162 "config_key" : "aai_broker_handle",
165 "format": "get_with_query_params",
169 "format": "aai_broker_response",
176 Will result in the following top level keys in the configuration
180 "streams_publishes":{
181 "mr_output":{ // notice the config key above
182 "aaf_password":"XXX",
183 "type":"message_router",
188 "topic_url":"https://YOUR_HOST:3905/events/com.att.dcae.dmaap.FTL2.DCAE-CL-EVENT" // just an example
193 "streams_subscribes":{
194 "mr_input":{ // notice the config key above
195 "aaf_password":"XXX",
196 "type":"message_router",
201 "topic_url":"https://YOUR_HOST:3905/events/com.att.dcae.dmaap.FTL2.TerrysStringMatchingTest" // just an example
207 "aai_broker_handle":[ // notice the config key above
208 "135.205.226.128:32768" // based on deployment time, just an example
212 These keys will always be populated whether they are empty or not. So
213 the minimum configuration you will get, (in the case of a component that
214 provides an HTTP service, doesn’t call any services, and has no streams,
219 "streams_publishes":{},
220 "streams_subscribes":{},
223 Thus your component should expect these well-known top level keys.
228 DCAE has SDK/libraries which can be used for service components for easy integration.
230 - `Java Library <https://docs.onap.org/projects/onap-dcaegen2/en/latest/sections/sdk/architecture.html>`__
231 - `Python Modules <https://git.onap.org/dcaegen2/utils/tree/onap-dcae-cbs-docker-client>`__
235 .. _policy_reconfiguration:
237 Policy Reconfiguration
238 ----------------------
240 Components must provide a way to receive policy reconfiguration, that
241 is, configuration parameters that have been updated via the Policy UI.
242 The component developer must either periodically poll the ConfigBindingService API
243 to retrieve/refresh the new configuration or provides a script (defined in the :any:`Docker
244 auxiliary specification <docker-auxiliary-details>`)
245 that will be triggered when policy update is detected by the platform.
253 Docker images must be pushed to the environment specific Nexus
254 repository. This requires tagging your build with the full name of you
255 image which includes the Nexus repository name.
257 For ONAP microservices, the components images are expected to pushed into ONAP nexus
258 part of `ONAP CI jobs <https://wiki.onap.org/display/DW/Using+Standard+Jenkins+Job+%28JJB%29+Templates>`__
261 .. _operation_requirement:
263 Operational Requirement
264 -----------------------
269 All ONAP MS logging should follow logging specification defined by `logging project <https://wiki.onap.org/pages/viewpage.action?pageId=71831691>`__
271 The application log configuration must enable operation to choose if to be written into file or stdout or both during deployment.
276 ONAP S3P (all scaling/resiliency/security/maintainability) goals should meet at the minimum level defined for DCAE project for the targeted release
278 If the component is stateful, it should persist its state on external store (eg. pg, redis) to allow support for scaling and resiliency. This should be important design criteria for the component. If the components either publish/subscribe into DMAAP topic, then secure connection to DMAAP must be supported (platform will provide aaf_username/aaf_password for each topic as configuration).