Appspec files in Informatica Cloud Spring '17 "AaaP" agent.

Visibility: Open to anyone

    Preface:

     

    Agent as a Platform (AaaP) is the new Secure Agent architecture designed to support independent applications.

    AaaP agent manages these applications using apspec files. So it is important to know about appspec files and its contents.

    This article gives a brief idea about appspec files and its contents.

     

    It is good to know about AaaP agent before going through this article. Refer to This article on the AaaP agent.

     

    Overview:

     

    In AaaP agent Agent Core is the process that is responsible for agent maintenance and also it manages various application services running under that agent.

    Agentcore process has components like Channel Client and Life Cycle Manager (LCM). LCM is the one which actually manage applications serveries. So it uses appspec files.

     

    Appspec files are the configuration files for the application services that runs under AaaP agent. In legacy agent aapspec file does not exist  where as AaaP agent does manage applications and each one owns a independent appspec file.

    This is because in AaaP every application service is treated as independently, so it is important to have a separate configuration file.

     

    What is appspec file?

     

    An appspec  is a YAML file that contains all the information required to tell the LCM in agentcore on how to manage the applications like Data Integration Service (DIS) and Process Engine (ICRT) in AaaP.

    This file is created when agent starts up and modified whenever there are configurations changes to the respective applications like enabling licenses, adding JVM parameters etc.. in Cloud UI.

    One can find appspec files in location %Agent_Installation_Directory%\app\agentcore\data for all the application services that are running in that agent.

     

    Disassembly of Data Integration Service appspec file:

     

    name: Data_Integration_Server

    Name of the particular application

    displayName: Data Integration Server

    Application name

    version: 26.0.11

    Version of the application

    platform: win64

    Associated operating system

    dependencies:

    - package-ICSAgent_R26.9

    - package-ICSAgentDriver_V1.2

    - package-runAJobCli.2

    - package-saas-xmetadataread.5

    - package-StructureDiscovery.260

    - package-DataTransformation.7

    - package-UDTforHierarchy.4

    - package-azuredatalake.3

    - package-sapbapi.3

    - package-AmazonS3.25

    Contains list of dependent packages for that application service. This packages are nothing but what we see in ICS UI console.

    Here a packages is simply a zip file that contains two elements.

     

    The first is a subfolder named ‘package’.  This folder should contain all the files associated with this particular package.

     

    The second element in the package zip file is a file that must be named ‘packageInfo.xml’.

     

    More information :

     

    When a package is deployed, the package zip file is first downloaded, and then unzipped.   Then all the files are copied to their destination directory based on the contents of the ‘packageInfo.xml’ file.

    Note that the files are not actually copied.  Instead, symbolic links are created.  This decreases the overall amount of disk space required for AaaP agent.

    Control scripts :

     

    Deploy

    start

    status

    stop

      script: <script_name.bat>

      timeoutPeriod: 900

      waitPeriod: 60

    There are four control scripts: deploy, start, status, and stop.

    The LCM in agentcore uses these scripts to control the lifecycle of the application services.

     

    The deploy script is called once just before an application service is started for the first time.

    The start script is called when the LCM wants to start the application service.

    The status script is called periodically to determine whether or not the application service is still running.

    The stop script is called whenever the application service needs to be stopped.

     

    Each script has an associated timeoutPeriod. This controls how long the agent expects a script to run.

    Any script that runs past the timeoutPeriod is terminated, and this is then treated as a failure.

    WaitPeriod  indicates the length of time between status calls.  (The units are in seconds).

     

     

    More information:

     

    Each script is expected to return an exit value. Scripts returns 0 on their successful completion. Application will be moved to DEPLOYED state when deploy script returns 0.

    Post successful execution of start script moves the application state to RUNNING state.

    Return 0 for status script indicates that the application is running fine.

    restart:

    maxAttempts: 400000

    waitPeriod: 60

     

    maxAttempts :  Indicates how many time an application can be restarted.

    waitperiod: Indicates how long to wait between restart attempts (in seconds)

    replace: COPY

    The replace section allows to specify replacement policy.

    The replacement policy is used to define how to handle, when newer version of application service is available on agent.

     

    COPY : This tell that agent to make a copy of versions of the application service instead of replacing it.

     

    More information :

     

    In addition to COPY there are various other replacement policies available like REPLACE, SKIP and REPLACE_VERSION.

    For Process-engine “REPLACE_VERSION” policy is used.

    REPLACE_VERSION:  Whenever there is a major version change then current application is replaced with the newer application available.

    ports:

    - assignedPort: 14001

      hostName: localhost

      name: DI_TOMCAT_PORT

      port: 0

      tunnel: true

     

    The ports section allows the specification of the ports that the agent assigned for the application.

     

    Hostname: By default hostname is localhost.

    AssignedPort: Port number that agent allotted for the application. The port can be any valid port in the range from 0 to 65535.

    Tunnel: By default this option is set to ‘yes’ which indicates that the agent should open a tunnel for ICS Server.

    templates:

    - ICS\main\infaagent.ini.mustache

    - ICS\main\bin\rdtm\pmrdtm.cfg.mustache

    - ICS\main\tomcat\tomcat.cfg.mustache

    - ICS\main\tomcat\saas-infaagentapp_config.bat.mustache

    - ICS\main\tomcat\saas-infaagentapp.bat.mustache

    Templates are text files that have tagged text like {{}} will be substituted with actual  property value in the properties section

     

    Here templates section contains a list of relative paths to files that have templates that need to be filled in.

    These files must end with ‘.mustache’.

    After the templates have been filled in, the ‘.mustache’ extension will be removed.

     

    More information :

     

    For the files listed in template section an copy of the entire file is placed in the destination directory, and NOT a symbolic link.

    properties:

    TOMCAT_CFG:

        TunnelRetryInterval: 5

         TunnelTimeoutPeriod: 300

     

    TOMCAT_JRE:

        JRE_OPTS: -Xrs

        INFA_MEMORY: -Xms32m -Xmx256m –  XX:MaxPermSize=128m

     

    PMRDTM_CFG:

    OdbcDataDirectWapiWithSQLWChar: 1

        $PMSourceFileDir: $PMRootDir

        JVMOption1: null

        JVMOption3: null

        PMUser: rDTMUser

     

    This section has attribute and value associated with the configuration of the application service. These values will be replaced in the mustache file for the application service initialization and configuration.