...
With Model Driven Control Loop feature being introduced for Dublin, there is change to the policy model and distribution interfaces for CLAMP/Policy. Following steps are required to be followed for each DCAE MS targeted to be deployed under CL flows , Policy is migrating toward new design/architecture in Dublin. This requires interfacing clients (CLAMP, DCAE) to use new LC API’s and onboarding MS to use new tosca policy model. As automated generation of models and distribution between SDC and Policy is deferred to next release, certain manual steps will be required in Dublin. The steps below should be followed by any DCAE MS targeted under CL flows deployed through CLAMP.
Policy
...
Type Creation (Development phase)
- Create the MS specific blueprint, component_spec and associated data_format based on DCAE team specification (refer to details under DCAE wiki page - Dublin Deployment Strategy DCAE Service Component (MS) Deployment Options).
Note: For components with dynamic configuration, the component spec MUST include policy schema definition (policy_editable set for required parameter exposed via policy with corresponding policy_schema defined) - Use SDC/ToscaLab tool as documented here to create the base policy model. More about how to create policy types from tosca tool can be found here -> Policy type creation
Note: If the policy model does not get generated, change the "component_type" from "docker" to "cdap" in the componentspec and retry policy model creation.
The base policy model created by the tool is not complaint compliant to R4 model expected by Policy and CLAMP; following hence following manual updates will be required.should be done.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
Rename node_types to policy_types
Replace policy.nodes.Root structure with onap.policies.Monitoring
policy.nodes.Root:
derived_from: tosca.nodes.Root
properties:
policyDescription:
required: false
type: string
policyName:
required: true
type: string
policyScope:
required: true
type: string
policyVersion:
required: true
onap.policies.Monitoring:
derived_from: tosca.policies.Root
description: a base policy type for all policies that govern monitoring provision
version : 1.0.0
Rename “policy.nodes.<component_name>” under policy_types as “onap.policies.monitoring.<component_name> and as derived from onap.policies.Monitoring
Example:
onap.policies.monitoring.cdap.tca.hi.lo.app:
derived_from: onap.policies.Monitoring
version : 1.0.0
properties:
tca_policy:
type: list
description: TCA Policy JSON
entry_schema:
type: onap.datatypes.monitoring.tca_policy
Changing data_types to onap complaint name from policy.data prefix to onap.datatypes.monitoring
Example: policy.data.metricsPerEventName -> onap.datatypes.monitoring.metricsPerEventName
policy.data.tca_policy -> onap.datatypes.monitoring.tca_policy
Update each data_types to indicate relation to tosca.datatypes.Root
Example:
onap.datatypes.monitoring.tca_policy:
derived_from: tosca.datatypes.Root |
Load Policy Model
...
into SDC repo (Development phase)
The policy model (and blueprint?) will need to included part SDC to be included as part SDC of deployment hence these artifacts must be added into SDC gerrit repository (Details to be provided).
This is required for the artifacts to included be included in CSAR, which CLAMP will be utilizing.
The following gerrit commits were done in Dublin to load the policy types:
https://gerrit.onap.org/r/#/c/sdc/+/82846/
https://gerrit.onap.org/r/#/c/sdc/jtosca/+/84690/
https://gerrit.onap.org/r/#/c/sdc/+/86161/
https://gerrit.onap.org/r/#/c/sdc/+/86301/
Load Policy Model into Policy
...
api repo (Development phase)
Steps to be done before MS instantiation is done from CLAMP
Details to be providedThe policy type needs to be available in the policy api in order for CLAMP to be able to create policies during Control Loop creation.
Load Blueprint into SDC (post ONAP instantiation)
This will follow the same process as done in Casablanca for blueprint to be loaded, service design created and distributed to DCAE/CLAMP.
Example TCA Blueprint - https://nexus.onap.org/content/repositories/raw/org.onap.dcaegen2.platform.blueprints/R4/blueprints/k8s-tca-clampnode.yaml
Steps to onboard DCAE blueprints : https://docs.onap.org/en/latest/submodules/integration.git/docs/docs_scaleout.html (applies to all use cases)
For onboarding VNFs and distribute models from SDC: https://wiki.onap.org/display/DW/Design
Configuration and Deployment from CLAMP
Details to be providedDescription of configuration and deployment steps in Clamp can be found here:
https://onap.readthedocs.io/en/latest/submodules/clamp.git/docs/user-guide.html