CBA

The Controller Blueprint Archived is the overall service design, fully model-driven, package needed to automate the instantiation and any config provisioning operation, such as day0 or day2 configuration.

The CBA is .zip file, comprised of the following structure:

.
├── Definitions
│   ├── blueprint.json
│   ├── artifact_types.json
│   ├── data_types.json
│   ├── node_types.json
│   ├── policy_types.json
│   ├── relationship_types.json
│   ├── resources_definition_types.json
│   └── *-mapping.json
├── Plans
│   ├── ResourceAssignment.xml
│   ├── ConfigAssign.xml
│   └── ConfigDeploy.xml
├── Scripts
│   └── python
│       ├── ConfigDeployExample.py
│       ├── ResourceResolutionExample.py
│       └── __init__.py
├── TOSCA-Metadata
│   └── TOSCA.meta
└── Templates
    └── *-template.vtl


Data Dictionary

A data dictionary defines a specifc resource that can be resolved using the bellow the supported sources.

A data dictionary can support multiple resources.

The main goal of data dictionary is to define generic entity that could be shared accross the service catalog.

Resolution sources

Input

Default

SQL

Default (SDNC DB)

Generic

REST

Default (SDNC MDSAL)

Generic

Capability (scripts)

Python

Kotlin script

Netconf (through Python)

Workflow

A workflow defines an overall action to be taken for the service; it can be composed of a set of node to execute. Currently, workflows are backed by Directed Graph engine.

A CBA can have as many workflow as needed.

Required workflows

The following workflows are contracts being established between SO, SDNC and CDS to cover the instantiation and the post-instantiation use cases.

resource-assignment

This action is meant to assign resources needed to instantiate the service. The goal is to resolved all the HEAT environment variables.

This action is triggered by Generic-Resource-API (GR-API) within SDNC as part of the AssignBB orchestrated by SO. Hence it will be triggered for each VNF(s) and VF-Module(s).

In order to know what to resolved, one input is required, that is the artifact prefix (see bellow for explanation).

artifacts

For each VNF and VF-Module comprising the service, a combinaison of a template and mapping is needed.

The requirement is as follow for VNF:

${vnf-name}-template
${vnf-name}-mapping

and as follow for VF-Module, where the vf-module-label is actually the name of the HEAT template file.

${vf-module-label}-template
${vf-module-label}-mapping

${vnf-name} and ${vf-module-label} is what we call the artifact prefix, so the requirement could be seen as follow:

${artifact-prefix}-template
${artifact-prefix}-mapping
template

The template has to be a resource accumulator template; that be composed of the following sections:

  • resource-accumulator-resolved-data: defines all the resources that can be resolved directly from the context. It expresses a direct mapping between the name of the resource and its value.

    RA resolved data
      "resource-accumulator-resolved-data": [
        {
          "param-name": "service-instance-id",
          "param-value": "${service-instance-id}"
        },
        {
          "param-name": "vnf_id",
          "param-value": "${vnf-id}"
        }
      ]
  • capability-data: defines what capability to use to create a specific resource, along with the ingredients required to invoke the capability and the output mapping.

    RA capability payload
        {
          "capability-name": "netbox-ip-assign",
          "key-mapping": [
            {
              "payload": [
                {
                  "param-name": "service-instance-id",
                  "param-value": "${service-instance-id}"
                },
                {
                  "param-name": "prefix-id",
                  "param-value": "${private-prefix-id}"
                },
                {
                  "param-name": "vf-module-id",
                  "param-value": "${vf-module-id}"
                },
                {
                  "param-name": "external_key",
                  "param-value": "${vf-module-id}-vpg_private_ip_1"
                }
              ],
              "output-key-mapping": [
                {
                  "resource-name": "vpg_private_ip_1",
                  "resource-value": "${vpg_private_ip_1}"
                }
              ]
            }
          ]
        }
mapping

Defines the contract of each resource to be resolved. Each placeholder in the template must have a corresponding mapping definition.

A mapping is comprised of:

  • name
  • required / optional
  • type (support complex type)
  • dictionary-name
  • dictionary-source
  • dependencies: this allows to make sure given resources get resolved prior the resolution of the resources defining the dependency.

The dictionary fields reference to a specific data dictionary.

scripts

If any of the mapping uses a source capabbility to resolve a parameters.

config-assign

This action is meant to assign all the resources and mesh the templates needed for the configuration to apply post-instantiation.

This action is triggered by SO during after the AssignBB has been executed for Service, VNF and VF-Module.

artifacts

Combinaison of templates with respective mappings

Scripts if needed

config-deploy

This action is meant to push the configuration templates defined during the config-assign step for the post-instantiation.

This action is triggered by SO during after the CreateBB has been executed for all the VF-Modules.

artifacts

Combinaison of templates with respective mappings

Scripts using Netconf or Restconf to push configure the network element.

8 Comments

  1. CBA Helper script
    Alexis de Talhouët This script is confusing because:
    • URL endpoint execution-service/upload is from blueprints processor but others are from controller blueprints? How they work here with same port?
    • NODE_PORT_PROCESSOR is not any of the "known" ports in default OOM CDS deployment?
    • Where we can find the example git repo containing openwaveintegra?
    • This script contains crucial information about one subflow of CDS. It's not documented anywhere else. This and also other flows from CDS works should be documented. Especially what happens inside CDS when calling self-serve apis.  
    1. Samuli Silvius Script has been provided for reference purpose, to help dev during their development cycles.
      It helps understanding high level dev flow, along with curl request to automate this, that is:

      1. push custom data type
      2. push data dictionary
      3. zip the CBA
      4. Enrich
      5. Load

      Here is my answers:

      All URL endpoint execution-service/upload is from blueprints processor but others are from controller blueprints? How they work here with same port?

      Latest blueprint processor micro-service is providing all APIs; basically, controller blueprint and blueprint processor merged (blueprint processor had all the jar of controller blueprint) few weeks back. Hence they work with same port now and controller blueprint will soon retire. Functionality remain unchanged.

      NODE_PORT_PROCESSOR is not any of the "known" ports in default OOM CDS deployment?

      Everyone can customize their deployment, internally we have dozen of ONAP deployment within our K8S clusters, hence NodePort are very not the ONAP ones for us internally. I updated the doc for this.

      Where we can find the example git repo containing openwaveintegra?

      This is not provided. The script serves as an example. I updated the doc to explain the folder structure for the given script.

      This script contains crucial information about one subflow of CDS. It's not documented anywhere else. This and also other flows from CDS works should be documented. Especially what happens inside CDS when calling self-serve apis.

      Not sure to understand what you are referring to, can you elaborate on what is the "crucial information" along with what you believe should be documented? I'm trying to make the doc as complete as possible, hence I valuate your feedback. Also, make sure to look at the Modeling Concepts, it might contain the information you are looking for.


      1. Thanks a lot from answer. Good to know CB and BP are going to be merged. 

        I mean it's crucial to have this kind of practical (and working) examples how user flow goes. And I have not seen that well documented. API usage is preferred over using that a bit confusing UI.

        I have been reading "Modeling Concepts" and all the pages but still do not understand how CDS internally works and what are the flows. Merging Controller Blueprints and Blueprints processor surely helps as it's been confusing to figure out the role of these two and how the communicate (share the CBA). And from the code, seems like cds-ui is calling APIs of both.

        Another thing that is hard to find, how the flow goes inside blueprints processor when self-serve api is called. How and in which order resolutions are called and what things affect and how multiple SB protocol options towards VNF is called/configured. I mean all the things I need to know to model my own CBA. Some very simple hello-word example(s) would be good in addition to the golden.   

        1. Samuli Silvius Please check out the vLB E2E Automation as practical example of a e2e use case leveraged in ONAP. It describes all the steps needed from ONAP Installation, Design Time and Run Time activities. 


          I highly recommend you try out the Dublin vLB E2E Automation use case which provide a the foundation zero touch provisioning  and configuration automation using all the ONAP component including SO, POLICY, A&AI, SDNC, CDS, etc..

          E2E Automation vDNS & vFW w/ CDS Use Case - ONAP-01-Installation-Required Component

          E2E Automation vDNS w/ CDS Use Case - ONAP-02-Design Time

          E2E Automation vDNS w/ CDS Use Case - ONAP-03-Run Time- Video Demo for vDNS CDS Dublin


          Ladder Diagram for Design Time & Run Time: 

          https://wiki.onap.org/rest/documentConversion/latest/conversion/thumbnail/48530182/1


          Role of blueprint-processor vs controller-blueprints at the high level. 


          The Design Time creation and management of the Controller Blueprint Archive [CBA] Package and Data Dictionary is supported by the controller-blueprints microservices. 

          The Run Time execution of the CBA Package is executed by the blueprint-processor microservices. The blueprints processor microservices is the equivalent to the tosca engine that reads add executes the intent/declarative behavior described within the  CBA Package


          What flow goes inside blueprints processor when self-serve api is called?

          The CBA Packages is declarative/intent based behavior which means as a designer your modeling for a given action all the workflow activities that are executed during the action. This is described in the workflow modeling concept page:  Modeling Concepts#100023263.


          as an examples, vLB CBA Package

          • for resource-assignment action when trigger the vLB use case the intent based behavior that is model in the vLB CBA Package is trigger a node type of component-resource-resolution which deals with parameter resolution resolution using the different capabilities of data dictionary and resolved parameter resolution meshing with the templates. Within this workflow action the output is also modeled to return the meshed content back to the client which in this case is SDNC. 


          • for config-deploy action when trigger the vLB use case the intent based behavior that is model in the vLB CBA Package is trigger the config-deploy-process which is a DG that orchestrates the steps for vLB IP OAM Address resolution using the component of  component-resource-resolution and vLB Application configuration using component of component-netconf-executor and vnf-netconf-device. NOTE: the intent of config-deploy action behaves can be change by the designer. The designer can decide not to use netconf but use ansible playbook ,  Kotlin script , resconf etc.. to be used for configuring the device. Based on the use case the designer is able to model the behavior of the action within the cba package resulting in an expected outcome in the network


          If you try out the Dublin E2E Automation use case for vLB shall provide an excellent illustration higher level SO orchestration MACRO Building Block Orchestration and SDNC/CDS Provisioning and configuration management.  

          1. Yes, I'm familiar with all those demo pages, but still have not get enough information how it works. On the level wrote above I know already and it always stays at that level (too high level) without deeper understanding. There are just so many confusing terms used but hard to know the meanings. Example: the term "mesh". Can you sow example, how "meshed content" looks like?

            But will read those pages again as seems people are also updating sometimes those. For the demo pages was missing the most interesting part i.e. the rest/payload call of CDS interfaces input and also output coming from CDS.

            1. I mean it's crucial to have this kind of practical (and working) examples how user flow goes. And I have not seen that well documented.

              The sole purpose of this user guide is to provide the flow to follow, by browsing from left to right within the tabs. I think what you're looking for is low level details of how things are implemented. If that is the case, then you can't expect user guide to provide, this would be developer guide. Currently, we don't have such thing.

              I have been reading "Modeling Concepts" and all the pages but still do not understand how CDS internally works and what are the flows.

              The goal has never been to express how CDS internal works, but a contrary, how to use CDS without understanding the low level internal details. Keep in mind, this is made for network operation teams that don't know software. CDS follow the inversion of control pattern. When you use Spring, do you expect their user doc to explain all the machinery behind dependency injection, service registry, etc... I don't think so, what you care about is how the annotation works, and which annotation is for what. Similar idea is followed for this user guide.

              how the flow goes inside blueprints processor when self-serve api is called.

              This is based on your model. Your model drive what CDS will do. You instruct the system what to do. Entry point is the workflow, then all the flow from there is explain there Modeling Concepts#100023263

              Each node type is backed by a bean within the runtime: Modeling Concepts#604060893, hence the name of the bean is the name of the node_type. Ex: node_type component-resource-resolution is backed by https://github.com/onap/ccsdk-cds/blob/3c1781135b4029fdc657b2009259d3b8ddd8eebc/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt#L32-L34

              All the internal is following this concept, that the type of the node derive the name of the bean. For the source node_type, they derive the resource processor to use. ex: source-input is backed by https://github.com/onap/ccsdk-cds/blob/3c1781135b4029fdc657b2009259d3b8ddd8eebc/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessor.kt#L37-L39  / same goes for the other sources.

              How and in which order resolutions are called and what things affect and how multiple SB protocol options towards VNF is called/configured.

              Once you came up with the CBA, and completed the template along with their mapping, a resource graph will be dynamically generated, based on the dependency section of each resource. Then the resource will be resolved in batch mode, synchronously for the one having dependencies, parallel for the once that are standalone.

              Some very simple hello-word example(s) would be good in addition to the golden.

              We have few examples that you can find here: https://github.com/onap/ccsdk-cds/tree/master/components/model-catalog/blueprint-model And they are two official demos: the vFW and the vDNS.

              There are just so many confusing terms used but hard to know the meanings.

              What would be useful is for you to provide a list of them: help us help you (smile)

              Example: the term "mesh". Can you sow example, how "meshed content" looks like?

              When using Velocity or Jinja, what we call a meshed templated, or "meshed content", is the rendered template. Feel free to read about Velocity and Jinja for more in-depth understanding of these templating engine.


  2. ONAP-Cairo-contribution_108658_2019-10-08_08-35.mp4 a video from Orange that explain how to build CDS blueprint

  3. Hi,

    I am new to onap, just deployed CDS on minikube. trying to access the blueprint Processor UI, below is the command used.

    [root@slice-dev-vm ~]# minikube service --v=2 --alsologtostderr cds-blueprints-processor-http -n onap
    I0318 16:18:11.790452 24920 none.go:130] GetState called
    I0318 16:18:11.792730 24920 kverify.go:126] Checking apiserver status ...
    I0318 16:18:11.852885 24920 kverify.go:142] apiserver freezer: "6:freezer:/kubepods/burstable/pod8692221a8c7e62922b91ade35a91aeb5/4b92426362c2489093618c5daec36728efa832b73674877802bbfc7295a796c7"
    I0318 16:18:11.865269 24920 kverify.go:156] freezer state: "THAWED"
    I0318 16:18:11.865305 24920 kverify.go:166] Checking apiserver healthz at https://10.xx.xx.xx:8443/healthz ...
    I0318 16:18:11.881568 24920 service.go:236] Found service: &Service{ObjectMeta:{cds-blueprints-processor-http onap /api/v1/namespaces/onap/services/cds-blueprints-processor-http 3c92077d-6ffb-4132-a1e9-7cc18102ad38 1166974 0 2020-03-10 19:24:29 +0000 UTC <nil> <nil> map[app:cds-blueprints-processor chart:cds-blueprints-processor-5.0.0 heritage:Tiller release:worn-lambkin] map[] [] [] []},Spec:ServiceSpec{Ports:[]ServicePort{ServicePort{Name:blueprints-processor-http,Protocol:TCP,Port:8080,TargetPort:{0 8080 },NodePort:30499,},},Selector:map[string]string{app: cds-blueprints-processor,release: worn-lambkin,},ClusterIP:10.107.49.233,Type:NodePort,ExternalIPs:[],SessionAffinity:None,LoadBalancerIP:,LoadBalancerSourceRanges:[],ExternalName:,ExternalTrafficPolicy:Cluster,HealthCheckNodePort:0,PublishNotReadyAddresses:false,SessionAffinityConfig:nil,IPFamily:nil,TopologyKeys:[],},Status:ServiceStatus{LoadBalancer:LoadBalancerStatus{Ingress:[]LoadBalancerIngress{},},},}
    I0318 16:18:11.881676 24920 status.go:65] Checking if "minikube" exists ...
    |-----------|-------------------------------|---------------------------|-------------------------|
    | NAMESPACE | NAME | TARGET PORT | URL |
    |-----------|-------------------------------|---------------------------|-------------------------|
    | onap | cds-blueprints-processor-http | blueprints-processor-http | http://10.xx.xx.xx:30499 |
    |-----------|-------------------------------|---------------------------|-------------------------|
    * Opening service onap/cds-blueprints-processor-http in default browser...
    START /usr/bin/firefox "http://10.xx.xx.xx:30499"
    Running without a11y support!



    PLease help me with credentials to login?



    Thanks,

    Param