Cherry App Deploy - Common - E2E

Sequence Diagram

 Click here to view plantUML...

@startuml
Autonumber
Skinparam sequenceArrowThickness 2
skinparam ParticipantPadding 5
skinparam BoxPadding 10

Box "SMO/Non-RT RIC Framework" #gold
   participant NFO as "NF Orchestration" <<INT OTF>>
   Boundary MC as "Model Catalog" <<SMO MVC State Manager>>
   Boundary VI as "Virtual Inventory" <<SMO MVC State Manager>>
   Boundary IC as "Instance Config" <<SMO MVC State Manager>>
   Participant AppMgr as "rAPPMgr" <<NRTRIC>>
end box

Box "RIC\napplication execution environment " #goldenrod
   participant App as "Application" <<RICAPP>>
   participant Sidecar as "APP Sidecar" <<RICAPP>>
end box

Box "O-Cloud Platform"  #lightseagreen
   participant IMS as "Cloud Manager"
   participant DMS as "Deployment Manager"
End box

== Building Block Identity & Legend ==

note over NFO, DMS #royalblue
**<color: yellow>Building Block : Deploy Application - Common - E2E </color>**
end note

== Assumptions and Prerequisites ==

note over NFO, DMS #darkorange
xAPP Standard Software Package has been onboarded and a configuration for rAPP deployment is installed via Application LCM Use Case Step 4.
end note

== Begin Building Block ==

  NFO -> IC : GET ..serviceConfig/v1/ServiceConfigurations/<serviceConfigurationLabel>

  NFO -> IC : GET ..serviceConfig/v1/ServiceConfigurations/<serviceConfigurationLabel>/Resources

  loop foreach resourceConfigID to Deploy
  NFO -> IC : GET ..serviceConfig/v1/ServiceConfigurations/<serviceConfigurationLabel>/Resources/<ResourceConfigID>

  NFO -> VI : GET deployments/v1/deployments/<RICDeploymentID>

  NFO -> VI : GET ..OCloud/v1/OClouds/<hostingOcloudID>

  NFO -> VI : GET ..OCloud/v1/OClouds/<hostingOcloudID>/deploymentServices/<hostingOcloudDMSID>

Group Install Images in O-Cloud

  NFO -> MC : GET ../applications/<applicationID>/deployments/<deploymentID>/images
  Loop for each image in images
     NFO -> MC : GET ../applications/<applicationID>/deployments/<deploymentID>/images/<imageID>

     NFO -> IMS : <<O2-M>> PUT https://<IMDEndPoint>/api/v1/images {resourcePoolID, imageURL}
     Note left of IMS
     The Resource pool where the image is expected to be deployed should be specified,
     this could be a list of locations. The O-Cloud being distributed may have its own
     strategy for image repository distribution.
     End note

     IMS -> IMS :
     Note left : Check if ImageInstanceExists

     Alt if ImageInstance Exists then
       IMS --> NFO : Return 200 OK
     Else
       IMS -> IMS :
       Note Left : Store Image
       IMS --> NFO : Return 202 Created
     End if
  end
End

Group Application deployment to O-Cloud

  NFO -> DMS : <<O2-D>> POST https://<DMSEndPoint>/api/v1/deployments {\n\tlocation, \n\tdeploymentDescriptor, \n\tinstanceConfig.deploymentParameters}

  Note left of DMS
     Normally the O-Cloud would iterate through all deployments in the descriptor
     In this example we remove the iteration for the two known workloads that will
     be in the descriptor
  End note

  DMS -> App ** : create
  DMS -> Sidecar ** : create

  DMS --> NFO : <<O2-D>> notify Workload created

  NFO -> VI : PUT ../deployments/v1/deployments/{deploymentID} {deploymentRecord}

End

Alt if Apptype was xAPP then

    NFO -[#blue]>] : execute Enable xAPP in near-RT RIC
    note over NFO, DMS #royalblue
      **<color: yellow>Building Block : xAPP Startup in Near-RT RIC Instance </color>**
    end note
    ]-[#blue]-> NFO : Status (Success)

Else if Apptype was rAPP then

    NFO -[#blue]>] : execute Enable rAPP in Non-RT RIC
    note over NFO, DMS #royalblue
      **<color: yellow>Building Block : xAPP Startup in Near-RT RIC Instance </color>**
    end note
    ]-[#blue]-> NFO : Status (Success)

End if

   NFO -> IC : ../serviceConfig/
End

Group Update Resource Config
Note over NFO
   set resourceConfig.State = DEPLOYED;
   set resourceConfig.DeploymentID = DeploymentID
end note

  NFO -> IC : PUT ..serviceConfig/v1/ServiceConfigurations/{serviceConfigurationLabel}/Resources/{ResourceConfigID}?revisionID={resourceConfig.revisionID} {resourceConfig}
End

Group Check serviceConfig.State

   Note right of NFO
      Set serviceConfigTargetState = DEPLOYED
   End note

   Loop For each resource in ServiceConfig
      Alt if resourceConfig.State <> DEPLOYED then
        Note left of IC
          Set serviceConfigTargetState = DEPLOYING
          Exit loop
        End note
      End if
   End
   Alt If serviceConfig.State <> serviceConfigTargetState then
      Note right of NFO: set serviceConfig.State = {serviceConfigTargetState}
      NFO -> IC : PUT ..serviceConfig/v1/ServiceConfigurations/{serviceConfigurationLabel}?revisionID={ServiceConfig.revisionID} {serviceConfig}
   End if
end

@enduml