FOCOM Adapter Integration with TEIV

FOCOM Adapter Integration with TEIV

The FOCOM Adapter provides integration with FOCOM clusters to retrieve Custom Resources (CRs),
extract the required attributes, and map them to Cloud Model entities and relationships for TEIV.

Overview:

The FOCOM Adapter connects to FOCOM clusters, retrieves specific CR information, and transforms it into TEIV-compliant entities and relationships.
This integration enables automated ingestion of cloud model topology data into the TEIV.

Prerequisites:

Clone the repo:
git clone "https://gerrit.nordix.org/oransc/smo/teiv"

FOCOM adapter needs access to the kubeapiserver endpoints provided in the focom/o2ims kubeconfig files, we need to access both FOCOM and O2ims clusters to retrieve the attributes to build Cloud model entities and relationships.

FOCOM Reference: https://docs.nephio.org/docs/guides/user-guides/usecase-user-guides/exercise-4-ocloud-cluster-prov/.

Current Implementation Status:

Cluster Connectivity:
The adapter successfully establishes connections to both clusters using kubeconfig files:

  • FOCOM cluster

  • O2IMS cluster

Kubernetes Client Configuration:

The FOCOM Adapter connects to two independent Kubernetes clusters:

  1. FOCOM Cluster – provides CRs related to O-Cloud namespace and node cluster information

  2. O2IMS Cluster – provides oCloudNodeClusterId

To communicate with these clusters, the adapter requires two separate Kubernetes clients, each initialized with its own kubeconfig file. The configuration for this is implemented in the KubernetesConfig class.

CR Retrieval & Entity Construction:
The adapter is currently capable of retrieving three attributes and mapping them to corresponding Cloud Model entities and relationships.

  • Extracted Attributes:

  • OCloudNamespaceName

  • nodeClusterName

  • nodeClusterId

  1. Generated Cloud Model Entities:

  • OCloudNamespace

  • NodeCluster

  1. Generated Relationship:

  • OCLOUDNAMESPACE_DEPLOYED_ON_NODECLUSTER

How to Run the FOCOM Adapter

  • Build the Parent TEIV Project

mvn clean install
  • Run the FOCOM Adapter via Docker Compose
    Copy the kubeconfigs folder to docker-compose module.

  • Add the following service in docker-compose.yml:

focom-to-teiv-adapter: container_name: focom-to-teiv-adapter image: o-ran-sc/smo-focom-to-teiv-adapter:latest depends_on: - topology-ingestion-inventory environment: SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:9092 JAVA_TOOL_OPTIONS: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 volumes: - ./kubeconfig:/opt/app/teiv/config/kubeconfig:ro extra_hosts: - "focom-cluster-control-plane:host-gateway" - "kind-control-plane:host-gateway"
  • Then start the stack:

docker-compose up
  • Check for newly added entities and relationships in pgsql database via pgAdmin and also query the entities and relationships in TEIV Postman calls.