In addition to deploy and manage its own resources, ProActive can be used as a meta-scheduler and benefit from infrastructures that are already deployed and configured. ProActive can interface with several schedulers and resource managers, including TORQUE. In this post, we show how ProActive can manage native scheduler node sources, whose nodes belong to the TORQUE resource manager, and how ProActive can submit jobs to these resources. We provide the ‘activeeon/proactive-torque-integration’ Docker image that allows our users to try this particular integration easily in a Docker container. This Docker image includes an installation of TORQUE and an entrypoint that downloads and runs the latest release of ProActive.
Setup the Docker Container
First start the Docker container:
$ docker run -d -h docker -p 10022:22 -p 18080:8080 --privileged --name proactive-container activeeon/proactive-torque-integration
Before using ProActive, you need to monitor the Docker container until the ProActive scheduler is running (a few minutes are needed). You can do this with the following command:
$ docker logs proactive-container --follow
As long as it does not return anything, it means that the ProActive scheduler is not yet running.
When the SchedulerStarter java process is displayed, open a web browser and go to http://localhost:18080/. Wait a bit more if the page cannot be displayed, ProActive is still starting.
Create a Native Scheduler Node Source
Now we can create a native scheduler node source, that will eventually manage the nodes of TORQUE. In order to manage the resources of another scheduler than ProActive, and to have these resources represented as ProActive nodes, you need to create a node source with an infrastructure and policy that are dedicated to native schedulers.
Go to the ProActive Resource Manager and login with the admin/admin credential. Click on ‘Add Nodes’. Choose a name for your node source and fill the form with the following values (remove the quotes):
- As Infrastructure, choose: NativeSchedulerInfrastructure
- As Policy, choose: NativeSchedulerPolicy
- Upload your ProActive credential file in RMCredentialsPath. If you do not have a credential file already, you can click on the key icon next to this entry and give your information to generate a credential file. You can then use this file both for this entry and for the SchedulerCredentialsPath entry.
- Fill NSFrontalHostAddress with: 'docker'
- Fill NSSchedulerHome with: '/home/testuser/proactive'
- Fill javaHome with: '/home/testuser/proactive/jre'
- Fill alternateRMUrl with: 'pnp://docker:64738/'
- Fill nsSubmitCommand with: 'qsub -V -o %LOG_FILE% -S /bin/bash -N %NS_JOBNAME%'
- Fill nsKillCommand with: 'qdel -f %NS_JOBNAME%'
- Fill submitReturnJobId with: 'true'
- Fill SchedulerUrl with: 'pnp://docker:64738/'
- Upload your ProActive credential file in SchedulerCredentialsPath
Parameters of Native Scheduler Infrastructure and Native Scheduler Policy |
Finally click 'Ok'. At this point the new node source shows no node. This is because ProActive acquires the nodes of a native scheduler only when a job should be run on them.
Submit a Native Scheduler Job
Now, we need to submit a job that is explicitly marked to be run on a native scheduler, in our case TORQUE. Without this mark, a job would be executed on other node sources than the native scheduler node source. There is a generic information to be supplied to the job to mark it. The name of the generic information must be ‘NS’ and its value must be ‘true’. You can either provide this information when you define your own workflow within the Workflow Studio, or you can use the following sample job to be submitted through the ProActive scheduler (Scheduling & Orchestration):
"1.0" encoding="UTF-8" xml version=
<job xmlns="urn:proactive:jobdescriptor:3.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:proactive:jobdescriptor:3.8 http://www.activeeon.com/public_content/schemas/proactive/jobdescriptor/3.8/schedulerjob.xsd" name="Untitled workflow 1" priority="normal" onTaskError="continueJobExecution" maxNumberOfExecution="2">
<taskFlow>
<task name="Groovy_Task">
<description><![CDATA[The simplest task, ran by a groovy engine.]]></description>
<genericInformation>
<info name="NS" value="true" />
</genericInformation>
<scriptExecutable>
<script>
<code language="groovy"><![CDATA[println "uname -a".execute().text
sleep(60000)]]></code>
</script>
</scriptExecutable>
</task>
</taskFlow>
</job>
After submitting the job, a new node appears in the native scheduler node source with the task eventually running on it. When the job is finished, the TORQUE nodes are released and they disappear from the ProActive Resource Manager interface, until a new job is submitted again.
If you would like to try ProActive meta-scheduling on your own installation of TORQUE, download ProActive from the ActiveEon website and adapt the parameters given in this post to your own environment.
If you would like to try ProActive meta-scheduling on your own installation of TORQUE, download ProActive from the ActiveEon website and adapt the parameters given in this post to your own environment.
No comments:
Post a Comment