diff options
author | 2023-04-21 13:34:28 +0100 | |
---|---|---|
committer | 2023-04-21 14:39:03 +0100 | |
commit | 01605014633904e8429cbe6b42e7d6b3edb89acb (patch) | |
tree | cfa5dea69c9d7fe52f7d88a6c87cdfc107eb7e31 /docs/clamp/acm/design-impl/participants | |
parent | f2ff03eb4b1be69dfddc3fbda559d1a82fc5c3cc (diff) |
Add documentation for Kserve participant
Documentation added for Kserve participant with tosca.
Issue-ID: POLICY-4609
Signed-off-by: aravind.est <aravindhan.a@est.tech>
Change-Id: I43215708da72d0261e1352a683cd882ca59343c2
Diffstat (limited to 'docs/clamp/acm/design-impl/participants')
4 files changed, 229 insertions, 0 deletions
diff --git a/docs/clamp/acm/design-impl/participants/kserve-participant.rst b/docs/clamp/acm/design-impl/participants/kserve-participant.rst new file mode 100644 index 00000000..618b7ebd --- /dev/null +++ b/docs/clamp/acm/design-impl/participants/kserve-participant.rst @@ -0,0 +1,95 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. + +.. _clamp-acm-kserve-participant: + +Kserve Participant +################## + +The Kserve participant receives inference service information from CLAMP runtime and creates the inference services in the Kubernetes cluster. The participant acts as a wrapper around Kserve and creates the inference service. + +Supported message Broker are DMaap and Strimzi-Kafka. + +.. image:: ../../images/participants/kserve-participant.png + +When an automation composition is initialized, the Kserve participant starts a Kserve Automation Composition +element for the automation composition. It reads the configuration information sent from the +Automation Composition Runtime and runs a REST client to talk to the K8s API to create the inference services. + +Prerequisites for using Kserve participant: +------------------------------------------- + +- Kserve installation in the same k8s cluster where Kserve participant is running. + + +Supported Element Types +----------------------- +Supported Element Types for Kserve participant will be used to define the Kserve participant Element Definition Types in tosca template. +Participant Supported Element Types is defined in Kserve participant application.yaml. + +.. code-block:: YAML + + participantSupportedElementTypes: + - + typeName: org.onap.policy.clamp.acm.KserveAutomationCompositionElement + typeVersion: 1.0.1 + +Defining a TOSCA CL definition for Kserve participant: +------------------------------------------------------ + +A *Kserve Inference Service Entity* describes a inference service that is managed by the Kserve participant. A +Inference Service Entity can be created, Read, and Deleted. The user defines +the Inference Service Entities that it wants its Kserve Automation Composition Element to manage. + +Sample tosca template defining a participant and a AC element definition. :download:`click here <tosca/tosca-kserve-participant.yml>` + + +Configuring a Automation Composition Element on the Kserve participant for a Automation Composition +--------------------------------------------------------------------------------------------------- + +The user defines the following properties in the TOSCA template for the Kserve participant: + +.. list-table:: + :widths: 15 10 50 + :header-rows: 1 + + * - Property + - Type + - Description + * - kserveInferenceEntityId + - ToscaConceptIdentifier + - The name and version of the inference service that needs to be managed by the Kserve participant + * - name + - String + - The name of the inference service + * - namespace + - String + - The namespace in the k8s cluster where the inference service needs to be installed + * - payload + - String + - The payload of the inference service kubernetes entity. This will be used as payload to call the Kubernetes API. + +Sample Automation Composition instances. +In that example the user fills the properties defined in the TOSCA for the Kserve participant :download:`click here <tosca/automation-composition-kserve.yml>` + +Kserve participant Interactions: +-------------------------------- +The Kserve participant interacts with Automation Composition Runtime on the northbound interface via Message Broker. It interacts with the Kubernetes API on the southbound interface for performing Kserve relation operations. + +The communication for the Automation Composition updates and state change requests are sent from the Automation Composition Runtime to the participant via Message Broker. +The participant performs appropriate operations on Kserve via Kubernetes REST based on the received messages from the Automation Composition Runtime. + + +Kserve participant Workflow: +---------------------------- +Once the participant is started, it sends a "REGISTER" event to the Message Broker topic which is then consumed by the Automation Composition Runtime to register this participant on the runtime database. +The user can commission the tosca definitions from the Policy Gui to the Automation Composition Runtime. +Once the automation composition definitions are available in the runtime database, the user can prime them and further updates the participant with these definitions via Message Broker. +After priming, the Automation Composition can be instantiated with the default state "UNDEPLOYED" from the Policy Gui. + +When the state of the Automation Composition is changed from "UNDEPLOYED" to "DEPLOYED" from the Policy Gui, the kserve participant receives the automation composition state change event from the runtime and +deploys the inference service associated with each Automation Composition Elements by calling the kubernetes api in the cluster. + +The participant also monitors the deployed inference services for the configured time until the inference services comes to RUNNING state. +It holds the deployment information of the inference service including the current status of the inference services after the deployment. + +When the state of the Automation Composition is changed back from "DEPLOYED" to "UNDEPLOYED", the participant also undeploys the related inference service from the cluster. diff --git a/docs/clamp/acm/design-impl/participants/participants.rst b/docs/clamp/acm/design-impl/participants/participants.rst index 2a948350..4dab3434 100644 --- a/docs/clamp/acm/design-impl/participants/participants.rst +++ b/docs/clamp/acm/design-impl/participants/participants.rst @@ -36,4 +36,5 @@ The detailed implementation of the CLAMP Participant ecosystem is described on t http-participant k8s-participant a1pms-participant + kserve-participant policy-framework-participant diff --git a/docs/clamp/acm/design-impl/participants/tosca/automation-composition-kserve.yml b/docs/clamp/acm/design-impl/participants/tosca/automation-composition-kserve.yml new file mode 100644 index 00000000..7194df8f --- /dev/null +++ b/docs/clamp/acm/design-impl/participants/tosca/automation-composition-kserve.yml @@ -0,0 +1,19 @@ +name: DemoInstance0 +version: 1.0.1 +compositionId: {{compositionId}} +description: Demo automation composition instance 0 +elements: + 709c62b3-8918-41b9-a747-d21eb79c6c26: + id: 709c62b3-8918-41b9-a747-d21eb79c6c26 + definition: + name: onap.policy.clamp.ac.element.KserveAutomationCompositionElement + version: 1.2.3 + description: Starter Automation Composition Element for the Demo + properties: + kserveInferenceEntities: + - kserveInferenceEntityId: + name: entity1 + version: 1.0.1 + name: demo-inference-service + namespace: demo-namespace + payload: '{"apiVersion": "serving.kserve.io/v1beta1","kind": "InferenceService","metadata": {"name": "sklearn-iris"},"spec": {"predictor": {"model":{"modelFormat": {"name": "sklearn"},"storageUri": "gs://kfserving-examples/models/sklearn/1.0/model"}}}}' diff --git a/docs/clamp/acm/design-impl/participants/tosca/tosca-kserve-participant.yml b/docs/clamp/acm/design-impl/participants/tosca/tosca-kserve-participant.yml new file mode 100644 index 00000000..815b7660 --- /dev/null +++ b/docs/clamp/acm/design-impl/participants/tosca/tosca-kserve-participant.yml @@ -0,0 +1,114 @@ +tosca_definitions_version: tosca_simple_yaml_1_3 +data_types: + onap.datatypes.ToscaConceptIdentifier: + derived_from: tosca.datatypes.Root + properties: + name: + type: string + required: true + version: + type: string + required: true + org.onap.datatypes.policy.clamp.acm.kserveAutomationCompositionElement.KserveInferenceEntity: + version: 1.0.0 + derived_from: tosca.datatypes.Root + properties: + kserveEntityId: + type: onap.datatypes.ToscaConceptIdentifier + type_version: 1.0.0 + required: true + description: The name and version of a Configuration Entity to be handled by the Kserve Automation Composition Element + name: + type: string + required: true + description: Inference service name to be created + payload: + type: string + required: true + description: Inference Service payload + +node_types: + org.onap.policy.clamp.acm.Participant: + version: 1.0.1 + derived_from: tosca.nodetypes.Root + properties: + provider: + type: string + required: false + org.onap.policy.clamp.acm.AutomationCompositionElement: + version: 1.0.1 + derived_from: tosca.nodetypes.Root + properties: + provider: + type: string + required: false + participantType: + type: onap.datatypes.ToscaConceptIdentifier + required: true + startPhase: + type: integer + required: false + constraints: + - greater-or-equal: 0 + metadata: + common: true + description: A value indicating the start phase in which this automation composition element will be started, the + first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped + in reverse start phase order. Automation Composition Elements with the same start phase are started and + stopped simultaneously + org.onap.policy.clamp.acm.AutomationComposition: + version: 1.0.1 + derived_from: tosca.nodetypes.Root + properties: + provider: + type: string + required: false + elements: + type: list + required: true + entry_schema: + type: onap.datatypes.ToscaConceptIdentifier + org.onap.policy.clamp.acm.KserveAutomationCompositionElement: + version: 1.0.1 + derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement + properties: + kserveInferenceEntities: + type: list + required: true + entry_schema: + type: org.onap.datatypes.policy.clamp.acm.kserveAutomationCompositionElement.KserveInferenceEntityId + type_version: 1.0.0 + description: The configuration entities of Kserve inference service +topology_template: + node_templates: + org.onap.policy.clamp.acm.KserveParticipant: + version: 2.3.4 + type: org.onap.policy.clamp.acm.Participant + type_version: 1.0.1 + description: Participant for Kserve requests + properties: + provider: ONAP + + onap.policy.clamp.ac.element.KserveAutomationCompositionElement: + version: 1.2.3 + type: org.onap.policy.clamp.acm.KserveAutomationCompositionElement + type_version: 1.0.1 + description: Automation composition element for the Kserve Requests + properties: + provider: ONAP + participantType: + name: org.onap.policy.clamp.acm.KserveParticipant + version: 2.3.4 + uninitializedToPassiveTimeout: 60 + statusCheckInterval: 30 + + onap.policy.clamp.ac.element.AutomationCompositionDefinition: + version: 1.2.3 + type: org.onap.policy.clamp.acm.AutomationComposition + type_version: 1.0.0 + description: Automation composition for Kserve request + properties: + provider: ONAP + elements: + - name: onap.policy.clamp.ac.element.KserveAutomationCompositionElement + version: 1.2.3 |