Thursday, August 2, 2012

ActiveBatch Deployment and Localization

Introduction

 ActiveBatch deployment consists of exporting the structure from the source environment and importing it into target. The exported structure is an xml file generated by Abat.This xml file contains all the activebatch objects including the variables.For deployment in environments this file need to be imported into active batch instance of other environment. The challenge here is whenever the file is imported into other environments the values of old env. need to be localizad with new values. The below solution describes on how to automate the complete process of Deployment and Localization.

Link to ActiveBatch home site - http://www.advsyscon.com/products/activebatch/job-scheduling.asp

Deployment Strategy


 The deployment will be two-step process




1.       Import of Package

2.       Localization

Against the usual convention of localizing the package before deployment here the idea is to deploy the package first and then localize.


Import of Package

 



This steps leverages the inbuilt functionality of Abat which is capable of importing any Abat xml file into specified path of any job scheduler. 




As in snapshot above the input consist of –

·         Job schedulerTargetMachineName

·         ActiveBatch Object- Path where xml file need to be copied

·         InputFilePath of Abat xml package

·         conflictResolution- action in case of conflicting scenario

This can be configured one time during initial setup and package path can be provided.



Localization



This step deals with the execution of .Net tool which as parameter accepts –

1.       MachineName

2.       LocalizedFile Path

3.       Environment

Custom tool called AbatDeployer.exe is console Net application which leverages the com object of Active batch to change the Abat object .Please refer to AbatDeployer tool section for more details.

The input to this tool apart from the console argument specified above is config file .Below is the format of config file.




Since this is demo the input is taken from XML file which can be rather extended to Excel format.
This file lets you specify
1. All the folder path where the objects can be scanned.All the paths are clubbed together in very beginning. Since this is demo this is just for understanding however the best implementation is tool can itself scan whole tree structure .

2. Object and its properties which if found in any of the paths will be updated by new properties as per config file.

Currently the localization is implemented for below objects-

1.       Variables
2.       Queues
3.       UserAccount
4.       Service Reference



The functionality can be extended for other object if required.-

For the Net Localization tool source code check out -http://anupkumarsharma.codeplex.com/releases/view/92216






4 comments:

  1. Hi Anup must say really nice post. Did help me a lot in getting started with Active Batch. Buddy I am still stuck with 2 questions:

    1) After running a SQL job in active batch how to capture the returned output parameter from the job in the c# code.

    2) I have a job in ActiveBatch which is a job library. Now this job consists of 16 steps. A few steps contain even nested jobs. like e.g. step 5 in itself is a chain of nested jobs of 6 steps. Now how can I get access to any particular job step / nested job. I need to enable/disable them and also should be able to modify the job step / nested job.

    Though this is not that important but I also wish to know why ActiveBatch uses the "lite" versions. e.g what's the difference between IFolderLite and IFolder, IabatJob and IabatJobLite.

    Waiting eagerly for your response.

    Thanks and Regards,
    Gaurav

    ReplyDelete
  2. Hi Gaurav,
    1.How are you storing the output of the SQL job,its possible in different way.If you mean sql agent job then its just status which can be easily checked. For other SQL job steps you can store in specific environment variable and get the value using C#.

    If default the only option is to get hold of log file and get the output.This is a property of Job where offset and length can be specified.
    Note- There is not much option to use COM for ABAT. A lot of thing are abstracted and using C# is just an extension and should not be used to control ABAT.


    2.There is no library function for this however you can get job.steps() as ABATvariables but its abstracted and i am sure if its even possible to control the individual job steps inside a job library.Though if you have a plan you can control jobs.
    3.As name "IabatJobLite" says its a lite object. You only get few properties which are essential for small operations.Its reduces memory overhead since IabatJob is a huge object and have advanced properties which in most cases useless.

    Hope this will help. I will be doing research on point 2 and see if its possible.

    ReplyDelete
  3. Hi Anup..,

    Thank you so much for sharing your information about the Active Batch.

    My client is looking for automating linux cron job. Active Batch was selected for automation. Please provide your overall experience with tool.

    1. How is the vendor support for the tool ? Are thy provide 24/7 support ?
    2. Out of 10. How much you will rate for this tool ?
    3. I have worked on BMC Control-M, if you aware of Control-M. How will rate, when compare Control-M and ActiveBatch.
    4. Does the tool has SMS compatibility for auto ticketing ?
    5. Do you problems with the tool and Pro's and Con's , please share with me.

    Thank you in Advance...,

    Regards,
    Ram.

    ReplyDelete
  4. 1. How is the vendor support for the tool ? Are thy provide 24/7 support ? - [Anup] Yes. ABAT team has very nicely structured support structure present and depending on the severity of your ticket, they reply on timely basis. They do provide 24/7 support but it depends on support subscription you are buying.
    2. Out of 10. How much you will rate for this tool ?[Anup]- I cant rate this job unless I know the on very area you are taking about but in general in terms of flex. and stability I would rather 9.
    3. I have worked on BMC Control-M, if you aware of Control-M. How will rate, when compare Control-M and ActiveBatch. - [Anup] I am not aware of Control-M
    4. Does the tool has SMS compatibility for auto ticketing ? - I dont think so it has any such feature out of box but I know the workflows can be extended to meet the SMS compatiblity but its best to speak with ABAT team straight on this, may be they are including it in new release.
    5. Do you problems with the tool and Pro's and Con's , please share with me. - You have lots of advantage
    1. Easy to automate and highly stable
    2. Lot of complex automation can be easily moved to active batch
    3. etc.

    Cons
    1. It has a good learning curve to understand the internals
    2. Bit difficult to extend and developer should know what hes doing

    ReplyDelete