Configuring HP NFVD Observer jobs

You configure HP NFVD Observer jobs to dynamically load data from the HP NFVD REST interface.

Important: The HP NFVD Observer supports the HPE NFV Director API release 6.0.3.

Ensure you have the HP NFVD service details to hand, such as username, password, hostname and port.

The observer is installed as part of the core installation procedure.

The HP NFVD Observer job extracts HP NFVD resource information via REST. The observer loads and updates the resources and their relationships within the Agile Service Manager core topology service.

You define and start the following jobs.
Load job
Run this job whenever you need HP NFVD topology data refreshed.
By default, these jobs are one-off, transient jobs that perform a full upload of all requested topology data as soon as they are triggered.
You can also run these jobs (again) manually from the Observer UI, or schedule them to run at set times when configuring them.
Fileload job
Run this job to consumes topology data from a file.
The fileload job loads a baseline topology data view from a provided data file.
The fileload job is a transient (one-off) job that consumes topology data from the file, sends the data for processing, and then stops.
The fileload job provides an alternative to loading topology data through a file.
Listen job
A long-running job that reads LCM events published by HP NFVD on CGMB (Kafka) topic continually until it is explicitly stopped, or until the observer is stopped.
LCM messages in Kafka are typically encoded in Avro and are decoded by the observer using an HP NFVD LCM notification Avro schema file. Refer to the HP NFVD documentation on how to obtain the schema file. The additional steps required when using an Avro schema file are documented as part of the procedure.
The job should only be run after a load job has been completed.
The HP NFVD Observer loads the following resources and their relationship into the Agile Service Manager core topology service:
Table 1. HP NFVD resources and relationships loaded by the HP NFVD Observer job
Vertex Description
Organization Organization (for example, LOB) within Domain
VDC Tenant within Organization
VNF Group Group of VNF / CNF
VNF Virtual Network Function
CNF Containerized Network Function
VNFM Manager of VNF/CNF
VM Virtual Machine attached to VNF
Network Interface / Port Network Interface or Port attached to VNF
Connection Point Internal Connection Point
VNF-C VNF Component
CNF-C CNF Component
Virtual Link Virtual Network attached to VNF
Virtual Storage Storage attached to VNF
Deployment K8s resources attached to CNF
Statefulset K8s resources attached to CNF

Configure an HP NFVD Observer job

  1. From the Observer Configuration UI, click Configure under the HP NFVD icon, or select an existing job to be edited.
  2. Select the required Job type, define the following parameters, then click Run job to save and run the job.
    Table 2. Load job parameters
    Parameter Action Details
    Unique ID Enter a unique name for the job. Required
    HP NFVD data center name The name of the data center on which the HP NFVD is hosted. Required.
    Important: To observe the complete lifecycle of resources, configure the same data center name, username and hostname across all jobs.
    HP NFVD hostname Specify the hostname of the HP NFVD.
    HP NFVD username Specify the username.
    HP NFVD password Enter the password with which to authenticate. Required. Use plain text.
    HP NFVD host port Specify the port of the HP NFVD. Required
    HTTPS or HTTP connection to the HP NFVD server Choose to make either a HTTPS (secured) or HTTP connection to the HP NFVD server. Required. When set to true, provide the target system certificate to the certificate parameter.
    True for a CNF job and false for a VNF job The VNF job is expected to run with fewer threads and will take longer to complete.
    False
    If this filter parameter is set to false, cnf_group_filters defines group names to exclude.
    True
    If this filter parameter is set to true, cnf_group_filters defines group names to include.
    Required
    Target system certificate Specify a certificate by name to load into the trustStore.

    Required if the HTTPS connection to the HP NFVD server parameter is set to true.

    Required. For more information, see Configuring observer job security.
    On-prem
    Create and store the certificate in the ASM_HOME/security directory.
    OCP
    Obtain the authentication certificate using OpenSSL and store it as a secret.
    SSL Verification Choose whether SSL validation is true or false. Turning SSL validation false will use HTTPS without hostname validation. Optional
    Connection and read timeout Enter the time at which the connection and read actions time out. Optional. Must be a value greater than 0 (zero), and the default is 5000 (5 seconds).
    Correlate Set this to true to enable Event Analytics correlation on the topology grouping based on VNF Groups created by this job. Optional
    CNF group filters If specified, this parameter selects CNF groups by partial matching on group name. For example, if CNF1,CNF2 is specified, then a CNF job will only process matching groups such as 'MyCNF1Yeh' and 'YourCNF2No', and a VNF job will process groups that do not match. Optional
    First retry after delay (milliseconds) Set the initial delay for a retry. Optional
    Max elapsed time for retries (milliseconds) Set the maximum elapsed time for retries. Optional
    Job schedule

    Specify when the job should run, and whether it should run at regular intervals.

    By default the job runs immediately, and only once.

    Optionally you can specify a future date and time for the job to run, and then set it to run at regular intervals after that.

    Optional. Transient (one-off) jobs only.

    If you set a job schedule, the run intervals must be at least 90 seconds apart, and if you set them at less than 15 minutes, a warning is displayed, as the frequency can impact system performance.

    Observer job description Enter additional information to describe the job. Optional
    Table 3. Fileload job parameters
    Parameter Action Details
    Unique ID Enter a unique name for the job. Required
    HP NFVD data center name The name of the data center on which the HP NFVD is hosted. Required.
    Important: To observe the complete lifecycle of resources, configure the same data center name, username and hostname across all jobs.
    HP NFVD hostname Specify the hostname of the HP NFVD.
    HP NFVD username Specify the username.
    Name of the VNF or CNF data file

    Specify the name of the VNF or CNF data file. Wildcards (*) are supported.

    Use separate data files for CNF and VNF resource types.
    Tip:
    • If the filename contains the token nfvd-cnf-data-dump/nfvd_cnf_data_dump, it is treated as a CNF resource.
    • If the filename contains the token nfvd-vnf-data-dump/nfvd_vnf_data_dump then it is treated as a VNF resource.
    Required. The data file must be located in the $/opt/ibm/netcool/asm/data/hpnfvd-observer directory.
    HP NFVD archive file retention days Specify the number of days that the HP NFVD archive files are retained. Optional. Default is 5 days.
    Correlate Set this to True to enable Event Analytics correlation on the topology grouping based on VNF Groups created by this job. Optional
    Job schedule

    Specify when the job should run, and whether it should run at regular intervals.

    By default the job runs immediately, and only once.

    Optionally you can specify a future date and time for the job to run, and then set it to run at regular intervals after that.

    Optional. Transient (one-off) jobs only.

    If you set a job schedule, the run intervals must be at least 90 seconds apart, and if you set them at less than 15 minutes, a warning is displayed, as the frequency can impact system performance.

    Observer job description Enter additional information to describe the job. Optional
    Table 4. Listen job parameters
    Parameter Action Details
    Unique ID Enter a unique name for the job Required
    HP NFVD data center name The name of the data center on which the HP NFVD is hosted. Required.
    Important:

    To observe the complete lifecycle of resources, configure the same data center name, username and hostname across all jobs.

    Limitation: Use host names instead of IP addresses.

    HP NFVD username Specify the HP NFVD username of the account.
    HP NFVD Kafka broker host Specify the host of the Kafka broker to which HP NFVD posts its LCM updates.
    HP NFVD Kafka broker port Specify the port number of the Kafka broker. Required
    The HP NFVD Kafka topic to listen for LCM notifications Specify the topic name for LCM notifications. Required
    True for a CNF job and false for a VNF job Specify True for a CNF job, or False for a VNF job. The VNF job is expected to run with fewer threads and will take longer to complete. Required.
    Important: To observe the complete lifecycle of resources, this must be the same as the option used in the Load job.
    SSL Choose to turn SSL on (or off) for Kafka connection. Turn this option on if the Kafka connection is secured using SSL. Optional
    Avro Decoding

    Choose whether Avro decoding is on or off (True or False).

    Set to True if incoming LCM messages are Avro encoded. If so, the Avro schema file is required.

    Optional. Default is false.
    Avro schema file The name of the Avro schema file to be used in decoding binary Avro Kafka messages. Required if Avro Decoding is set to 'true'. The file must be present in the $ASM_HOME/security folder.
    Observer job description Enter additional information to describe the job. Optional

To use the Avro schema file

Avro schema file setup is required if the Avro decoding parameter is set to True.
  • To use the LCM Avro schema file, you create three ConfigMaps (that is, schema, truststore and keystore) to be mounted to the existing volume.
  • To (optionally) also use the Kafka keystore and trustore files, you create a secret to hold passwords (that is, truststore and keystore passwords), and create a ConfigMap to hold the environment variables to be used by the observer (that is, the file path to schema, truststore and keystore).
Assumption: The Kafka keystore and truststore files are already setup together with the LCM Avro schema file.

  1. Create configMaps to mount the trustStore, keyStore and schema files to the existing volume.
    To use the LCM Avro schema file, create a ConfigMap for the schema file to be mounted to the existing volume. If Kafka is in secured mode (SSL), additionally create:
    • Two ConfigMaps (that is, truststore and keystore to be mounted to the existing volume)
    • A ConfigMap to hold the environment variables to be used by the observer (that is, truststore and keystore)
    • A secret to hold passwords (that is, truststore and keystore passwords)
    1. Create ConfigMaps to mount schema files to the existing volume.
      The example below creates configmaps Avro schema file named 'lcm-notification-schema.avsc':
      oc create configmap hpnfvd-lcm-notification-schema --from-file=lcm-notification-schema.avsc
      If Kafka is secured (SSL), keystore/truststore is most likely required. The example below creates ConfigMaps using the keystore file named 'keystore', and the truststore file named 'truststore':
      oc create configmap hpnfvd-kafka-truststore --from-file=truststore
      oc create configmap hpnfvd-kafka-keystore --from-file=keystore
      After creating ConfigMaps, you can verify the results using one of the following commands:
      oc describe <configMap name>
      or
      oc get <configMap name>
    2. Map them to volumes in the pod's deployment.
      Add to the existing volume, (asm-security), under 'volume Mounts' and 'volumes'. The following example lists the keystore/truststore for a secured Kafka:
      <...>
      volumeMounts:
        - mountPath: /opt/ibm/netcool/asm/security         <--- existing mount
          name: asm-security
      <...>
      
      volumes:
        - name: asm-security
          <...>	  
      
          <...>
      - configMap:
        name: hpnfvd-lcm-notification-schema
        optional: false
        items:
        - key: lcm-notification-schema.avsc
          path: lcm-notification-schema.avsc
      - configMap:
        name: hpnfvd-kafka-truststore
        optional: false
        items:
        - key: truststore
          path: truststore
      - configMap:
        name: hpnfvd-kafka-keystore
        optional: false
        items:
        - key: keystore
          path: keystore
      <...>
      
      You can verify the results using one of the following commands:
      oc exec -it <pod-name> -- ls /opt/ibm/netcool/asm/security
      The schema files, along with the truststore and keystore in a secured Kafka, should be listed.

Optional steps

The following steps are only required for secured Kafka environments using trustStore/keystore functionality.

  1. Create a secret for the truststore and keystore.
    For example:
    oc create secret generic hpnfvd-kafka-pass \
      	--from-literal=HPNFVD_KAFKA_TRUSTSTORE_PASS=passwordTrust\
      	--from-literal=HPNFVD_KAFKA_KEYSTORE_PASS=passwordKey
  2. Create a configMap.
    Example of a ConfigMap named 'hpnfvd-observer-configmap' which specifies the filepath to the truststore and keystore:
     oc create configmap hpnfvd-observer-configmap \
      	--from-literal=truststore.path=/opt/ibm/netcool/asm/security/truststore \ 
      	--from-literal=keystore.path=/opt/ibm/netcool/asm/security/keystore
    You can verify the results using the following command:
    oc get configmaps hpnfvd-observer-configmap -o yaml
  3. Add the Secrets and the ConfigMap to the observer pod's deployment.
    1. Add the created secrets to the deployment under 'containers':
      - name: HPNFVD_KAFKA_TRUSTSTORE_PASS
           valueFrom:
                secretKeyRef:
                  key: HPNFVD_KAFKA_TRUSTSTORE_PASS
                  name: hpnfvd-kafka-pass`
        - name: HPNFVD_KAFKA_KEYSTORE_PASS
              valueFrom:
                secretKeyRef:
                  key: HPNFVD_KAFKA_KEYSTORE_PASS
                  name: hpnfvd-kafka-pass
    2. Add the created ConfigMap to set the values of the following environment variables:
      • HPNFVD_KAFKA_KEYSTORE_PATH
      • HPNFVD_KAFKA_TRUSTSTORE_PATH
      These environment variables will contain the filepath set in the previous steps:
      - name: HPNFVD_KAFKA_KEYSTORE_PATH
              valueFrom:
                configMapKeyRef:
                  key: keystore.path
                  name: hpnfvd-observer-configmap
           - name: HPNFVD_KAFKA_TRUSTSTORE_PATH
              valueFrom:
                configMapKeyRef:
                  key: truststore.path
                  name: hpnfvd-observer-configmap