In this scenario, a definition is created for a job that
can run on either a Linux or an AIX® computer.
About this task
The job can run on Linux operating systems with a minimum of 512 MB of RAM or on AIX operating systems with a minimum of 1024 MB of RAM. The
job definition must include a resource requirement that specifies
the two alternative requirements.
To create job definition for this
job, perform the following steps:
Procedure
- In the Job Brokering Definition Console select and
create a new job definition named jobWithRequirementsByOS. The job definition opens at the Overview page
with the job name assigned.
- Open the Application page and define the required information
for the application that the job is to run.
- Open the Related Resources page.
- In the Resource Requirements pane, click Add then specify a meaningful value for the ID field. In this example it is OperatingSystemType.
- In the Resource Properties pane, define the logic that
describes the two alternative operating system requirements, as follows:
- Click Add OR Operand to indicate
that you are defining alternatives.
- Highlight the OR operand and click Add AND
Operand to indicate that the alternative includes more
than requirement.
- Highlight the AND operand and click Add Requirement.
- In the Resource Property Details dialog, select Operating System Type from the Property Name menu and type LINUX in the Property
value field.
- Highlight the AND operand again and click Add Requirement.
- In the Resource Property Details dialog, select Total Physical Memory from the Property Name menu and type 512 in the Property
value field.
- Highlight the OR operand again and click Add AND Operand to add the requirements for the second
alternative.
- Highlight the new AND operand and click Add
Requirement.
- In the Resource Property Details dialog, select Operating System Type from the Property Name menu and type AIX in the Property
value field.
- Highlight the AND operand again and click Add Requirement.
- In the Resource Property Details dialog, select Total Physical Memory from the Property Name menu and type 1024 in the Property
value field.
- Open the Resources page and create a relationship to the
resource requirement, as follows:
- Select the Advanced Requirements tab.
- In the Relationships pane, click Add. The Relationship Details dialog box is displayed.
- In the Type menu, select Contains.
- In the Target menu, select the
resource requirement OperatingSystemType and
click OK.
- Select to save the job definition file.
Results
The JSDL file created for this scenario has the following
syntax:
<jsdl:jobDefinition xmlns:jsdl="http://www.abc.com/xmlns/prod/scheduling/
1.0/jsdl" xmlns:jsdle="http://www.abc.com/xmlns/prod/scheduling/1.0/jsdle"
xmlns:xmi="http://www.omg.org/XMI" xmi:version="2.0" description="This job
has different requirements for memory based on the operating system it will
run on " name="jobWithRequirementsByOS">
<jsdl:application name="executable">
<jsdle:executable path="/opt/myExecutable">
</jsdle:executable>
</jsdl:application>
<jsdl:resources>
<jsdl:relationship target="OperatingSystemType" type="Contains"/>
</jsdl:resources>
<jsdl:relatedResources id="OperatingSystemType" type="OperatingSystem">
<jsdl:properties>
<jsdl:or>
<jsdl:and>
<jsdl:requirement propertyName="OperatingSystemType">
<jsdl:exact>LINUX</jsdl:exact>
</jsdl:requirement>
<jsdl:requirement propertyName="TotalPhysicalMemory">
<jsdl:range>
<jsdl:minimum>512</jsdl:minimum>
</jsdl:range>
</jsdl:requirement>
</jsdl:and>
<jsdl:and>
<jsdl:requirement propertyName="OperatingSystemType">
<jsdl:exact>AIX</jsdl:exact>
</jsdl:requirement>
<jsdl:requirement propertyName="TotalPhysicalMemory">
<jsdl:range>
<jsdl:minimum>1024</jsdl:minimum>
</jsdl:range>
</jsdl:requirement>
</jsdl:and>
</jsdl:or>
</jsdl:properties>
</jsdl:relatedResources>
</jsdl:jobDefinition>