You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »

This wiki page addresses the implementation side of OODT-568. Specifically, this document will show you how to run your pre-existing PGE Task within a Windows (Cygwin-enabled) environment.

Requirements:

  • Pre-existing PGE task. See CAS-PGE Learn By Example for details if you do not know how to set one up.
  • Windows XP+ box
  • Cygwin 
  • OODT Workflow manager 0.6-SNAPSHOT+
  • OODT PGE 0.6-SNAPSHOT+

Steps:

1. Tell Workflow Manager to run your PGE using special Windows (cygwin) specific code

To do this, modify your pre-existing PGE task instance entry for your PGE task within tasks.xml (WORKFLOW_HOME/policy/tasks.xml) to use the special WinPGETaskInstance class. You will need simply set the class attribute of your PGETask to use the WinPGETaskInstance class: 'org.apache.oodt.cas.pge.WinPGETaskInstance'. An example is shown below.

<task id="urn:myawesomeproject:MyWinPGETask" name="MyWinPGETask"
     class="org.apache.oodt.cas.pge.WinPGETaskInstance">

     <conditions/>

     <configuration>
        <property name="PGETask_Name" value="MyWinPGETask"/>
        <property name="PGETask_ConfigFilePath" value="[PGE_ROOT]/pge-configs/my-win-pge-task.xml" envReplace="true"/>
        <property name="PGETask_DumpMetadata" value="true"/>
        <property name="PCS_WorkflowManagerUrl" value="[WORKFLOW_URL]" envReplace="true" />
        <property name="PCS_FileManagerUrl"     value="[FILEMGR_URL]" envReplace="true"/>
        <property name="PCS_MetFileExtension" value="met"/>
        <property name="PCS_ClientTransferServiceFactory" value="org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory"/>
        <property name="PCS_ActionRepoFile" value="file:[CRAWLER_HOME]/policy/crawler-config.xml" envReplace="true"/>
        <property name="QueueName" value="win-queue"/> <!-- assuming we are using resource manager to configure a specific queue for windows tasks -->
     </configuration>
</task>

2. Use Cygwin formatted environment variables in your Windows-specific PGE

This is an important step, which basically means, use environment variables within your Windows PGE file that are valid paths within Windows. This is especially important if you have your Linux data folders and PGE directories mounted onto your Windows machine. You would want to have additional environment variables defined that work within Cygwin.

Example
PGE_ROOT  = /usr/local/oodt/pge
WIN_PGE_ROOT = P:/usr/local/oodt/pge

 

My recommended approach is to define BOTH the root directories of data and PGE directories you need for executing PGEs defined in either your tasks.xml file, or within a .bashrc file. Next, create derived environment variables for all your specific Windows PGE needs within your PGE. This way, the Linux and Windows environment variables are passed to your batchstubs through metadata automatically. 

 

 

Example implementation to look at:

Directory containing Linux/Windows configured PGE’s: https://github.com/EDRN/labcas-pipelines/tree/master/backend/workflows/proteome-pge/src/main/resources/config/tabblab

Example Win PGE file: https://github.com/EDRN/labcas-pipelines/blob/master/backend/workflows/proteome-pge/src/main/resources/config/tabblab/proteome-preprocessing.tabblab.pgeconfig.xml

Example .bashrc file (linux): https://github.com/EDRN/labcas-pipelines/blob/44871c37cf03d3484265eaacb8843ec3816e6546/backend/linux/config/src/main/conf/.bashrc

Example .bashrc file (win): https://github.com/EDRN/labcas-pipelines/blob/6338fd6a61f136ee08c725b08d8f828488b60702/backend/win/config/src/main/conf/.bashrc

Workflow Manager tasks.xml file (search for ProteomePreprocessingTabbLab): https://github.com/EDRN/labcas-pipelines/blob/master/backend/linux/workflow/src/main/conf/policy/proteomics-pipeline/tasks.xml

 

  • No labels