Best Practice recommendation for Business Application Instance (BAI) synchronization

Version 1
    Share This:

    Best Practice recommendation for Business Application Instance (BAI) synchronization

     

     

    Business requirement:- 

     

    Typically BMC ADDM Application models are developed on Development or Test Environment which later on deployed to Production environment for complete testing and validation with Application SME, Application owner or business owner. In most of cases; limitation of ADDM Development  or Test Environment to discover all production infrastructure assets drive requirement of complete testing and validation on ADDM production environment. In such scenario one requires a way to control Business Application instance synchronization to CMDB. Continues CMDB Synchronization approach for Business Application Instance will push Application maps to production CMDB prior validation with Application SME.  In most of cases; organizations use a unique identifier to identify their business application like Application ID, Application code or Application acronym etc and one requires way to control CMDB synchronization based on such identifier. This drives a requirement of selective Business Application Instance Synchronization to CMDB using unique Business Application identifier.

     

     

    Solution:- 

     

    First add custom (e.g. CIID) attribute to BusinessApplicationInstance which is used to control Business Application Instance (BAI) synchronization to CMDB using Sync Filters (e.g. CIID Defined or CIID is not Unknown). Develop a Pattern (App Release) which will hold information of all released application in the form of TPL table and default value is set as ‘Unknown’. This Pattern Triggers whenever BusinessApplicationInstance Created or Confirmed. This Pattern requires to be updated whenever any BAI requires to be released/recalled to/from CMDB. Develop a Sync mapping Pattern (CMDB.Extension.BAI_Application_Extension ) which will synchronize BAI ciid with bmc_application.AssetID in BMC.ADDM dataset. This approach allows selective BAI synchronization with CMDB and sets Asset ID in applications. Please refer attached diagram and sample TPL programs for reference. Please make a note that Atrium Discovery Application service requires to be restarted after adding custom attribute to BusinessApplicationInstance.     

     

     

    1. App Release Pattern

     

    tpl 1.6 module AppRelease;

     

    // This table is used to find the CI ID for a given BAI.

     

    metadata

        publishers := "BMC Software";

    end metadata;

     

    table App2CIID 1.0

    "app a" -> "APP-1";

    "app c" -> "APP-1";

    default  -> "Unknown";

    end table;

     

    pattern AppRelease 1.0

        """

       Pattern for application name to CI ID based on BAI.name

       This pattern triggers on a BAI being created and confirmed; IT then looks up

       the BAI ID,obtains the CI ID for that application, and applies it to the BAI

        """

     

      overview

        tags App2CIID, CIID;

      end overview;

     

      // We trigger whenever a BAI is created for the first time, or confirmed on

      // a subsequent discovery run.

     

      triggers

        on bai := BusinessApplicationInstance created, confirmed;

      end triggers;

     

      body

     

      bai_name := text.lower(bai.name);

     

      if not bai_name then

            // No BAI Type

    log.info("BAI name missing for %bai.name%");

            stop;

        end if;

            // Lookup CI ID for BAI from the table

     

            bai_ciid := App2CIID[bai_name];

    log.debug("App_to_CIID: CIID is %bai_ciid% for %bai_name%");

     

            // Set bai_ciid as custom variable on BAI model

            bai.ciid := bai_ciid;

     

      end body;

    end pattern;

     

     

     

    1. Sync Mapping Pattern

     

    tpl 1.6 module CMDB.Extension.BAI_Application_extension;

     

    from CMDB.BAI_Application import BAI_Application 1.3;

     

    syncmapping BAI_CI_ID 1.0

        """

        Add CI ID Attribute to Business Application Instance.

        """

        overview

            tags BAI, CIID;

        end overview;

     

        mapping from BAI_Application.bai as bai

            // No additional structure -- we are just modifying the

            // existing SoftwareServer CI.

         end mapping;

     

        body

    application  := BAI_Application.application;

           

            if bai then

     

                            if bai.ciid then

     

    application.AssetID := bai.ciid;

     

                end if;

     

            end if;

     

        end body;

     

    end syncmapping;