Proposal for enhancements to better integrate the K8S workloads with ONAP - and CDS

Observation in Macro flow with Helm chart:

  1. As shown in below we need to pass the model information (vnf and vf model info) to SDC payload...for Heat templet SDC will generate the model info, but in case of Helm (charts and dummy templet, shown in below file) SDC will generate the limited info... So the point is how we can pass the vf-module info here...
    1. if we use one vnf and one vf module info also (helm model info)... how SO will pass the information to multi-cloud for vf instantiation, Macro flow didn't integrated with V2 version (HPA and k8s-plugin service). If we resolve this it will instantiate the pods through Macro-flow.
    2. current macro flow has SO and CDS integration (like Config assign) and with auto heat-bridge, it will get the VM details. so CDS will do the configuration with Ansible/python script which are available in the CBA package. In case of Helm chart we need to fill the gap between SO and Multi-cloud for instantiation. Till service-instance and generic-vnf creation is fine, at the time of vf-creation we need to transfer the flow to multi-cloud, so that it will start the instantiation.
    3. After instantiation need to configure the pods, so need to fill the gap between Multi-cloud/k8s to CDS.


CDS_service-instance_payload.json
{
  "requestDetails": {
    "subscriberInfo": {
      "globalSubscriberId": "Demonstration"
    },
    "requestInfo": {
      "suppressRollback": false,
      "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
      "requestorId": "adt",
      "instanceName": "{{cds-instance-name}}",
      "source": "VID"
    },
    "cloudConfiguration": {
      "lcpCloudRegionId": "fr2",
      "tenantId": "6270eaa820934710960682c506115453",
      "cloudOwner":"CloudOwner"
    },
    "requestParameters": {
      "subscriptionServiceType": "vFW",
      "userParams": [
        {
          "Homing_Solution": "none"
        },
        {
          "service": {
            "instanceParams": [
            ],
            "instanceName": "{{cds-instance-name}}",
            "resources": {
              "vnfs": [
                {
                  "modelInfo": {
                "modelName": "{{vnf-modelinfo-modelname}}",
                "modelVersionId": "{{vnf-modelinfo-modeluuid}}",
                "modelInvariantUuid": "{{vnf-modelinfo-modelinvariantuuid}}",
                "modelVersion": "1.0",
                "modelCustomizationId": "{{vnf-modelinfo-modelcustomizationuuid}}",
                "modelInstanceName": "{{vnf-modelinfo-modelinstancename}}"
                  },
                  "cloudConfiguration": {
                    "lcpCloudRegionId": "fr2",
                    "tenantId": "6270eaa820934710960682c506115453"
                  },
                  "platform": {
                    "platformName": "test"
                  },
                  "lineOfBusiness": {
                    "lineOfBusinessName": "LOB-Demonstration"
                  },
                  "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
                  "instanceName": "{{vnf-modelinfo-modelinstancename}}",
                  "instanceParams": [
                    {      
                      "onap_private_net_id": "olc-private",
                      "onap_private_subnet_id": "olc-private",
                      "pub_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCs84Cy8+qi/jvucay0BwFtOq3ian0ulTXFGxkZcZCR0N48j88pbHJaEqb9e25MAsrfH+7Etb9Kd5nbBThEL/i0AyHXnDsc80Oq0sqlLcfLo3SGSurkrNoRofHboJ5Hn+N9SlWN5FCQGbTx1w3rjqR4LasAI6XxH9xpXSFyyge6ysVXH0cYaZ8sg98nFZa1fPJR9L8COjZvF+EYudub2RC5HVyV/sx7bliNFo9JwQh6du1abG4G7ZDjTIcYwYp21iq52UzWU28RVcAyY6AQZJu2lHLdsr8fPvyeWZpC5EqGsxI1G609m9G/dURRKwYfez/f2ATzpn5QjEX7LrLWBM8r Generated-by-Nova",
                      "image_name": "Ubuntu 16.04",
                      "flavor_name":"n2.cw.standard-1",
                      "sec_group":"olc-open",
                      "install_script_version":"1.4.0-SNAPSHOT",
                      "demo_artifacts_version":"1.4.0-SNAPSHOT",
                      "cloud_env":"openstack",
                      "public_net_id": "olc-public",
                      "aic-cloud-region": "fr2"
                    }
                  ],
                  "vfModules": [
                    {
                      "modelInfo": {
                        "modelName": "{{vnf-vfmodule-0-modelinfo-modelname}}",
                        "modelVersionId": "{{vnf-vfmodule-0-modelinfo-modeluuid}}",
                        "modelInvariantUuid": "{{vnf-vfmodule-0-modelinfo-modelinvariantuuid}}",
                        "modelVersion": "1",
                        "modelCustomizationId": "{{vnf-vfmodule-0-modelinfo-modelcustomizationuuid}}"
                       },
                      "instanceName": "{{vnf-vfmodule-0-modelinfo-modelname}}",
                      "instanceParams": [
                                                 {
                          "sec_group": "olc-open",
                          "public_net_id": "olc-net"
                        }
                      ]
                    },
                    {
                      "modelInfo": {
                        "modelName": "{{vnf-vfmodule-1-modelinfo-modelname}}",
                        "modelVersionId": "{{vnf-vfmodule-1-modelinfo-modeluuid}}",
                        "modelInvariantUuid": "{{vnf-vfmodule-1-modelinfo-modelinvariantuuid}}",
                        "modelVersion": "1",
                        "modelCustomizationId": "{{vnf-vfmodule-1-modelinfo-modelcustomizationuuid}}"
                       },
                      "instanceName": "{{vnf-vfmodule-1-modelinfo-modelname}}",
                      "instanceParams": [
                        {
                          "sec_group": "olc-open",
                          "public_net_id": "olc-net"
                        }
                      ]
                    },
                    {
                      "modelInfo": {
                        "modelName": "{{vnf-vfmodule-2-modelinfo-modelname}}",
                        "modelVersionId": "{{vnf-vfmodule-2-modelinfo-modeluuid}}",
                        "modelInvariantUuid": "{{vnf-vfmodule-2-modelinfo-modelinvariantuuid}}",
                        "modelVersion": "1",
                        "modelCustomizationId": "{{vnf-vfmodule-2-modelinfo-modelcustomizationuuid}}"
                       },
                      "instanceName": "{{vnf-vfmodule-2-modelinfo-modelname}}",
                      "instanceParams": [
                        {
                          "sec_group": "olc-open",
                          "public_net_id": "olc-net"
                        }
                      ]
                    },
                    {
                      "modelInfo": {
                        "modelName": "{{vnf-vfmodule-3-modelinfo-modelname}}",
                        "modelVersionId": "{{vnf-vfmodule-3-modelinfo-modeluuid}}",
                        "modelInvariantUuid": "{{vnf-vfmodule-3-modelinfo-modelinvariantuuid}}",
                        "modelVersion": "1",
                        "modelCustomizationId": "{{vnf-vfmodule-3-modelinfo-modelcustomizationuuid}}"
                      },
                      "instanceName": "{{vnf-vfmodule-3-modelinfo-modelname}}",
                      "instanceParams": [
                        {
                          "sec_group": "olc-open",
                          "public_net_id": "olc-net"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            "modelInfo": {
              "modelVersion": "1.0",
        "modelVersionId": "{{service-uuid}}",
        "modelInvariantId": "{{service-invariantUUID}}",
        "modelName": "{{service-name}}",
              "modelType": "service"
            }
          }
        }
      ],
      "aLaCarte": false
    },
    "project": {
      "projectName": "Project-Demonstration"
    },
    "owningEntity": {
      "owningEntityId": "67f2e84c-734d-4e90-a1e4-d2ffa2e75849",
      "owningEntityName": "OE-Demonstration"
    },
    "modelInfo": {
      "modelVersion": "1.0",
        "modelVersionId": "{{service-uuid}}",
        "modelInvariantId": "{{service-invariantUUID}}",
        "modelName": "{{service-name}}",
     "modelType": "service"
    }
  }
}


Model_info_from_sdc.json
{  
   "serviceVnfs": [

    {
      "modelInfo": {
        "modelName": "vfw_k8s_072919",
        "modelUuid": "8fae3ef7-7741-4d65-a630-9f83631f470d",
        "modelInvariantUuid": "f14e9096-b6d6-4a48-861f-6f6355a05439",
        "modelVersion": "1.0",
        "modelCustomizationUuid": "d7582303-0a01-4863-ae09-15c82000b927",
        "modelInstanceName": "vfw_k8s_072919 0"
      },
      "toscaNodeType": "org.openecomp.resource.vf.VfwK8s072919",
      "nfFunction": null,
      "nfType": null,
      "nfRole": null,
      "nfNamingCode": null,
      "multiStageDesign": "false",
      "resourceInput": null,
      "vfModules": [{
        "modelInfo": {
          "modelName": "VfwK8s072919..Base_dummy..module-0",
          "modelUuid": "5f9162d1-e710-4454-bf84-26044026bd38",
          "modelInvariantUuid": "49f84e8f-20fc-4a0c-97a9-96339d0aab94",
          "modelVersion": "1",
          "modelCustomizationUuid": "b7b8a3b7-15a0-49d4-adfc-370941cab973"
        },
        "isBase": true,
        "vfModuleLabel": "Base_dummy",
        "initialCount": 1,
        "hasVolumeGroup": false
      }]
    }
  ]
}


2. IN CDS we are using Net box for IP inventory (every time auto increment in IP value for instantiation), Here we are creating the pods, so how we can handle the IP concept here.
3. In case of Macro flow we need to the supplement json information as User_directives at the time of vf-module creation automatically (now we are passing manually through VID).

         In above payload we can add the user_directive data,

                   "userParams": [ { "Homing_Solution": "none" },

GR-API Issue with Helm chart:

  1.  when I am trying to create vf-module (Helm-chart, GR-API and version—v2) through VID, it failed due to vf module name missing in the SDNC-Directives.
  2. we adding the User_ Directives data also inside SDNC_ Directives, is there any purpose in it?


JIRA:  SO-2293 - Getting issue details... STATUS


Description:

                  vf_module_name is missing from sdnc-directives, so Multi-cloud throwing error at the time of vf-module creation through VID. If we add the vf_module_name in the SDNC_Dircetives it will resolve the issue.

 

Macro flow with Heat (v1): 


created the stack successfully... with v1 version of vnf and multicloud as orchestrator...


Attached success logs of BPMN and Openstack...


     

BPMN-v1-success.logOPENSTACK-v1-success.log


Macro flow with Heat (v2): 

Failed to create the stack... Due to v2 version of vnf and multicloud as orchestrator...

just for reference added the logs of BPMN and Openstack with v2 version and orchestrator as Multicloud...


OPENSTACK-v2-Failure.log


Macro flow with Helm (v2 version):


Need to modify the CBA package according to the Helm charts.


  • No labels

1 Comment

  1. Konrad Bańka Lukasz Rajewski Samuli Silvius  - Here are some thoughts based on the two options in your slide deck.

    Option 1

    1. The K8S Profile contains the complete set of instance values in its overrides values - as resolved by CDS (or manually created)
      • Implies that the K8S Profile must use an identifier other than the vf module customization id - as there will be a unique profile needed for each instance of the service.
      • Thus, CDS creates the profile ID and provides it to SO as a parameter to be passed in the infra_workload call
    2. Alternative - The K8S Profile or K8S Profile template is provided in the CBA.  CDS will be responsible for creating a profile in the K8S plugin - let's say it just uses the vf module model customization ID as the profile ID.
      • Specific instance parameters are still resolved by CDS and returned to SO and ultimately passed via the SO infra_workload call to multicloud.
      • The multicloud k8s plugin will need to combine the parameters coming from the SO call with the K8S profile to instantiate. (this is kind of a combo of your options 1 and 2)
    3. Variation - (not sure if there's a use case or not for this) - perhaps there are scenarios where various K8S profile templates are needed (beyond just simply different values for parameters).  Provide a set of K8S Profile templates in the CBA.  As part of CDS processing - add 1 or more of these profiles to the multicloud k8s plugin.
      • Both 1.1 and 1.2 could apply in this case.  Since there's more than 1 K8S profile for the vf module model, some kind of CDS generated profile id needs to be used to store the profile and pass along to SO as a parameter.
      • 1.2 could be used as well by creating the profile set (from the set of templates in the CBA) and then resolving specific instance parameter values and combining with the specified profile per the 1.2 approach.


    Option 2

    1. The K8S profile is onboarded as an artifact and the K8S Profile is created during the distribution process.
      • I was thinking the profile could just be a separate artifact from the helm charts (definition / resource bundle) artifact - the artifact broker just handles it directly as a profile artifact as it does for the definition artifact.
    2. Per option 1.3 above, it could be conceivable to have multiple variations of the profile artifact (I think 1.3 would be preferable in this case)
    3. In the call today, there was a comment that Option 1 is preferred by CDS as GR-API may not be used at some point in the future.  I'd like to understand this point more - e.g. how does it work for non-k8s cases where there is not a k8s profile that is created (per option 1.1 approach)?
    4. Option 2 - like 1.3 above - requires the multicloud k8s plugin to combine the instance parameters passed in from SO with the (single) K8S profile



    Stream of thoughts:

    1. On instantiation - default is to look for a K8S profile based on the model customization ID (which could have been created by either option 1 or 2 methods).
    2. On instantiation - if a k8s-profile-id parameter is passed in, it is used for the profile.  Maybe it is always provided and default value is model customization id.  If more than 1 profile will exist for the given service model, then a specific k8s-profile-id will need to be provided.
    3. On instantiation - ability to combine parameters from SO with the K8S profile is:
      1. Required if there is just a single profile template saved
      2. Required if there are multiple profile templates (e.g. 1.3, 2.2) that still need instance specific parameters
      3. Not required/Optional if CDS creates a unique profile for each instance