You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

This guide is geared to provide information regarding  how to do service design to automate instantiation and day0 configuration.

Installation

ONAP is meant to be deployed within a Kubernetes environment. Hence, the de-facto way to deploy CDS is through Kubernetes.

ONAP also package Kubernetes manifest as Chart, using Helm.

Prerequisite

https://docs.onap.org/en/latest/guides/onap-developer/settingup/index.html

Setup local Helm

helm repo
helm serve &
helm repo add local http://127.0.0.1:8879

Get the chart

Make sure to checkout the release to use, by replacing $release-tag in bellow command

git clone
git clone https://gerrit.onap.org/r/oom
git checkout tags/$release-tag
cd oom/kubernetes
make cds

Install CDS

helm install
helm install --name cds cds

Result

kubectl output
$ kubectl get all --selector=release=cds
NAME                                             READY     STATUS    RESTARTS   AGE
pod/cds-blueprints-processor-54f758d69f-p98c2    0/1       Running   1          2m
pod/cds-cds-6bd674dc77-4gtdf                     1/1       Running   0          2m
pod/cds-cds-db-0                                 1/1       Running   0          2m
pod/cds-controller-blueprints-545bbf98cf-zwjfc   1/1       Running   0          2m
NAME                            TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)             AGE
service/blueprints-processor    ClusterIP   10.43.139.9     <none>        8080/TCP,9111/TCP   2m
service/cds                     NodePort    10.43.254.69    <none>        3000:30397/TCP      2m
service/cds-db                  ClusterIP   None            <none>        3306/TCP            2m
service/controller-blueprints   ClusterIP   10.43.207.152   <none>        8080/TCP            2m
NAME                                        DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/cds-blueprints-processor    1         1         1            0           2m
deployment.apps/cds-cds                     1         1         1            1           2m
deployment.apps/cds-controller-blueprints   1         1         1            1           2m
NAME                                                   DESIRED   CURRENT   READY     AGE
replicaset.apps/cds-blueprints-processor-54f758d69f    1         1         0         2m
replicaset.apps/cds-cds-6bd674dc77                     1         1         1         2m
replicaset.apps/cds-controller-blueprints-545bbf98cf   1         1         1         2m
NAME                          DESIRED   CURRENT   AGE
statefulset.apps/cds-cds-db   1         1         2m

Design time

Bellow are the requirements to enable automation for a service within ONAP.

For instantiation, the goal is to be able to automatically resolve all the HEAT environment variables, called cloud parameters.

For post-instantiation, the goal is to configure the VNF with initial configuration.

Prerequisite

  1. Gather what you need:

      Have the HEATtemplate along with the HEATenvironment file.

      Have the configuration template to apply on the VNF.

        1. XML for NETCONF
        2. JSON / XML for RESTCONF
        3. not supported yet - CLI
    • Identify which values are static and dynamic
    • Create and fill-in the a table for all the dynamic values

      Here are the information to capture for each dynamic cloud parameters

      Cloud Parameter name How to resolve Input for resolution Output of resolution
      Name as in the HEAT environment file

        Value will be given as input in the request.

        Value will be defaulted in the model.

        Value will be resolved by sending a query to the REST system


        Auth URL URI Payload VERB

        Supported Auth type

          Use token based authentication

          • token

          Use basic authentication

          • username
          • password

          Use SSL basic authentication

          • keystore type
          • truststore
          • truststore password
          • keystore
          • keystore password
          http(s)://<host>:<port> /xyz JSON formatted payload HTTP method



          Value will be resolved by sending a SQL statement to the DB system


          Type URL Query Username Password
          Only maria-db supported for now

          jdbc:mysql://<host>:<port>/db

          SQL statement



            List of placeholders used for

            • URI
            • Payload

            List of placeholders used for

            • SQL statement

            This is the expected result from the system, and you should know what value out of the response is of interest for you.

            If it's a JSON payload, then you should think about the json path to access to value of interest.

          Data dictionary


          Required workflows

          The following workflows are contracts 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 for which entity the action is triggered, 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.

          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}"
                        }
                      ]
                    }
                  ]
                }
          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

          • No labels