...
<as_create_instantiate.bpmn example>
Process Sequence
Create and Instantiate AS
- <Preconditions>:
- Registar K8S Cluster(s) to ONAP
- During the registration, SO CNFM creates .kube/{target K8S cluster name}.config file(s)
- <SO BPMN Infra>
- BPMN Infra gets VF Resource TOSCA.meta.
- In there, the entity_defintion_type is found and it is set to "asd", BPMN infra launches the AS LCM Workflow as the above.
- The workflows sends a request for Create AS Identifier to SO CNFM
- <Create an AS Identifier>
- SO CNFM receives the create request (CreateAsRequest) and processes the request and return a response with AsInstance
CreateAsRequest:
asdId
Identifier (UUID) 1 Identifier that identifies the ASD which defines the AS instance to be created. asInstanceDescription
String 0..1 Human-readable description of the AS instance to be created. asInstanceName
String 0..1 Human-readable name of the AS instance to be created. The client passes "asdId" to SO CNFM, so CNFM can query an ASD with the asdId from the ASD Repository
- SO CNFM copies the incoming CreateAsRequest attributes into an AsInstance structure, and persists the AsInstance, which has a connection between the asInstanceId and asdId
- note: SO CNFM will uses the asdId when it query queries an ASD from the ASD Repository during the instantiation operation
- When the Create AS instance is successful, SO CNFM returns 200 OK with the AsInstance
- The returned AsInstance contains the asInstanceId
- Subsequent operations uses the asInstanceId; i.e., the Client use the asIstanceId in the REST Api path
- SO CNFM receives the create request (CreateAsRequest) and processes the request and return a response with AsInstance
- <Instantiate an AS>
- BPMN Infra sends an AS instantiate request to SO CNFM with the asInstanceId as follows:
- POST .../as_instances/{asInstanceId}/instantiate (InstantiateAsRequest)
- BPMN Infra sends an AS instantiate request to SO CNFM with the asInstanceId as follows:
- SO CNFM queries an ASD with the asdId from ASD Repository; caches the retrieved ASD in the memory during the Create and Instantiate operations SO CNFM reads thru the ASD DeploymentItems, and per deploymentItems, SO CNFM queries for the associated Helm Chart (1:1) from the Helm Chart Repositorycaches the retrieved Helm Charts in the memory during the Create and Instantiate operations
- InstantiateAsRequest
Attribute Name
Data Type
Cardinality
Description
asdExtCpdInputParams
ExtCpdParams
0..N contains ext cpd parameter instance-level value deploymentItems
DeploymentItems 1..N contains lifecycle parameters for deploymentItems additionalParams KeyValuesPairs 0..1 Additional input parameters for the instantiation process (this is a pace holder to hold any additional parameters which are needed by SO CNFM)
- InstantiateAsRequest
- SO CNFM retrieves the corresponding AsInstance from its DB; it is retrieve the "asdId" for the ASD query
- SO CNFM queries an ASD with the asdId from the ASD Repository; caches the retrieved ASD in the memory during the Instantiate operations
- SO CNFM reads thru the ASD DeploymentItems, and per deploymentItems, SO CNFM queries for the associated Helm Chart (1:1) from the Helm Chart Repository
- caches the retrieved Helm Charts in the memory during the Instantiate operations
- SO CNFM reads the deploymentItems.deploymentOrder. Based on the order sequence, SO CNFM processes the deploymentItems one by one
- From the InstantiateAsRequest, SO CNFM retrieves the deploymentItems
DeploymentItems
deploymentItemId Identifier 1 Identifies which deploymentItem lifecycleParameterKeyValues
KeyValuesPairs 0..N provides lifecycle parameter keys and values - The lifecycleParameterKeyValues contains a list of customizable attributes (key) in the values.yaml with instance-level values
- From the associated Helm Chart, SO CNFM gets the values.yaml
- SO CNFM creates a new values.yaml, based on the retrieved values.yaml + lifecycleParameterKeyValues
- SO CNFM performs "helm template " to render K8S resource template(s)
- With the rendered k8S resource template(s), SO CNFM gets a placement decision from the Placement component (e.g., OOF)
- Currently, use of OOF is out of the scope from the initial PoC
- In the initial PoC, a simplified placement function will be used
- Based on the placement decision, SO CNFM determines the target K8S cluster
- Set the Helm command environment to connect to the target K8S cluster
- set .kube/{target K8S cluster name}.config
- SO CNFM invokes "helm install" command with the corresponding Helm Chart and a new values.yaml
- SO CNFM will have a few South-Bound plugin (helm client, CNF Adapter, others)
- in the initial PoC, the helm client will be used
- If successful, SO CNFM update the corresponding vf-module in the AAI
PlantUML Macro | ||
---|---|---|
| ||
@startuml
participant SO_Client
participant SO
participant SO_BPMN
participant CNFM
participant AAI
participant SDNC
participant OOF
participant ASD_Catalog_Mgr
participant Helm_Repository
participant K8S_Cluster
autonumber
group ASD-Based CNF Instantiation
SO_Client -> SO : Create Service
SO -> SO_BPMN : Process and Decompose Service
SO_BPMN -> AAI : Create Service Instance
opt Service-Level Homing
SO_BPMN -> OOF : Homing Information (optional for PoC)
OOF -> SO_BPMN : Receive Homing Information (optional for PoC)
end
SO_BPMN --> SO_BPMN : Process Model Info & Decide flows
SO_BPMN -> CNFM : Delegate Resource Orchestration,\npass input parameters
CNFM -> ASD_Catalog_Mgr : Get ASD
CNFM -> Helm_Repository : Get associated Helm Charts
CNFM --> CNFM : Process and decompose ASD and DeploymentItems\n(VF & Vf-Modules)
CNFM --> CNFM : get DeploymentItem order and create a sequence list
CNFM --> CNFM : execute each deployment item by following the sequence order
loop
CNFM -> AAI : Create vf-module
CNFM -> SDNC : Assign vf-module
CNFM --> CNFM : Get AsInstance LifecycleParameterMetadata from the request
CNFM --> CNFM : Get the corresponding Helm Chart
CNFM --> CNFM : Create a new values file by replacing the values file from the Helm Chart with LifecycleParameterMetadata
CNFM --> CNFM : generate K8S resource (e.g., helm template) based on the Helm Chart plus a new custom values file
CNFM -> OOF : get a placement decision (for PoC, returns a predefined K8S cluster name)
CNFM --> CNFM: set kube config environment for the target K8S Cluster
CNFM --> K8S_Cluster : invoke Helm Install with a custom values file
CNFM -> AAI : Update vf-module
end
end
@enduml |
Create an AS Identifier
In order for an application (CNF) to be eligible for instantiation, a CNF identifier must be created to identify the application service as a unique instance.
...