Batch Deployment

Deploying a Batch Job

You will need to have your batch script developed and tested on the batch Development and QA systems, i.e. batch-dev, batch-qa before proceeding with the following deployment instructions. Please proceed with the following steps irregardless of whether you have a Java or PERL job.

  • Batch jobs are developed on the ACT batch development environment (batch-dev) and tested on the ACT batch QA environment (batch-qa). All batch jobs will be deployed on the ACT production environment (act-batch).
  • Batch jobs will be scheduled to be run from the ASG-Zena “event-based” scheduler.
  • In case of new jobs, request Production-Control to create a new job for you and provide you the name.
  • Make sure to provide your point of contact for this job (use a mailing list or your group's FootPrints email address rather than an individual's email) in your request.
  • In case of existing jobs, include the Zena job name with your request to Production-Control
  • In order to get access to Zena interface on the QA environment, contact Production-Control

Deploy Process

For the deploy process, it is expected that batch job owners manage their source code via ACT's standard code management tool, Subversion (SVN). Single file deployments such as those frequently requested by the Data Warehouse team may not require a new SVN tag, specifying a file revision number will suffice. Teams deploying batch programs with supporting files should create an SVN tag for the project version being deployed.

SVN Tagged Batch Project Deployments

In order to deploy SVN tagged batch jobs to production (act-batch) follow these steps:

  1. Thoroughly test job on QA environment (batch-qa)
  2. Tag release version in source code repository, make note of the tag name/label
    1. Include the app and all required files (/lib, /db) in the SVN tag, including compiled binary files so they may be checked out by Production Control
  3. Send a standard production request ticket to the Production Control team to checkout the SVN tag and move/copy the job to the actual directory on the production act-batch environment
    1. Note: In the request note reason for the change, which files need to be deployed, and what action to take in the event the job fails
  4. Follow standard production change control process (i.e. submit request by deadline, get appropriate approvals, attend Wednesday change control meeting) 

Send a FootPrints Request and Notification Ticket to Prod-Control to migrate app to production

Production Control request format:

Prod Control,

Please migrate the <appname> batch job

Urgency: Normal/Emergency
Date of deployment: <date>
SVN Repository: https://sfee.ucsd.edu/svn/repos/mybatchproject
SVN Tag: 1.1.5
Production Destination: lawless:/<location_on_prod>/<appname>
Reason for change: [list changes] Rollback procedure: If job fails on production, please follow these steps [list rollback procedures] Contact: [list contact person, number, email, email list] Thanks, <your name> 

Production Control Release Process for SVN tagged batch jobs

When the requestor specifies a SVN tag for releasing a batch project, the production control release process will check out the tag (entire batch project) and copy the entire contents of the project directory. For example, the DW AP project “batch-dw_ap” the following process would be followed:

  1. Dev team modifies and commits changes to one or more files under the control directory

  2. Dev team creates a tag

  3. Dev team submits Request and Notification ticket to Production Control and includes the pertinent information: 

    1. " Please release https://sfee.ucsd.edu/svn/repos/batch-dw-ap/tags/ap_1.0.1 to PROD at /dw/db2/ap"

  4. Production Control checks out to a working directory 
    [devxxx@aiken ~]$ cd ~/svn [devxxx@aiken svn]$ svn checkout https://sfee.ucsd.edu/svn/repos/batch-dw-ap/tags/ap_1.0.1

  5. The entire project tag is checked out to a new directory “ap_1.0.1” 

    1. Remember, dynamic content should not have been included with project check-in and thus should not be included with check-out files.
      i.e. msgs, automsgs, etc should not be in SVN and should not be checked-out with the above command. 

    2. Because the output and extracts files are not included with the check-out files, you can copy the entire check-out contents to the prod location and overwrite what was there.

    3. Everything inside ../svn/ap_1.0.1 can be copied over the target /dw/db2/ap/ 
      [devxxx@aiken svn]$ rsync –r –p --delete ap_1.0.1/* /dw/db2/ap/
      NOTE: 
      -r causes recursive rsync throughout directory structure
      -p Permissions retained from source
      --delete Delete destination files before copying from source

  6. Change owner of the copied files to “apcprod” 
    [devxxx@aiken svn]$ chown -Rf apcprod /dw/db2/ap 
    NOTE: 
    The –R flag causes recursive ownership change. The –f flag “forces” change without complaint from the system.

Single File Deployments (using SVN revision instead of tag)

In order to deploy SVN non-tagged batch jobs to production (act-batch) follow these steps:

  1. Thoroughly test job on QA environment (batch-qa)
  2. Make note of file revision in source code repository
  3. Send a standard production request ticket to the Production Control team to checkout the SVN file and move/copy the job to the actual directory on the production act-batch environment
    1. Note: In the request note reason for the change, which files need to be deployed, and what action to take in the event the job fails
  4. Follow standard production change control process (i.e. submit request by deadline, get appropriate approvals, attend Wednesday change control meeting) 

Send a FootPrints Request and Notification Ticket to Prod-Control to migrate app to production

Production Control request format:

Prod Control,
Please migrate the <appname> batch job
Urgency: Normal/Emergency
Date for Deployment: <date>
SVN Repository: https://sfee.ucsd.edu/svn/repos/mybatchproject
SVN File Revision: <revision_number>
Production Destination: lawless:/<location_on_prod>/<appname>
Reason for change: [list changes] Rollback procedure: If job fails on production, please follow these steps [list rollback procedures] Contact: [list contact person, number, email, email list] Thanks, <your name> 
Deprecated Process to Deploy a Batch Job

Note: the following link includes information about the original deployment process. This information has been deprecated and this link will be removed when new process is finalized https://act.ucsd.edu/ewadDevWiki/Wiki.jsp?page=BatchProjectDeployment